Translation(s): English - Italiano

(!) ?Discussion


If you simply want to use the cellphone data connection from other devices, most cellphones today have a wireless hotspot feature. This allows you to connect any device to the cellphone via WiFi, and use the data connection of the cellphone provider.

HowTo Connect your Laptop to Internet using a Cell Phone via USB or Bluetooth

In this article I am going to describe how to easily connect your laptop to the internet using your cell phone as a 3G/GPRS modem via bluetooth or USB.

The procedure has been tested in a Toshiba Satellite Laptop with Debian SID (2.6.26-1-686) and a Nokia N80 Cell Phone connected to the Spanish mobile net Movistar. Surely you must slightly change the parameters given in this paper to make a different connection work...

It is very important to follow strictly all of the steps related in this article.

Note: For general information on setting up Bluetooth, also see the page BluetoothUser.

Pairing your Laptop with your Cell Phone

First of all, you need to pair your laptop with your cell phone. You need an active internet connection to your laptop in order to download some packages. We will use the kdebluetooth package. Though I myself am a Gnome user, I have found this package very useful. So that let us open a console and type as root:

# apt-get install kdebluetooth

This will install the package. After that, just let us type as a normal user:

$ kbluetooth

Then a little blue icon will appear on the taskbar...

If we click on it with the right button of the mouse and choose the option CONFIGURE... ADAPTERS... then we will be able to configure the laptop in order to set it in DISCOVERABLE mode...

After this, we activate the Bluetooth on the cell phone and try to detect the laptop... Once discovered the laptop on the phone, it will prompt us to enter a numeric password: just type something easy like "123" in case you think there is no security threat... (It is just a one-time password). You will be prompted to repeat the same password on your laptop. To avoid repeating this process each time you pair your laptop with your cell phone, I highly recommend to add the laptop as a trusted device (this is an option easily accessible in the bluetooth menu on the cell phone)... Et voi-là... our devices are just paired!

Configuring MODEM Parameters

Now we need to configure the modem parameters of your cell phone.

First connect the cell phone to the laptop computer with the USB cable... It is important that the cell phone does not lose connectivity at this point, so that it would be useless if you connected your cell phone via USB in the "File Transfer" mode... You need to connect it in a way that the cell phone is still operative. In the case of the Nokia N80 you should choose the "PC-Suite" option...

And then type as root:

# apt-get install wvdial 
# wvdialconf

After doing this, wvdialconf has examined your cell phone and after a successful connection with it has determined the correct parameters of your modem and written it to a file. But now we must tweak this configuration file, so that we type as root:

# apt-get install gedit
# gedit /etc/wvdial.conf

You need to delete the following lines of code:

Modem Type = USB Modem
Modem = /dev/ttyACM0

And you need to add the following lines to the end of the file we are editing in the same order as it appears here:

New PPPD = yes
Phone = *99***1#
Username = MOVISTAR
Password = MOVISTAR
Init6= AT+CGDCONT=1,"IP","movistar.es"

[Dialer usb-scb]
Modem Type = USB Modem
Modem = /dev/ttyACM0

[Dialer blz-scb]
Modem = /dev/rfcomm0

Now we save the file without changing name nor location and we are ready. The cell phone modem is completely configured, and we can use it indistinctly via USB or Bluetooth (as you prefer) without changing any parameter...

Bringing Down the Network

Before connecting your laptop to your cell phone, we first need to bring down your existing network connection. To do that, we type as root:

# ifconfig eth0 down
# mv /etc/resolv.conf /etc/resolv.conf.eth0

# ifconfig

So that all active interfaces will appear...

DNS settings

To use the internet, you will need correct DNS settings. Normally, you will automatically get DNS settings when you connect, so you do not need to do anything.

However, if your cellular network requires it, you may have to set the DNS servers manually. To do this:

# echo "nameserver 194.179.1.100" > /etc/resolv.conf
# echo "nameserver 194.179.1.101" >> /etc/resolv.conf

The examples nameservers are valid only if you are connecting to the Spanish mobile net Movistar... consult your cellular network's documentation for the right settings.

Connecting via USB

If you want to connect your laptop to the internet via USB to your cell phone. Just connect the cables and type as root:

# wvdial usb-scb&

You are done. You can surf the web, or check your e-mail... ;-)

Connecting via Bluetooth

If you want to connect your laptop to the internet via Bluetooth to your cell phone. Just activate bluetooth both in the laptop and the cell phone, and then type as root:

# hcitool scan

The following information will appear:

Scanning...
    00:11:22:33:44:55    NameDevice

This is the MAC address and the name assigned to your cell phone Bluetooth device. Now you type as root (using the same MAC address as above):

# rfcomm connect  0  00:11:22:33:44:55  2&

After the connection is established, you type as root:

# wvdial blz-scb&

You are done. You can surf the web, or check your e-mail... ;-)

Hope you like it.

2008.01.01@SebastianMaemo

Frequently Asked Questions

If you have a question about the Configuration procedure described above, don't hesitate to add your question in #NewQuestions below.

Not so frequent asked questions

New questions (unanswered)

See also


CategoryModem CategoryWireless CategoryNetwork