Tethering a Nokia 6165i to a Compaq nc4010 using Bluetooth (Kubuntu)

This was not that hard to do – for a sysadmin and geek – but not for a general user. One of the things I like about Kubuntu is its ease of use and preconfigured and debugged desktop, but here it fails. Setting up a dialup networking connection is sorely inadequate, and is completely unintuitive. Most of this problem stems from several problems:

  • The menu structure in KNetworkManager is very obtuse and non-obvious.
  • Configurations created by kppp and by KNetworkManager (running kppp) result in two different configurations in two different locations.
  • Configuration of the ppp0: network device is not available anywhere related to networking.

A lot of this problem stems from the way KNetworkManager is set up; however, the network configuration interface should also allow for the creation of a ppp0: device.

There also seems to be no way to create a tethered link to a bluetooth device without using the command line. Not a problem for me nor for many of you, but for a general user it would be a real stumbling block. (I guess I shouldn’t be surprised; from the project page comes this bit about dial-up support: The rudimentary dial-up support gives the user the ability to connect dial-up connections configured using YaST. There is much room for improvement. As of 16/11/2007 in Opensuse 10.3, this is broken.).

Most of the directions I took from this article titled Bluetooth DUN tethering – Linux and KDE (Might work with Gnome) from PinStack.com (a support site for Blackberry users).

In this case, I will assume that you know how to pair a cell phone device with your Linux laptop; it’s fairly easy (though not completely intuitive). I’ll also assume that all of the requisite bluetooth support is available and already installed.

You’ll need to get the MAC address for the bluetooth device. This could be done any number of ways; from the command line this will do:

$ hcitool scan
Scanning ...
00:12:D1:C9:DF:5E Nokia 6165i

After the MAC address is found, then the next step is to find the appropriate bluetooth channel for dial-up networking. This can be done using the sdptool command:

$ sdptool browse
Inquiring ...
Browsing 00:12:D1:C9:DF:5E ...
Service Name: Dial-up networking
Service RecHandle: 0x10000
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

A lot of information spits out, but the relevant one for me was this entry. Now create the serial link that connects the “modem” to the operating system – in particular, a device /dev/rfcomm0 is created for communicating with the bluetooth modem (which is what the phone becomes). This is done thusly:

# rfcomm bind hci0 00:12:D1:C9:DF:5E 1

Once this is done, assuming the right channel was chosen, then kppp can be configured. Because of the conflict between kppp configuration and the KNetworkManager configuration, a setup step may be worth doing (as root):

# cd ~/.kde/share/config/
# rm -f kppprc
# ln -s ~me/.kde/share/config/kppprc

What this does, then, is make it so that your personal configuration for kppp is also used by root. Now kppp can be run from the command line (since it’s already open, right?) and you won’t have to go searching for the configuration in the menu tree:

$ kppp

After kppp is configured, you should be able to use your phone as a cellular modem. The configuration I used (for U.S. Cellular) worked, and has been described in these pages in the past.

Connecting to the Internet with Bluetooth: After One Month Plus

Having used my Bluetooth-enabled phone (now the Nokia 6165i) to connect to the Internet using my Mac Mini and MacOS X 10.4, I want to relate my experiences.

As a dialup user, I found the cell-phone connection to be pleasantly faster, but not overly faster. Having been used to dialup speeds (and expecting nothing outstanding) I was pleased with the speed of the connection. Someone used to broadband speeds would be dramatically disappointed, but the ability to use cell-phone-based Internet connectivity anywhere can be a real asset.

I also found that the “modem” inside the mobile phone would react in strange ways at times, sometimes not responding at all, other times responding but refusing to make any connections, other times accepting input but not responding to input. Part of this may be due to bugs in the modem software – after all, the modem is not nearly as heavily used by the users as the mobile phone portion of the software. Part of this may also be due to lack of a strong data signal.

This brings me to what may be the worst drawback – the data signal is quite separate from the cell signal – so there is no indication of how strong it is or even if it exists in the current location. Thus it may be that when the data signal is weak, the modem will refuse to dial (the equivalent of not receiving a dialtone).

Much of this is hypothesis on my part about how the modem works – but I’ve found that MacOS X seems to be largely sound in its handling of the connection.

I’ve also seen the system go through a sequence (on the menu bar, starting in a connected state): “Disconnecting…” followed by “Authenticating…” followed by a continuation of the time spent online. I’ve attributed this to a possible loss of signal or a weak signal. It remains, however, rather disconcerting – but nothing bad comes of it.

The other bluetooth-based connections I use – one from the phone itself, and one from a Nokia 770 Internet tablet – are nowhere near this informative, so can’t say much about those, except the speed is the same (at least, it should be, eh?).

Also, my experiences with spontaneous loss of connection – for instance, when the phone goes dead! – have not been pleasant. Complete loss of bluetooth signal seems to be well-handled, but when the phone dies, there may be something else going on. Thankfully, this has not happened to me for some time, but I recommend not trying it 🙂