Online with a Debian Linux notebook and the Sony-Ericsson T610 mobile phone via Bluetooth

This is a translation of the German article: Mobil online mit einem Debian Linux Notebook und dem Sony-Ericsson T610 via Bluetooth. Changes will be incorporated into the German version of this article first.

Introduction

In this document I want to show you, how to go online with a notebook running Debian Linux and a Sony-Ericsson T610 mobile phone when there is no other wired or wireless internet connection at your disposal. My latop currently runs Debian Sarge on a 2.6.6 kernel.

Because I'm online at locations where there is either not much space or where it sways heavily (e.g. trains, sailing yacht) most of the time, I opted to establish the connection of both devices via bluetooth. This technique is in this case preferred over infrared communication (IrDa), because there is no need for intervisibility between the devices with bluetooth. I would be theoretically able to keep my mobile phone in a pocket and be still able to surf the web.

To go online I use a normal modem access number of a regional internet provider with a local dial number. This is preferred because it is relatively easier to establish and also much cheaper compared to a theroretically possible connection via GPRS. If you are a customer of a big online service (e.g. German Telekom, AOL, Compuserve) this service might as well provide a direct access number in your moblie phone network. (German readers s.a. Internetzugang aus den Mobilfunknetzen).

Activating Bluetooth

As of today most notebooks still do not come with an integrated bluetooth interface. My laptop dosn't come with one of these interfaces, too. To go online via bluetooth anyway I had to buy an Acer Bluetooth USB dongle. Those dongles are very compact and can be bought for about 20 EUR in Germany. They will be plugged into a free USB interface of your laptop. Before getting one of these devices you should however ensure that it will be supported by Linux's Bluez-Driver. You find a comprehensive list of devices known to be supported in the document Bluetooth hardware support for Bluez compiled by Marcel Holtmann. Here you will also find information on the modules you need to get the respective device to work.

Install the respective Debian packages even before you plug in the dongle. If you use Debian Woody you can find the neccessary backports of the Debian packages on the project site of Bluez.

As soon as you installed the packages successfully you should use modconf to load the newly appeared module for your dongle into the kernel. In my case the module was hci_usb and it was located in kernel/net/bluetooth. apt-get install bluez-utils, bluez-sdp, bluez-pan
modconf

After loading the module into the kernel you can plug in your dongle and restart your notebook. You should now be able to use hciconfig to obtain information about your dongle. If you don't get anything here, something went wrong during installation of your dongle. You should check the systems log files to obtain more information on what might have caused the error. A google research might also turn out to be a good idea. You might also want to check the ressources at the end of this article.

hciconfig

The installation of the bluetooth dongle should now be completed successfully.

Connecting the devices

We will now try to get both devices to talk to eachother. Activate the bluetooth interface of your Sony-Ericsson T610. It should now be possible to scan for your mobile phone from the laptop.

hcitool scan
Scanning ...
00:00:00:00:00:00 Patricks T610

Next to the bluetooth adress of your mobile phone you should see the name you gave your phone (if you did so). Write down just the bluetooth adress of your mobile as we will need it later on in the process.

We now need to find out about the channel number of our mobiles modem as we want to use exactly this part of the device. Search for a so-called DUN to accomplish this task.

sdptool search DUN

In my case the channel number was "1". Write down the channel number. We now have all neccessary information we need to get in touch with our mobile phone. To finally establish a connection we need to connect our mobile phone with a device identifier on our laptop.

rfcomm 0 00:00:00:00:00:00 1

The first paramter is the device number of therfcomm-identifier to which we want to bind our mobile phone. The last parameter is the chanel number you wrote down earlier and the second paramter in between is the bluetooth adress of your mobile. To verify that the devices were connected correctly instruct your notebook to show you all bindings on rfcomm.

rfcomm show

You should now instruct your laptop to show you its bluetooth PIN number. Write it down, too. You'll need it in a second.

cat /etc/bluetooth/pin
PIN:1234

If you want to change the bluetooth PIN number of your notebook edit the file /etc/bluetooth/pin to your satisfaction.

Take your Sony-Ericsson T610 moblie phone and open the menu "connections" on the right hand corner at the bottom of the screen. Select "Bluetooth" and then "Own Devices". Add a new device. Your mobile phone should now detect your computer as a bluetooth device. My computer is called "Einstein", so my moblie phone found the bluetooth device einstein-0. Your moblie phone now asks you for your PIN number. Enter the number you wrote down before. Your mobile phone should now be successfuly added to your own devices. So far so good.

Going online

You should now be able to use the device /dev/rfcomm0 as you would use a normal modem device. If you never installed a modem device under Linux, I will lay out in simple steps how to do that now. I will use some graphical configuration tools to shorten the process as much as possible and to get you some fast results.

Install the Debian packages ppp and kppp. Open kppp and configure a new internet connection using a service provider of your choice. Note that you need to use a dail in number that can be reached from your mobile phone network. In Germany you can't use any special dial in numbers. A local dial in number would be suited best. Instruct kppp to use the device /dev/rfcomm0 and set the connection speed to 9,600 baud.

Configuration of kPPP

Theoretically you can go online as you would go online normally. As soon as the connection has been established the window will be gone and you will find a blue globe in your panel. A right click on this globe would reveal a menue to disconnect from the internet.

Before connecting to the internet for the first time you should get a message stating that the modem device is ready. After that you should see calling activities going on on the display of your mobile phone. As soon as the connection is established you will find a green telephone handset in the upper left corner of the display of your Sony-Ericsson T610. You will see this handset until the connection has been ceased.

If you get an error after dialing that states that pppd exited with the error message 1 remote server did not authenticate itsself this can have two reasons: On the one hand you should search the file /etc/ppp/options for a line that says auth and then uncomment this line. On the other hand some notebook devices don't like it if you have running another network connection with a DSL-/ISDN-receiver. Disconnect and restart your computer. Now it should work without a hassle.

Further Ressources

The following articles helped us to find a solution to our problems. Maybe you find further information there if this workshop was not good enough for you.

Copyright © by Nachtarbeiter.net 2004