![]() |
N900 bluetooth tethering with Debian PC in 2019?
Hi,
I want to use my N900's mobile data plan on my computer(s) running Debian Buster. On Debian I use Xfce with nm-applet (network-manager-gnome), where I successfully set up a "mobile broadband connection"* with which I can use my N900 as a modem if it is connected via USB. Now I want the same thing not via USB but via Bluetooth (because wireless would be more convenient). So I successfully paired my N900 and my computer(s) with the N900 and set up a "bluetooth connection"* in nm-applet. nm-applet also finds the N900 and tries to connect to it, but fails. When it does, I see these messages in journalctl: Code:
Sep 14 09:20:34 gpd NetworkManager[667]: <info> [1568445634.2093] device (00:BD:3A:F6:C4:71): Activation: starting connection 'Vodafone Vorgabe 2' (3c8e0375-d9ff-4108-b1a0-f8634a0c99e3) Code:
fail (/usr/lib/python3/dist-packages/blueman/gui/manager/ManagerDeviceMenu.py:124) But two peopIe who have never done this before can establish a connection in nm-applet via bluetooth with their phones (not N900) right away. I on the other hand can reproduce the same problem on three different PCs with different Debian installations. One of them is a very vanilla Debian Xfce installation, to which I only added the bluez and bluetooth packages. So I'm beginning to think, that the problem is not actually on the Debian side, but on the N900's. I once had bluetooth tethering working with wvdial on a Debian PC some 5+ years ago, but I didn't keep my wvdial configuration and I thought, it should be easy to do with nm-applet. I'm pretty sure that nothing of relevance has changed on my N900 since then. As far as I understood, the missing rfcomm socket blueman is complaining about should be something like /dev/rfcomm* on my Debian system. I don't see such a device. Would I need that, and if so, should it somehow be created by/from/via(?) the N900? One of the users at debianforum.de, who has a working connection, says, he sees no such device either. When opening this thread, these threads were suggested to me [2][3][4][5][6], but since they're all very old, I don't know which one(s), if any, to follow. I'm running the latest kernel power on the N900 and bluetooth-dun seems to be working fine. At least I see the rfcomm instance running, that's started by it: Code:
1198 root 1556 S rfcomm -S -- listen -1 1 /usr/bin/pnatd () *) back-translated from German, so probably not the original term [1] https://debianforum.de/forum/viewtop...?f=30&t=174706 [2] http://talk.maemo.org/showthread.php?t=58570 [3] http://talk.maemo.org/showthread.php?t=90063 [4] http://talk.maemo.org/showthread.php?t=37710 [5] http://talk.maemo.org/showthread.php?t=32839 [6] http://talk.maemo.org/showthread.php?t=46140 |
Re: N900 bluetooth tethering with Debian PC in 2019?
|
Re: N900 bluetooth tethering with Debian PC in 2019?
I never used bt tethering, I always used a forwarded bt pan connection.
I got it working with devuan ascii, but laptop is at home and there are some differences compared to debian. I will give you a link how I did it in the past. However with devuan ascii it is different and I will have look and try to remember what I did. In principle you need to initiate a pan connection the rest you do with genwall. http://talk.maemo.org/showpost.php?p...5&postcount=62 Pan and modern bluez: http://blog.fraggod.net/2015/03/28/b...-bluez-5x.html |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
In the 2nd half pppconfig didn't make any sense to me though. Most of the ncurses dialogues didnt seem to be about what I wanted to do and after completing the wizard with largely random/default inputs I couldn't find any config file that I might have adapted manually. Quote:
I guess I wouldn't care about the details as long as it works and is half-way convenient. Quote:
Quote:
Does this mean, that by default whatever kind of "network" won't work on the N900 via bluetooth? If so, that might explain my problems. But then I don't understand why it worked years ago. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
|
Re: N900 bluetooth tethering with Debian PC in 2019?
Instead of bluetooth you can also easily use wireless tethering.
There is an app called "Qt Mobile Hotspot", which I have found to work quite reliably. Of course you want at least the WEP encryption provided. The problem is, many modern wireless devices do not support WEP, my workaround is to carry a Edimax ew-7811un around (very cheap, very little wireless dongle), plug it into any device and it will be able to use your WEP network. (Works also for the native N9 hotspot) WEP is not secure and can be hacked, but because it isn't supported anymore the risk of somebody having a compatible device, the required skills and the urge to hack your hotspot is very negligible. |
Re: N900 bluetooth tethering with Debian PC in 2019?
I don't know if it helps but my setup is atm broken (edit only for one N900). Maybe the bluetooth dbus device has changed. When I try to connect like before I getting now an audio connection.
As far as I remember: N900_1: not working cssu testing maybe other testing stuff from bt N900_2: working cssu stable some packages from cssu devel but not related Have another one with stock but not tested atm. Here my notes(which where working in march 2019 and today): Device must be paired once and should be trusted. (a note I made to the test-network script "changed Network1 to Device1" However try first without modification it is not everytime necessary) This was a hack which was needed because the N900 was identified wrong and needed packages on PC: bluetooth bluez-test-scripts bluez-tools PC as root: bluetoothctl power on agent on 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 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 in genwall: when the bt icon get blue click fast the start button which resides on route-bt tab(settings on that page should be saved before and select dnsmasq to forward.) PC as root: dhclient bnep0 in genwall: in genwall setup the firewall and forwarding you could do it also before making the connection. {local-basics} 1.:select wan device gprs/usb/wlan 2. I would "accept connection from local machine"... makes live easier (really this should be activated!) 3. If you want to connect from pc->N900 without openning ports. I would also recommend to "Accept connection from local lan". (or allow port for dhcp) {for/out} 4. activate forwarding and set lan device to bnep 5. Masquerade wan device should be active {local-basics} 6.gen rules 7. push the start button Disconnect: PC as user: ctrl+c PC as root: pairable off agent off power off quit EDIT: Oh on another N900 my tutorial is still working And btw with genwall you could also make a wep wifi hotspot in addition with a firewall, also with your own rules. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
Frankly, I'm about to give up here. Networking is really not my strong suit and I'm not really motivated to change that. Now that I know there are multiple "ways" of tethering I discovered, that nm-applet actually uses dun when setting up a bluetooth connection. So I'd rather follow that path, if any. Quote:
Out of desperation I tried it anyways, but by that time I had messed up settings genwall so hard, that I didn't know how to help myself, other than rebooting the device. After the reboot it worked fine though. I still don't feel very comfortable with this solution, and since I already have a fallback via USB I'm not sure I'll use the wifi approach. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
You can look in genwall local-lsof tab, there you should see dnsmasq listen on port 53 tcp. Does the N900 has a bnep0 IP address (route-ip info tab)? On that tab you could also click on dnsmasq and you will see hopefully two processes running. One for local host 127.0.0.1 and one for your bt ip. |
Re: N900 bluetooth tethering with Debian PC in 2019?
I forgot to say all my tests were made with genwall 1.2.2 from extras-devel sorry for missing this maybe important thing.
|
Re: N900 bluetooth tethering with Debian PC in 2019?
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) |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
|
Re: N900 bluetooth tethering with Debian PC in 2019?
haha @Halftux .. i meant sulu. will edit so he sees
|
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Accept connection from local machine = y (default) Accept connection from local lan = y (custom) Drop netbios UDP 137 = y (default) Quote:
53;tcp;WAN Quote:
dnsmasq 1397 nobody 6u IPv4 6965 TCP 127.0.0.1:52 (LISTEN) Quote:
gprs0 [MY IP] bnep0 Not available Quote:
1397 nobody 2160 S /usr/sbin/dnsmasq -k -i lo -a 127.0.0.1 -z Quote:
|
Re: N900 bluetooth tethering with Debian PC in 2019?
The settings are locking good.
Quote:
And when it should be LAN not WAN sorry forgot to tell. Quote:
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. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
But frankly, if I'm on a clock here, that's nothing I'd like to use for production. Quote:
Quote:
Code:
$ sudo /opt/genwall/bt_on.sh |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
Quote:
I'm sorry I could not be of more help on this matter. Maybe it is better to stick to some other tethering option. |
Re: N900 bluetooth tethering with Debian PC in 2019?
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. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
|
Re: N900 bluetooth tethering with Debian PC in 2019?
1 Attachment(s)
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: bluetoothConnect: PC as root: bluetoothctlN900: start btpanPC as user replace with your N900 mac address(if input/output error do again): cd /usr/share/doc/bluez-test-scripts/examplesPC as root: dhclient bnep0Disconnect: PC as user: ctrl+cPC as root: (pairable off)N900: close btpan |
Re: N900 bluetooth tethering with Debian PC in 2019?
@Halftux:
Thanks for your efforts with the btpan app! Unfortunately it doesn't change my outcome. In Debian I have the packages installed and the N900 is paired with my PC. Then I run btpan on the N900 and see a window popping up with this line in it: Code:
BT connection 0 Code:
connected to: [MAC of my PC] In the meantime I've tried to resurrect my old wvdial DUN connection and got a but further but wasn't totally successful. (fyi, what I'm about to write now is a translation of a post I just wrote at debianforum.de. [1] So If your German is better than your (or my) English it's probably best to read the original.) My /etc/wvdial.conf: Code:
[Dialer Defaults] Code:
# rfcomm bind 0 XX:XX:XX:XX:XX:XX Code:
# wvdial bt Code:
# ip a Somewhere I picked up that route might help me, but it sems I already have the correct route (10.6.6.6)?: Code:
# route -n [1] https://debianforum.de/forum/viewtop...74706#p1217285 |
Re: N900 bluetooth tethering with Debian PC in 2019?
Yes you need to set the default gw on your PC.
Code:
route add default gw 10.6.6.6 should be 139.7.30.126 139.7.30.125 Can you do route -n and iptables --list on the N900 please. What Kernel are you running? |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
I seem to have a lot of interference here though. Whenever I try to transmit data via gprs, my DSL internet connection seems to hickup and gprs data transmission also doesn't always seem to work here. Then it usually helps to switch back and forth between 2.5G and 3G on the N900. Especially if someone opens the door of my tenement, that seems to disturb gprs transmission. I also noticed that effect in the past, when I was watching TV via DVB-T. :confused: Quote:
Quote:
Code:
# route -n Quote:
Code:
# uname -a |
Re: N900 bluetooth tethering with Debian PC in 2019?
So intefresting to follow this kind of post when it doesn't really concern me. It was such a pain with the cutetube2. It is like the same difference wether your own baby cries in a public transportation or someone else's baby.
|
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Quote:
Maybe someone runs something like this https://www.jammer-shop.com/de/der-n...torsender.html or better you should let it run for one month and I would guess all other people will move to another place which could improve your connection stability.:D The other thing about bt pan. You can't get a dhcp reply because the N900 will not bring up bnep0. I found in another thread that it could be fixed by reinstalling libicd2. |
Re: N900 bluetooth tethering with Debian PC in 2019?
@sulu you can find in the maemo wiki a baudrate of 921600 ...
|
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
The rent is cheap and the location is good though, so I won't move out. ;) Quote:
For the wvdial solution I've found a way to automate the routing. [1] If I add these options to /etc/ppp/peers/wvdial, the route will be set automatically when wvdial is started: Code:
defaultroute [1] https://ubuntuforums.org/showthread....80#post7836980 |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
Yes this package is a device root package. But you could find them by adding the sponsored mirror by bencoh. Code:
deb http://maemo.muarf.org/apt-mirror/mirror/downloads.maemo.nokia.com/fremantle/ssu/mr0 ./ libicd_dbus.so.1.1.0 libicd_log.so.1.0.0 libicd_settings.so.1.0.0 Quote:
Here my old tutorial maybe it is useful when you find an old linux box. Or find an old A780 there you could make a hack for getting edge. The good old times. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Just to be sure, @sulu is back to using BT-DUN (I think so), or is using BT-PAN?
|
Re: N900 bluetooth tethering with Debian PC in 2019?
@Halftux:
Thanks for the links and hints to libicd2! I'll try that eventually, but during the next 2 weeks I can't afford my N900 to become unusable, so I'll do that later. @sicelo: Yes, from what I understand, I'm back to BT-DUN. |
Re: N900 bluetooth tethering with Debian PC in 2019?
Quote:
|
Re: N900 bluetooth tethering with Debian PC in 2019?
Hi Sulu,
The method described in the below post worked for me: http://talk.maemo.org/showpost.php?p...&postcount=258 I just had to make the change described here: https://talk.maemo.org/showthread.ph...29#post1464429 |
All times are GMT. The time now is 20:14. |
vBulletin® Version 3.8.8