Yellow Cow Blog

Tethering in Fedora – Using your mobile phone with NetworkManager to surf the web

by Felix Kaechele on Jul.04, 2009, under Fedora Planet, Internet, Linux

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! :)

:, , , , , , , , ,

6 Comments for this entry

  • Nushio

    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.

  • Emily 

    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.

  • Felix Kaechele

    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.

  • mehrdad

    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

  • Peter

    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” (0×110c)
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    PSM: 23
    “AVCTP” (0×0017)
    uint16: 0×100
    Profile Descriptor List:
    “AV Remote” (0×110e)
    Version: 0×0100

    Service Name: Audio Source
    Service RecHandle: 0×10003
    Service Class ID List:
    “Audio Source” (0×110a)
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    PSM: 25
    “AVDTP” (0×0019)
    uint16: 0×100
    Language Base Attr List:
    code_ISO639: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “Advanced Audio” (0×110d)
    Version: 0×0100

    Service Name: Hands-Free Audio Gateway
    Service RecHandle: 0×10004
    Service Class ID List:
    “Handsfree Audio Gateway” (0×111f)
    “Generic Audio” (0×1203)
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    “RFCOMM” (0×0003)
    Channel: 1
    Language Base Attr List:
    code_ISO639: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “Handsfree” (0×111e)
    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: 0×454e
    encoding: 0×6a
    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” (0×110e)
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    PSM: 23
    “AVCTP” (0×0017)
    uint16: 0×100
    Profile Descriptor List:
    “AV Remote” (0×110e)
    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: 0×454e
    encoding: 0×6a
    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: 0×454e
    encoding: 0×6a
    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: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “” (0×00005005-0000-1000-8000-0002ee000001)
    Version: 0×0100

    Service Name: SyncML DM Client
    Service RecHandle: 0×1000a
    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: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “” (0×00000004-0000-1000-8000-0002ee000002)
    Version: 0×0100

    Service Name: Nokia SyncML Server
    Service RecHandle: 0×1000c
    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: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “” (0×00005601-0000-1000-8000-0002ee000001)
    Version: 0×0100

    Service Name: OBEX Object Push
    Service RecHandle: 0×1000d
    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: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “OBEX Object Push” (0×1105)
    Version: 0×0100

    Service RecHandle: 0×1000e
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    “RFCOMM” (0×0003)
    Channel: 3

    Service Name: Dial-Up Networking
    Service RecHandle: 0×1000f
    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: 0×454e
    encoding: 0×6a
    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” (0×111b)
    Protocol Descriptor List:
    “L2CAP” (0×0100)
    “RFCOMM” (0×0003)
    Channel: 15
    “OBEX” (0×0008)
    Language Base Attr List:
    code_ISO639: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profile Descriptor List:
    “Imaging” (0×111a)
    Version: 0×0100

    How can I help?

  • Peter

    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!

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...