LeGreenSolutions

How to .....

Install EVDO on Debian GNU Linux or Ubuntu

How to install and configure BSNL EVDO broadband with ZTE CDMA Tech - EVDO USB modem on Debian GNU/Linux (etch) or Ubuntu?

By Pramod G Menon, LeGreenSolutions

P r o c e d u r e

  1. Find The Modem, Vendor and ProdID
  2. Detect the modem using modprobe
  3. Plug in modem and see whether it has been found by using dmesg
  4. Install dialer "wvdial" if it is not already installed
  5. Configure /etc/wvdial.conf to put phone number, user name and password
  6. Connect to Internet
  7. How to detect modem automatically at start up
  8. Special Notes for ones using IPTables for Direct connection

S t e p s   i n  D e t a i l

Login as Super User or Administrator (use "su" command or Root Terminal)


STEP I Find The Modem, Vendor and ProdID
cat /proc/bus/usb/devices
S a m p l e
cat /proc/bus/usb/devices

P: Vendor=05c6 ProdID=6000 Rev= 0.00
S: Manufacturer=ZTE, Incorporated
S: Product=ZTE CDMA Tech



Note: the above command will give a list of devices connected.
Please Find your device and its Vendor and ProdID

OR directly grep it
cat /proc/bus/usb/devices | grep Vendor

will give the Lines with word "Vendor" only
These are the lines significant in my case

cat /proc/bus/usb/devices | grep Vendor
P: Vendor=05c6 ProdID=6000 Rev= 0.00

OR use command

lsusb

lsusb
Bus 001 Device 002: ID 05c6:6000 Qualcomm, Inc.


Using any of the above three you can find your EVDO modem - Vendor and ProdID

Vendor=05c6
ProdID=6000


STEP II Detect the modem using modprobe

Now use modprob to detect the modem

modprobe usbserial vendor=0x05c6 product=0x6000

Note : REMEMBER to add "0X" before your Vendor/ProdID
if Vendor=05c6 on modrpobe vendor=0x05c6
if ProdID=6000 on modrpobe product=0x6000


After Command 'modprobe' Plug the EVDO Modem to your USB port

STEP III Plug in modem and see whether it has been found by using dmesg

check the debug message using command 'dmesg'

dmesg | tail

usbserial_generic 1-3:1.0: generic converter detected
usb 1-3: generic converter now attached to ttyUSB0
usbserial_generic 1-3:1.1: generic converter detected
usb 1-3: generic converter now attached to ttyUSB1
usbserial_generic 1-3:1.2: generic converter detected
usb 1-3: generic converter now attached to ttyUSB2


from the above dmesg command, you can find the modem device
now your modem Device is ttyUSB0


STEP IV Install dialer "wvdial" if it is not already installed
use command "wvdial" for connecting to internet
if 'wvdial' not install, install using command

apt-get install wvdial

(Sorry I have to assume that you already have a net connection or some how get wvdial from your friendly open source neighbour

(You can download wvdial from http://open.nit.ca/download/wvdial-1.54.0.tar.gz

or ftp://ftp.us.debian.org/debian/pool/main/w/wvdial/wvdial_1.54.0.orig.tar.gz)




STEP V Configure /etc/wvdial.conf to put phone number, user name and passowrd
then use command 'wvdialconf' for configuring wvdial

edit the file /etc/wvdial.conf to add phonenumber, username and passwd using command 'gedit /etc/wvdial.conf'

gedit /etc/wvdial.conf

eg:
[Dialer Defaults]
Stupid Mode = on
Modem = /dev/ttyUSB0
Baud = 9216000
Init = ATZ

Phone = #777
Username = XXXXXXXXXX
Password = XXXX
New PPPD = yes



note:
BSNL User's Please check your username start with your STD code

Ernakulam(Kerala, India) user STD code - 0484
The username should be 4842345678

STEP VI Connect to Internet
Connect to Internet

use command wvdial

wvdial

now you are connected to internet :)

STEP VII How to detect modem automatically at start up

We can put modprobe in startup by adding
'usbserial vendor=0x05c6 product=0x6000' to file "/etc/modules"

gedit /etc/modules
usbserial vendor=0x05c6 product=0x6000

After this you can just plug the modem to USB and use command 'wvdial' to connect to internet

note: to run 'wvdial' as normal user, need privilege to use modem

for that go to menu (gnome)

Desktop -> Administration - > Users and Group

select the user from list and press "Properties", will pop the Properties window

go to "User Privileges" tab and
Select the option 'Connect to internet using a modem" and click OK

now this user can use command 'wvdial' to connect to internet

Special Notes for those using IPTables for Direct connection

How to share this connection using iptables


normally this connection uses interface ppp0

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

now make this machine as the gateway :)

Note : use command 'ifconfig' to find the interface after you connected to internet