["UseYourCellPhoneAsAModem"]

USE YOUR CELL PHONE AS A MODEM

HowTo EASILY Connect your Laptop to the Internet Using your 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.18-5-686) and a Nokia N80 Cell Phone connected to the Spanish mobile net Movistar. Surely you must change the parameters given in this paper to make a different connection work...

1. 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!

2. 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... 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...

3. 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
# echo "nameserver 194.179.1.100" > /etc/resolv.conf
# echo "nameserver 194.179.1.101" >> /etc/resolv.conf

Obviously, these nameservers are valid only if you are connecting to the Spanish mobile net Movistar... And eth0 is the name of your active network interface. In case you are not sure about the name of your interface, just type as root:

# ifconfig

And then all actives interfaces will appear...

4.A. 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... ;-)

4.B. 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

?Anchor(FAQ)

Frequently Asked Questions

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

?Anchor(NotSoFAQ)

Not so frequent asked questions

?Anchor(NewQuestions)

New questions (unanswered)

?Anchor(SeeAlso)

See Also

http://wiki.debian.org/HOWTO/BluetoothGPRS http://wiki.debian.org/Modem/3G


Category Networking HOWTO/BluetoothGPRS Modem/3G