Active Topics

 


Reply
Thread Tools
Community Council | Posts: 685 | Thanked: 1,234 times | Joined on Sep 2010 @ Mbabane
#11
Strange that regular DUN gives you issues @sulu. It worked for me just fine max 2 years ago. Unfortunately I'm reduced to a Thinkpad X40 that has dead bluetooth chip and dead USB ports, so I can't re-test

Perhaps you have something unusual going on in your N900 bluetooth config? e.g. bluez from -devel? attempts to use BT keyboards or play with bt audio sinking? (at least i know i've played with all those at some point)
__________________
RX-51

Last edited by sicelo; 2019-09-16 at 20:51.
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#12
Originally Posted by sicelo View Post
Strange that regular DUN gives you issues.
Never tried, to complicated for me. I like networks

Originally Posted by sicelo View Post
Perhaps you have something unusual going on in your N900 bluetooth config? e.g. bluez from -devel? attempts to use BT keyboards or play with bt audio sinking? (at least i know i've played with all those at some point)
Yeah probably because it is my playing/dev device.
 

The Following User Says Thank You to Halftux For This Useful Post:
Community Council | Posts: 685 | Thanked: 1,234 times | Joined on Sep 2010 @ Mbabane
#13
haha @Halftux .. i meant sulu. will edit so he sees
__________________
RX-51
 

The Following User Says Thank You to sicelo For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#14
Originally Posted by Halftux View Post
You are so close Did you blocking connections from local lan (under local-basics tab)?
Local/Basics:
Accept connection from local machine = y (default)
Accept connection from local lan = y (custom)
Drop netbios UDP 137 = y (default)

Originally Posted by Halftux View Post
Then you need to open port53 tcp (local-ports tab) for dnsmasq requests from bnep0.
Local/Ports:
53;tcp;WAN

Originally Posted by Halftux View Post
You can look in genwall local-lsof tab, there you should see dnsmasq listen on port 53 tcp.
Local/lsof:
dnsmasq 1397 nobody 6u IPv4 6965 TCP 127.0.0.1:52 (LISTEN)

Originally Posted by Halftux View Post
Does the N900 has a bnep0 IP address (route-ip info tab)?
Route/IP Info:
gprs0 [MY IP]
bnep0 Not available

Originally Posted by Halftux View Post
On that tab you could also click on dnsmasq and you will see hopefully two processes running.
I see only one process:
1397 nobody 2160 S /usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z

Originally Posted by Halftux View Post
I forgot to say all my tests were made with genwall 1.2.2 from extras-devel
Same here.
 

The Following User Says Thank You to sulu For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#15
The settings are locking good.

Originally Posted by sulu View Post
Local/Ports:
53;tcp;WAN
This is not needed when this is set "Accept connection from local lan = y".
And when it should be LAN not WAN sorry forgot to tell.

Originally Posted by sulu View Post
Route/IP Info:
gprs0 [MY IP]
bnep0 Not available

I see only one process:
1397 nobody 2160 S /usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z
Not good. Do you connect with your pc as "panu" or as "nap" you need to connect as nap...(for example test-nap script sounds good but would be bad). Maybe also not fast enough with the start button but I wonder why your PC has a bnep device.
Please click the stop button on the route-bt tab and try again.

And btw maybe it helps the script in /opt/genwall/bt_on.sh will be initiated by the start button, the off button would be bt_off.sh script.

Last edited by Halftux; 2019-09-16 at 21:26.
 
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#16
Originally Posted by sicelo View Post
Strange that regular DUN gives you issues @sulu. It worked for me just fine max 2 years ago.
[..]
Perhaps you have something unusual going on in your N900 bluetooth config? e.g. bluez from -devel? attempts to use BT keyboards or play with bt audio sinking? (at least i know i've played with all those at some point)
I've never done anything bluetooth-related, except for the DUN tethering years ago.


Originally Posted by Halftux View Post
This is not needed when this is set "Accept connection from local lan = y".
And when it should be LAN not WAN sorry forgot to tell.
I set this up because that's what I thought was this advice about:
Originally Posted by Halftux View Post
Then you need to open port53 tcp (local-ports tab) for dnsmasq requests from bnep0.
If that isn't the case, then I'm missing whatever I should have done here instead.

Originally Posted by Halftux View Post
Do you connect with your pc as "panu" or as "nap" you need to connect as nap...
I have no idea. I'm just following your how-to.

Originally Posted by Halftux View Post
(for example test-nap script sounds good but would be bad).
I didn't call that.

Originally Posted by Halftux View Post
Maybe also not fast enoug with the start button but I wonder why your PC has a bnep device.
Is within 10 seconds fast enough?
But frankly, if I'm on a clock here, that's nothing I'd like to use for production.

Originally Posted by Halftux View Post
Please click the stop button on the route-bt tab and try again.
Did that multiple times.

Originally Posted by Halftux View Post
And btw maybe it helps the script in /opt/genwall/bt_on.sh will be initiated by the start button, the off button would be bt_off.sh script.
This is what I got in the terminal when calling those scripts manually:
Code:
$ sudo /opt/genwall/bt_on.sh
CONFIG=/home/user/.genwall/network.ini                                 
sed -n s/btip=//gp /home/user/.genwall/network.ini                     
IP_ADDR=192.168.8.2                                     
sed -n s/btnetm=//gp /home/user/.genwall/network.ini
NETMASK=255.255.255.0                                     
sed -n s/btdhcp1=//gp /home/user/.genwall/network.ini
DHCP_RANGE1=192.168.8.100                                  
sed -n s/btdhcp2=//gp /home/user/.genwall/network.ini
DHCP_RANGE2=192.168.8.127                                  
RUNFILE=/var/run/bt_tethering.pid                          
DNSMASQ=/usr/sbin/dnsmasq                                  
ifconfig bnep0 192.168.8.2 netmask 255.255.255.0 up  
[ -f /var/run/bt_tethering.pid ]                           
[  = lan ]                                             
[  = for ]                                           
run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:Bluetooth PAN Activated
$ sudo /opt/genwall/bt_off.sh                                                                                                                                                                 
cat: can't open '/var/run/bt_tethering.pid': No such file or directory                                                                                                                        
sh: you need to specify whom to kill                                                                                                                                                          
rm: can't remove '/var/run/bt_tethering.pid': No such file or directory
To get these lines off my N900 I had to reboot it again.
 

The Following User Says Thank You to sulu For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#17
Originally Posted by sulu View Post
I have no idea. I'm just following your how-to.
That is good but seems not to help.

Originally Posted by sulu View Post
Is within 10 seconds fast enough?
But frankly, if I'm on a clock here, that's nothing I'd like to use for production.
Nope I think it is not fast enough. Then I wonder why you are using N900 or linux distributions at all. It is not for production it is for handicraft work.

Originally Posted by sulu View Post
To get these lines off my N900 I had to reboot it again.
Oh this shouldn't happen, maybe a bug will look into the script.

I'm sorry I could not be of more help on this matter. Maybe it is better to stick to some other tethering option.
 
Posts: 1,424 | Thanked: 2,622 times | Joined on Jan 2011 @ Touring
#18
I use Ubuntu Mate and other than needing to force a connection on the N900 by doing something like checking email(forces the net connection to active which PAN doesn't always do for my LineageOS and formerly Ubuntu Mobile (Android hybrid)). My laptop usualy can force the N900 to go to 3.5G.
I use the N900 as my network AP whenever I am working mobile or out of the range of my WiFi AP.
There is IMHO no reason to use anything other than USB networking or BT PAN when forwarding the N900's (or most any other mobile device's) network connection. Wifi is unwise as far as the battery mA/h waste vs USB/BT but it often requires less effort to set up for a novice friend's device.
I think the BT PAN needs to be DEB-ified and moved to the repos or even a CSSU update as it is such a core functionality for one's everyday mobile phone I can get web browsing form a tethered tablet but if the N900 remains an EDC phone it needs to support basic tethering.
Which debian GUI program is managing your network if you are not using something like dhclient to dhcp and whatever is equivalent to iwconfig for BT to connect.

Last edited by biketool; 2019-09-17 at 09:59.
 

The Following User Says Thank You to biketool For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#19
Originally Posted by biketool View Post
I think the BT PAN needs to be DEB-ified and moved to the repos or even a CSSU update as it is such a core functionality for one's everyday mobile phone I can get web browsing form a tethered tablet but if the N900 remains an EDC phone it needs to support basic tethering.
Does genwall also not working for you? You can tether usb/wlan/bt with it and for bt it uses the same script from 9000 which you can find on tmo. What method do you use for tether over bt? Maybe I make a easy bt-pan app without any configuration without any button.
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#20
So here comes the easy btpan application. It is designed to make a bt pan connection with forwarded gprs0 network. But it doesn't hurt when gprs network is down then it is like a network connection, for example to copy files from N900 to PC.
The application checks for bt power state and switches the power on if its needed. Then it waits until a bt event is coming from the PC. When the application closes it switches the bt power off.


In principle it is a bluetooth trigger application, it is triggered by a bt connect and it will run the script /opt/btpan/bt_on.sh and when the connection get lost or you close the application, it calls the /opt/btpan/bt_off.sh script. Be aware that these scripts will be started as root. The permission is also set to root.
It has an sudoers entry so you could run it from application manager.
Another way could be for root /usr/bin/run-standalone btpan and as a user sudo /usr/bin/run-standalone btpan.

If you would like to run the application as user only btpan should be enough and the scripts must have the permission executeable by the user. Not tested so far but would be nice if it is possible for other bt scripts which does not need root rights.

The delivered standard scripts will destroy your firewall settings so the best would be to modify them to your needs. It will flush everything and only gprs forwarding will be active, this means no firewall. I still recommend to use genwall.

If this application is what you want I can also upload the application to extras.

The task for the community is to make an icon, best would be a svg one and to choose maybe a different name, up to you all.
I could make an automatic network detection for choose wlan or gprs.

And by the way I made a clean devuan ascii install on a test machine and there was no need to modify the test-network script.

During pairing the application shouldn't run. But the bt adapter should be on and visible.

Prerequirements for btpan:
[N900]
/etc/bluetooth/main.conf
comment out this line (or remove network): DisablePlugins =network,input,hal
iptables and kernel-power
dbus-send should be available



needed packages on PC:
bluetooth
bluez-test-scripts
bluez-tools
Connect:

PC as root:
bluetoothctl
power on
agent on
when you need pairing: pairable on
when you need pairing (look for mac): scan on
when you need pairing (pair the device): pair 00:00:00:00:00:00
N900:
start btpan
PC as user replace with your N900 mac address(if input/output error do again):
cd /usr/share/doc/bluez-test-scripts/examples
./test-network 00:00:00:00:00:00:00 nap
PC as root:
dhclient bnep0
Disconnect:

PC as user:
ctrl+c
PC as root:
(pairable off)
agent off
power off
quit
N900:
close btpan
Attached Files
File Type: deb btpan_0_0_1_armel.deb (35.3 KB, 26 views)

Last edited by Halftux; 2019-09-17 at 23:58.
 

The Following 4 Users Say Thank You to Halftux For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:49.