Search This Blog

Surfe.be - Banner advertising service

Installation of EC167 Modem in Ubuntu (Linux)

Step Start] Please confirm the following packages (with dependences packages) whether installed or not. To check you may executive following commands,

ZoomUltra@Citycell:~$ dpkg -s ppp
ZoomUltra@Citycell:~$ dpkg -s setserial
ZoomUltra@Citycell:~$ dpkg -s wvdial
ZoomUltra@Citycell:~$ dpkg -s wvstreams
ZoomUltra@Citycell:~$ dpkg -s usb-modeswitch

usb-modeswitch: mode switching tool for controlling "flip flop" USB devices. Several new USB devices have their proprietary Windows drivers onboard, especially WAN dongles. When plugged in for the first time, they act like a flash storage and start installing the driver from there. If the driver is already installed, the storage device vanishes and a new device, such as an USB modem, shows up. This is called the "ZeroCD" feature.

On Debian, this is not needed, since the driver is included as a Linux kernel module, such as "usbserial". However, the device still shows up as "usb-storage" by default. usb-modeswitch solves that issue by sending the command which actually performs the switching of the device from "usb-storage" to "usbserial".



Step 1] Plug-in the Huawei EC167 USB modem and open Terminal to execute the following two commands to the whether Huawei EC167 modem is identified by operating system

ZoomUltra@Citycell:~$ lsusb
Bus 003 Device 002: ID 09da:000a A4 Tech Co., Ltd Port Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 12d1:1446 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here we get vendor id (12d1) and product id (1446) of Huawei EC167 modem. However product id as 1446 means that the modem acts as a storage device rather than as a modem.



Step 2] Now, we will edit the configuration file of usb-modeswitch to work Huawei EC167 device as a modem rather than as a storage device.

ZoomUltra@Citycell:~$ sudo gedit /etc/usb_modeswitch.conf
# Huawei EC167

…..

DefaultVendor= 0x12d1

DefaultProduct= 0x1446

……

TargetVendor= 0x12d1

TargetProduct= 0x1001

……

MessageContent="55534243123456780000000000000011060000000000000000000000000000"



Step 3] Execute the following command to make applicable of changes in /etc/usb_modeswitch.conf file

ZoomUltra@Citycell:~$ sudo usb_modeswitch
* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 0.9.5 (C) Josua Dietze 2008
* Works with libusb 0.1.12 and probably other versions
Looking for target devices
No target device found
Looking for default devices
Found default devices (1)
Prepare switching, accessing latest device
Looking for active default driver to detach it
OK, driver found ("usb-storage")
OK, Driver "usb-storage" successfully detached
Setting up communication with device
Trying to send the message
OK, message successfully sent.
-> See /proc/bus/usb/devices (or call lsusb) for changes. Bye




Step 4] Now execute lsusb command again to confirm whether product id changed from 1446 to 1001.

ZoomUltra@Citycell:~$ lsusb
Bus 003 Device 002: ID 09da:000a A4 Tech Co., Ltd Port Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 12d1:1001 ONDA Communication S.p.A.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Note: if product id not changed then unplug the Huawei EC167 device and re-plug it and execute the command again.



Step 5] Now give parameters to kernel for identification of the modem and to do this use the following command

ZoomUltra@Citycell:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1001



Step 6] Execute wvdialconf command to modify the file, /etc/wvdial.conf on the basis of Huawei EC167 modem identified by kernel.

ZoomUltra@Citycell:~$ sudo wvdialconf
Editing `/etc/wvdial.conf'.
Scanning your serial ports for a modem.
….........................
…..........................
ttyUSB0<*1>: ATQ0 V1 E1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED
ttyUSB0<*1>: Speed 9600: AT -- OK
ttyUSB0<*1>: Max speed is 9600; that should be safe.
ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
…............................
Found a modem on /dev/ttyUSB0.
Modem configuration written to /etc/wvdial.conf.

ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"



Step 6] Before execute the final command we have to modify the /etc/wvdial.conf file to set phone number, user name and password based on ISP requirement

ZoomUltra@Citycell:~$ sudo gedit /etc/wvdial.conf
[Dialer citycell]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Phone = #777
ISDN = 0
Username = waps
Init1 = ATZ
Password = waps
Modem = /dev/ttyUSB0
Baud = 9600




Step End] Execute the wvdail command to get Citycell Ultra Zoom connection

ZoomUltra@Citycell:~$ sudo wvdial citycell
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!} } }=}!}$}%\}"}&} } } } }#}%B#}%}%}&hk#>}'}"}(}" !~
--> PPP negotiation detected.
--> Starting pppd at Fri Dec 3 23:01:31 2010
--> Pid of pppd: 1647
--> Using interface ppp0
--> pppd:
���[08]���[08]
--> pppd:
���[08]���[08]
--> pppd:
���[08]���[08]
--> pppd:
���[08]���[08]
--> pppd:
���[08]���[08]
--> local IP address 10.1.63.194
--> pppd:
���[08]���[08]
--> remote IP address 2.2.2.2
--> pppd:
���[08]���[08]
--> primary DNS address 117.18.224.146
--> pppd:
���[08]���[08]
--> secondary DNS address 117.18.224.147
--> pppd:
���[08]���[08]

To disconnect the Modem, just press Ctrl+C



Note: The following commands need to executive if security purpose unable to run the pppd called by wvdail in normal user mode rather than administration.

ZoomUltra@Citycell:~$ ls -l /usr/sbin/pppd
-rwsr-xr-- 1 root dip 273312 2010-03-07 09:59 /usr/sbin/pppd

ZoomUltra@Citycell:~$ sudo chmod o+x /usr/sbin/pppd

ZoomUltra@Citycell:~$ ls -l /usr/sbin/pppd
-rwsr-xr-x 1 root dip 273312 2010-03-07 09:59 /usr/sbin/pppd


Note: To check IP addresses and connection related other information then execute the following command

ZoomUltra@Citycell:~$ ifconfig
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.1.105.59 P-t-P:2.2.2.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:1 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 B) TX bytes:97 (97.0 B)

No comments:

Post a Comment

Surfe.be - Banner advertising service