Monday, January 26, 2009

How to use Reliance Data Card (ZTE modem) in linux

Reliance provides the necessary driver for windows but could not get any help in using the data card in linux from reliance web site. Spending half a day with info from various blogs I could set it up.

My operating system : Ubuntu 8.04, Data Card: Reliance, zte modem

Steps:

  • Make sure that the modem is detected by kernel.
  • Make sure that appropriate devices are created by the kernel
  • wvdialconf to get intial set up.
  • Additional commands to be inserted into the /etc/wvdial.conf file
  • You are done!

Is modem detected by kernel?

$ cat /proc/bus/usb/devices

You should get something like this:

:

T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 1.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=19d2 ProdID=fffd Rev= 0.00
S: Manufacturer=ZTE, Incorporated
S: Product=ZTE CDMA Tech
S: SerialNumber=Serial Number

C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA

:

If you do not get, this means that your modem is not recognised by linux.

If modem is not detected by linux kernel?

This section taken from Imtiaz Shabuz

sudo gedit /etc/init.d/mountdevsubfs.sh

and uncomment following lines from this file.

# Magic to make /proc/bus/usb work
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb

Now start the service

/etc/init.d/mountdevsubfs.sh start and reboot your pc.

Then check if the USB device is detected properly

cat /proc/bus/usb/devices

The above output should be shown.

Now probe for this USB device
modprobe usbserial vendor=0×19d2 product=0×fffd

Now you can type $dmesg command and see if devices are created. For me they were, /dev/ttyUSB0, /dev/ttyUSB1 and, /dev/ttyUSB.

You may better enter the following in your /etc/modules file and reboot the machine.

usbserial vendor=0×19d2 product=0×fffd

After rebooting connect the card, the devices would be present.

Modem is recognized and devices created, then?

use wvdialconf to create the initial /etc/wvdial.conf .

Edit the /etc/wvdial.conf file and fill in the following entries:

Phone = #777

Username = your_phone_number

Password = your_password

Stupid Mode = 1
(For me, it didnt work without adding Stupid Mode = 1. The reliance ppp server on the remote side does not give login prompt unless we start ppp on the local machine)

You are done!!! type wvdial and ppp interface would be ready now!!!