Friday, August 28, 2009

getting BSNL-EVDO to work in linux

Device : ZTE EV-DO AC8700 800M

Product Vendor : Qualcomm, Inc.

First of all connect your device to any of the usb port. 

$ lsusb

The EVDO USB card provided by BSNL is manufactured by ZTE Corp. But when it is probed using lsusb , the device vendor will be shown as Qualcomm.


The output of lsusb looks somewhat like this : -

# lsusb
Bus 005 Device 004: ID 046d:08c6 Logitech, Inc.
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 027: ID 05c6:6000 Qualcomm, Inc.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 004: ID 0a5c:4502 Broadcom Corp.
Bus 002 Device 005: ID 0a5c:4503 Broadcom Corp.
Bus 002 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

The above output gives us the vendor id (05c6) and product id(6000)


Now we need to make sure that our linux kernel identifies this device.For that we need to insert driver module, specific to the make of the device(which is Qualcomm in our case). In order to do so we will run modprobe with the product and vendor id as

# modprobe usbserial vendor=0x05c6 product=0x6000


Thereafter we will again run lsusb and grep for qualcomm and the output shows a lot of info on bus id,device id,vendor id etc ensuring that your linux machine has accepted the device and its ready to be used. 

#lsusb -v | grep Qualcomm
Bus 003 Device 018: ID 05c6:6000 Qualcomm, Inc.
idVendor 0x05c6 Qualcomm, Inc.


Now we need to create a dialup profile which will contain our account info(username ,password etc). But prior to that we need to install wvdial. To do that simply search for wvdial in your distributions package/software manager else on your command line run :-

#sudo urpmi wvdial(mandriva)

#sudo rpm -ivh wvdial(redhat/fedora etc)

#sudo apt-get install wvdial (ubuntu)

Thereafter on the command line run the following command to generate your dialup profile :--

#wvdialconf /etc/wvdial.conf


Check the contents of your wvdial.conf file by running the following command :-

# cat /etc/wvdial.conf

[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
; Phone =
ISDN = 0
; Username =
Init1 = ATZ
; Password =
Modem = /dev/ttyUSB0
Baud = 460800


Now you need to change the phone no. to #777 .Username and password needs to be set to the EVDO number provided by BSNL.


Now you need to add another necessary line to this file.(on the next line just after the  Baud ) : ---
Stupid Mode = 1

 
***What is stupid mode
When wvdial is in Stupid Mode, it does not attempt to interpret any prompts from the terminal server. It starts pppd immediately after the modem connects. Apparently there are ISP’s that actually give you a login prompt, but work only if you start PPP, rather than logging in. Stupid Mode is disabled by default.


Now we are ready to go. Simply execute the following command on the terminal :-

#wvdial

ENJOY !!!!!