Aug 4, 2008

Nokia 6120 as modem


This is modified version of this HowTo http://wiki.debian.org/UseYourCellPhoneAsModem


I am going to describe how to easily connect your computer to the internet using your cell phone as a 3G/GPRS modem via Bluetooth/USB.

The procedure has been testedon my Debian testing/unstable box and a Nokia 6120 connected to the Slovenian mobile network Mobitel. So some parameters are operater-specific (APN, Phone and so one) so you need to change them to make a different connection work...The best will be just to call tehnical support as I did.

# means I am logged as root and $ means I am logged as normal user.

1. Pairing computer with your Cell Phone

Skip this if you do this before.
$ su
# apt-get install kdebluetooth
# exit
$ kbluetooth

A little blue icon should appear on the taskbar... Click on it -> Configure -> Adapters -> Discoverable mode.

You nedd to pair phone and computer (otherwise you share - pay - connection with all the neighbors) (on phone Bluetooth -> go to tab Paired -> Options -> New paired device -> follow instructions on phone).


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
# apt-get install nano
# nano /etc/wvdial.conf

Output looks like this:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
; Phone =
ISDN = 0
; Username =
Init1 = ATZ
; Password =
Modem = /dev/ttyACM0
Baud = 460800


Now delete this two lines (Ctrl + K)
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#
Username = mobitel
Password = internet
Init6= AT+CGDCONT=1,"IP","internet"

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

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

At the end file looks like this:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Init1 = ATZ
Baud = 460800

New PPPD = yes
Phone = *99#
Username = mobitel
Password = internet
Init6= AT+CGDCONT=1,"IP","internet"

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

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



Save changes (Ctrl + O, Enter) and exit (Ctrl + X)


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

and nothing more!


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&

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...
XX:XX:XX:XX:XX:XX PhoneName


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 XX:XX:XX:XX:XX:XX 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... ;-)

5. Disconnecting

Just turn off Bluetooth or remove USB cable and sure Ctrl + C in terminal to stop vwdial process. You can also control connection with tool on your cell phone...

Hope you like it. Miha



Reblog this post [with Zemanta]