About open source, education and random other Stuff
Tethering in Fedora – Using your mobile phone with NetworkManager to surf the web
Recently I tried to use my Nokia 5800 XpressMusic phone to access the web via it’s 3G modem that is available over Bluetooth. I wanted it to work together with NetworkManager nicely so that other programs (such as Pidgin) receive the online status and also to ease the connection/disconnection process. However NM and also gnome-bluetooth are not ready for the job yet (Blueman alledgedly is).
I found a blog entry by Harald Hoyer that offers a Python script to simplify the whole process of adding the phone as a modem. However that script isn’t up to date anymore. Unfortunately NM doesn’t trust HAL to determine the capabilities of the phone anymore (thus allowing this nice Python hack-script) but rather additionally asks udev for it’s opinion. This will result in the following error message in the debug log of NM:
NetworkManager: <info> (rfcomm0): found serial port (udev: hal:GSM)
NetworkManager: <info> (rfcomm0): ignoring due to lack of probed mobile broadband capabilties
I worked around this by setting all rfcomm* ports to be “probed” modems via an udev rule. I know that this probably is not the nicest way to do this but hey, it works. Furthermore I updated the script to the new Python 2.6 popen functions.
Here is what I came up with:
dialup-bluetooth.py
90-rfcomm-nm.rules
The udev rule belongs in /etc/udev/rules.d. The python script can be put anywhere you want but keep in mind that it must be run as root.
Have fun browsing the web on the go!
| Print article | This entry was posted by Felix Kaechele on July 4, 2009 at 6:23 pm, and is filed under Fedora Planet, Internet, Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 1 year ago
I can confirm that Blueman works for bluetooth tethering.
You can install it from Fedora 10 and 11, its currently in updates-testing and should land regular packages soon.
If you had any issues with blueman, let me know so I can report them back to the package maintainer.
Thanks.
about 1 year ago
Sounds like more on the Bluetooth side, of course. Does your phone do
anything when NM tries to bring the connection up? Mine usually asks me
whether I want to allow the computer to connect, or it’ll show an icon
saying a computer is connected. In any case, this is exactly why this
method is a hack, and why we want the real solution.
about 1 year ago
Well I have an option to approve my computer within my bluetooth settings. Thus it can connect without asking me to approve the connection. And if it is connected it shows a little icon.
However I don’t use this method anymore because I bought a real mobile broadband ExpressCard for my Laptop.
about 11 months ago
Dear Nushio
I have a Problem with NetworkManager on Fedora 11 , i installed Blueman and also Bluez but Can`t connect to a PAN true my OMINA SmartPhone but i did connected with a Windows XP when i had on my laptop, please tell me how to?
I add my phone with the blueman and then click the “Network Access” and blueman says that “You are connected to phone…” but nothing happens to NetworkManager but I expect it to recognize a Network . What is my problem? please answer me in my email:
m.mirsamie @ gmail .com
Tanx
about 11 months ago
Hey,
did not work here with my N95 8GB. See:
[root@notepeter tmp]# python dialup-bluetooth.py
no device specified. Searching all nearby bluetooth devices for the dialup service
Searching for dialup service on 00:21:FE:C5:49:F9
couldn’t find the dialup service =(
But check Channel 4…
[root@notepeter tmp]# sdptool browse 00:21:FE:C5:49:F9
Browsing 00:21:FE:C5:49:F9 …
Service Name: AVRCP Target
Service Description: Audio Video Remote Control
Service Provider: Symbian Software Ltd.
Service RecHandle: 0×10000
Service Class ID List:
“AV Remote Target” (0x110c)
Protocol Descriptor List:
“L2CAP” (0×0100)
PSM: 23
“AVCTP” (0×0017)
uint16: 0×100
Profile Descriptor List:
“AV Remote” (0x110e)
Version: 0×0100
Service Name: Audio Source
Service RecHandle: 0×10003
Service Class ID List:
“Audio Source” (0x110a)
Protocol Descriptor List:
“L2CAP” (0×0100)
PSM: 25
“AVDTP” (0×0019)
uint16: 0×100
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“Advanced Audio” (0x110d)
Version: 0×0100
Service Name: Hands-Free Audio Gateway
Service RecHandle: 0×10004
Service Class ID List:
“Handsfree Audio Gateway” (0x111f)
“Generic Audio” (0×1203)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“Handsfree” (0x111e)
Version: 0×0105
Service Name: Headset Audio Gateway
Service RecHandle: 0×10005
Service Class ID List:
“Headset Audio Gateway” (0×1112)
“Generic Audio” (0×1203)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“Headset” (0×1108)
Version: 0×0100
Service Name: AVRCP Controller
Service Description: Audio Video Remote Control
Service Provider: Symbian Software Ltd.
Service RecHandle: 0×10006
Service Class ID List:
“AV Remote” (0x110e)
Protocol Descriptor List:
“L2CAP” (0×0100)
PSM: 23
“AVCTP” (0×0017)
uint16: 0×100
Profile Descriptor List:
“AV Remote” (0x110e)
Version: 0×0100
Service Name: SyncMLClient
Service RecHandle: 0×10007
Service Class ID List:
UUID 128: 00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 10
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“” (0×00000002-0000-1000-8000-0002ee000002)
Version: 0×0100
Service Name: OBEX File Transfer
Service RecHandle: 0×10008
Service Class ID List:
“OBEX File Transfer” (0×1106)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 11
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“OBEX File Transfer” (0×1106)
Version: 0×0100
Service Name: Nokia OBEX PC Suite Services
Service RecHandle: 0×10009
Service Class ID List:
UUID 128: 00005005-0000-1000-8000-0002ee000001
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 12
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“” (0×00005005-0000-1000-8000-0002ee000001)
Version: 0×0100
Service Name: SyncML DM Client
Service RecHandle: 0x1000a
Service Class ID List:
UUID 128: 00000004-0000-1000-8000-0002ee000002
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 13
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“” (0×00000004-0000-1000-8000-0002ee000002)
Version: 0×0100
Service Name: Nokia SyncML Server
Service RecHandle: 0x1000c
Service Class ID List:
UUID 128: 00005601-0000-1000-8000-0002ee000001
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 14
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“” (0×00005601-0000-1000-8000-0002ee000001)
Version: 0×0100
Service Name: OBEX Object Push
Service RecHandle: 0x1000d
Service Class ID List:
“OBEX Object Push” (0×1105)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 9
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“OBEX Object Push” (0×1105)
Version: 0×0100
Service RecHandle: 0x1000e
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 3
Service Name: Dial-Up Networking
Service RecHandle: 0x1000f
Service Class ID List:
“Dialup Networking” (0×1103)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 4
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“Dialup Networking” (0×1103)
Version: 0×0100
Service Name: Imaging
Service RecHandle: 0×10010
Service Class ID List:
“Imaging Responder” (0x111b)
Protocol Descriptor List:
“L2CAP” (0×0100)
“RFCOMM” (0×0003)
Channel: 15
“OBEX” (0×0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0×100
Profile Descriptor List:
“Imaging” (0x111a)
Version: 0×0100
How can I help?
about 11 months ago
In the previous post, I had rebooted before testing. Now after a shutdown and turn on, it is working.
How can I create a trigger to start your script when the bluetooth engine detects my phone? Thanks!