Personal tools
You are here: Home Personal My Blog Internet with your mobile Phone over Bluetooth with NetworkManager

Internet with your mobile Phone over Bluetooth with NetworkManager

by Harald Hoyer last modified Mar 26, 2009 15:03

Sometimes you want to connect to the internet with your mobile phone over bluetooth with your laptop.

To make this task easier I wrote a small python script. It needs pybluez and bluez.

# yum install pybluez bluez

Then you can start the python script as root:

# python dialup-bluetooth.py

It first searches for all bluetooth devices, which provide the Dialup Service, and displays a list, where you can select your mobile.

Then it calls rfcomm and creates a rfcomm tty, which is bound to the bluetooth channel, and inserts a fake serial modem to hal with hal-device.

This triggers NetworkManager, and after 2 seconds your mobile phone should be displayed in the NetworkManager list as a GSM device, which you can configure and use in NetworkManager.

Maybe someone feels like doing a clean implementation, using the D-BUS interface for bluetooth, hal and NetworkManager.

Have fun!

Document Actions
  • Print this
  • Hits: 005720

Thank you!

Posted by Maxious at Mar 24, 2009 14:50
Thank you! I'm left wondering why NetworkManager/Gnome's bluetooth utilities/Fedora don't do this already. I've tried doing it the old-school way with rfcommd/fedora network config/wvdial and it failed for some undescriptive reason - "One or more options conflict" :P

Thanks!

Posted by Patrick at Mar 26, 2009 12:16
Thank you very much for this script. It makes setting up a link via bluetooth so much easier. Much appreciated. I hope to see this or similar functionality in NetworkManager in the future.

Thanks for the script ... but facing some issues

Posted by rtnpro at Apr 30, 2009 09:52
When I first tried the script, it worked fine ... and it showed my already setup GSM connection under the Wireless Network list in the Network Manager. After that, I deleted the connection , did a reboot to do it all over again. Running the script as a normal user shows permission denied, and running it as root shows the following

[root@xps ~]# python /home/rtnpro/Documents/dialup-bluetooth.py
no device specified. Searching all nearby bluetooth devices for the dialup service
Searching for dialup service on 00:1D:98:78:A2:A1
connecting to "Dial-up networking" on 00:1D:98:78:A2:A1
[root@xps ~]#

But nothing shows up in the nm-applet.
Please help.
Regards,
rtnpro

Same here

Posted by KloBass at May 07, 2009 10:20
After some torubles i managed to try to connect to my phone too but same result connecting shell and nothing more..

Update

Posted by Felix at Jul 12, 2009 13:42
Make sure to read my Update on this on http://fetzig.org/[…]/