Wednesday, June 30, 2010

How to: Debian and nokia smartphone as modem

The following has been tested for Debian Testing (Squeeze), Nokia E51 and usb connection.

You will need to install wvdial (#apt-get instal wvdial). Then add the following lines to /etc/wvdial.conf (create it if it does not already exist)

[Dialer vfuk]
Modem = /dev/ttyACM0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Password = web
Username = pass
Phone = *99#
Stupid Mode = 1
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","Internet"

Note that you should adjust the password, username and access point ("Internet") (under Init3) to comply with your mobile network settings. The settings above are for Vodafone UK. For example, for Cosmote Greece the configuration file should look like this:

[Dialer cote]
Modem = /dev/ttyACM0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Password = user
Username = pass
Phone = *99#
Stupid Mode = 1
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","Internet"

Before trying to connect to the internet, stop any network connection manager (e.g. wicd, #/etc/init.d/wicd stop) and disable the rest of the network interfaces (e.g. ifconfig wlan0 down). This is to ensure that all the network traffic will be routed via the mobile phone.

Finally in order to connect run: wvdial vfuk (replace vfuk with the name of the dialer specified in the configuration file). Confirm that this connection is actually used by viewing the routing table information (route -n).


No comments: