Advertise

Saturday, October 31, 2009

Reliance USB Data Card (Huawei) on Ubuntu HowTo

This is a quick way to setup huawei usb data card with reliance connection on ubuntu 8.04 hardy Ram kumar

1. Connect the reliance usb modem and check if its been recognized by the kernel.
$ cat /proc/bus/usb/devices
you’ll see something like this.
T: Bus=02 Lev=01 Prnt=01 Port=05 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=12d1 ProdID=1001 Rev= 0.00
S: Manufacturer=Huawei Technologies
S: Product=Huawei Mobile
S: SerialNumber=HUAWEI EC3X1
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=pl2303
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
E: Ad=8a(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=0b(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=pl2303
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
2. Modprobe the driver
$ modprobe usbserial vendor=0×12d1 product=0×1001
verify dmesg
$ dmesg
[ 2315.412106] usbcore: registered new interface driver usbserial
[ 2315.412508] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[ 2315.461938] usbcore: registered new interface driver usbserial_generic
[ 2315.461945] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[ 2315.480382] drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
[ 2315.480414] pl2303 2-6:1.0: pl2303 converter detected
[ 2315.480608] usb 2-6: pl2303 converter now attached to ttyUSB0
[ 2315.480620] pl2303 2-6:1.1: pl2303 converter detected
[ 2315.480691] usb 2-6: pl2303 converter now attached to ttyUSB1
3. Edit /etc/wvdial.conf add the entries provided in the sample file.
or replace the original one with it if there is nothing setup.
It will create a connection called “cdma”
Add the following lines to /etc/wvdial.conf
#/etc/wvdial.conf
[Modem0]
Modem = /dev/ttyUSB0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
FlowControl = Hardware (CRTSCTS)
[Dialer cdma]
Username =
Password =
Phone = #777
Stupid Mode = 1
Inherits = Modem0
The following things automate recognizing and adding your card everytime you plug it in.
5. Edit/add this file /etc/hotplug/usb/datacard.usermap with following contents
# /etc/hotplug/usb/datacard.usermap
# Huawei EC321 CDMA data card
datacard 0×0003 0×12d1 0×1001
6. Edit/Add /etc/hotplug/usb/datacard . make it executable (chmod +x) . Add the following lines to
it.
#!/bin/bash
#This script goes to ” /etc/hotplug/usb/datacard “
# used to run modprobe when the usb cable is connected
SED=/bin/sed
if [ "$ACTION" = "add" ] && [ -f "$DEVICE" ]
then
VENDOR=”`echo “$PRODUCT” | $SED “s/^\(.*\)\/.*\/.*$/\1/”`”;
PRODUCT_ID=”`echo “$PRODUCT” | $SED “s/^.*\/\(.*\)\/.*$/\1/”`”;
modprobe usbserial “vendor=0x$VENDOR” “product=0x$PRODUCT_ID”
fi

No comments:

Post a Comment