Sunday, April 13, 2008

Huawie ETS 1000 on Linux

My CDMA dial-up Internet connection at home has been driving me insane for months. I have both Windows XP and Ubuntu Linux installed on my PC. From the two operating systems I prefer to use Linux for all my academic work, development work and documentation stuff. The purpose of having Windows is simply to play computer games. But unfortunately up to now I have never been able to connect to the Internet from Linux using the dial-up connection.

My CDMA dial-up connection is made using a Huawie ETS 1000 wireless terminal and the installation disk I got from my ISP had only Windows drivers. So ironically I had to use Windows to surf the Internet from home since Linux didn't seem to treat the wireless terminal nicely. Not to mention that this was rather silly and painful because every time I had to search the Internet for something during my day to day work I had to shutdown Linux and start Windows on my PC.

Recently I realized that I never really looked for an answer to this ridiculous problem. After searching for a solution on Google for a few minutes I understood that the answer has been lying right under my nose for about ten months. Apparently one my friends had already discovered a workaround for the problem and he had published the solution on his blog on last June.

Moral of the story – 'Discuss your technical issues openly with your friends. They may have already solved them.'

The solution my friend Mohanjith had found worked for me and some of the comments made on his blog suggest that it had worked for many others as well. So I thought of sharing it since I'm pretty sure there could be lot of others like me who have trouble getting connected to the Internet using CDMA dial-up connections on Linux. In Sri Lanka of course almost all the ISPs that offer CDMA based Internet connections provide their clients with Huawie ETS 1000 wireless terminals. Let this be a walkthrough to those who have trouble getting connected to the Internet using CDMA dial-up connections on Linux.

Let's Roll
Start by checking the Linux kernel version installed on your computer. It has to be above 2.6.*. You may check the kernel version by entering the command uname -a on your console.
$ uname -a
Linux hiranya-laptop 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 i686 GNU/Linux

Step 1:
If that condition is met simply plug in the USB cable coming from your Huawie terminal to your PC. Then type in dmesg -c on the console. You might have to become the super user for this command to execute. On Ubuntu of course you can make use of sudo. However executing this command will throw out a bunch of text on the console. Try to see if you can find the following couple of lines among the text.
ti_usb_3410_5052 1-1:2.0 : TI USB 3410 1 port adapter converter detected
usb 1-1: TI USB 3410 1 port adapter converter now attached to /dev/ttyUSB0
If you can find them you are lucky. Your wireless terminal is installed and ready to use. Simply proceed to step 3. But if you find the following couple of lines instead you got some work to do.
ti_usb_3410_5052 1-1:1.0: TI USB 3410 1 port adapter converter detected
ti_usb_3410_5052: probe of 1-1:1.0 failed with error -5
Problem here is with the connector cable that hooks the Huawie terminal up with your PC. No need to panic. Let's take care of this problem.

Step 2:
Create a new rules file called 026_ti_usb_3410.rules in your /etc/udev/rules.d directory. You will have to become the super user to create a new file in this directory. Using your favorite text editor add the following entries in the newly created file.
#TI USB 3410
SUBSYSTEM=="usb_device" ACTION=="add" SYSFS{idVendor}=="0451",SYSFS{idProduct}=="3410" \
SYSFS{bNumConfigurations}=="2" \
SYSFS{bConfigurationValue}=="1" \
RUN+="/bin/sh -c 'echo 2 > /sys%p/device/bConfigurationValue'"
Once done save and close the file. Now disconnect the USB cable from the Huawie terminal and plug it in again. Enter dmesg -c command in your console and inspect the output. If you have done everything right so far you should be able to locate the following lines in the output.
ti_usb_3410_5052 1-1:2.0: TI USB 3410 1 port adapter converter detected
usb 1-1: TI USB 3410 1 port adapter converter now attached to /dev/ttyUSB

That's it!! Your computer is now ready to go on-line with your CDMA dial-up connection.

Step 3:
Become the super user and edit the /etc/wvdial.conf file of your PC accordingly. My configuration is as follows.
[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 230400
Phone = your-isp-phone-number
Init1 = ATZ
Stupid Mode = 1
Dial Command = ATDT
Username = your-username
Password = your-password
New PPPD = yes
PPPD Options = crtcts multilink usepeerdns lock defaultroute
Now try to get connected by entering the command wvdial pctl. You might have to execute this command as the super user.
There may be issues with name servers. In such a situation you will have to configure the name servers in the /etc/resolv.conf file. The name server IPs can be found from the console output when wvdial is trying to connect to your ISP.
WvDial<*1>: local IP address
WvDial<*1>: pppd: ��[06][08]
WvDial<*1>: remote IP address
WvDial<*1>: pppd: ��[06][08]
WvDial<*1>: primary DNS address
WvDial<*1>: pppd: ��[06][08]
WvDial<*1>: secondary DNS address
WvDial<*1>: pppd: ��[06][08]

No comments: