Você está na página 1de 3

Review

Review

Tweaking the Tata CDMA USB Data Stick for Linux


Heres a step-by-step guide on how to use a Tata Indicom USB data stick (CDMA 1x USB modem) in Linux.
Hardware manufacturers like HP, Compaq, Acer, etc, remove PCMCIA support from entry-level laptops to drive costs down to combat the competition. Now that Tata Indicom has changed its CDMA data card technology and managed to provide the same functionality in the form of a USB stick, desktop users can also access the Internet using these cards. Unfortunately, Tata Indicom has yet to open the use of this card to the Linux community. However, as we know, Tux lovers enjoy exploring new technology. So lets see how the USB data card can be used by open source enthusiasts. Here are some easy steps to get your Tata Indicom USB data card working on your Linux laptop. For the purpose of this article, Ive used Fedora 7 as the base distribution, and you will notice how simple things really are. So lets get down to business, shall we? Open a terminal and issue the following command: iding on the increasing popularity of CDMA technology in India, Tata Indicom recently introduced a CDMA Internet card of the PCMCIA Type 1 version, targeted at professionals constantly on the move. However, since PCMCIA slots are only available with laptops, its usage is very limited.
# tail -f /var/log/message

Insert your USB data card stick in any available USB port on your desktop or laptop. Check the log that you have already opened on a terminal and keep an eye on the new lines that scroll up

12

JANUARY 2008

LINUX FOR YOU

www.linuxforu.com

CMYK

Review

Figure 1: Configuring KPPP dialer

Figure 2: Configuring modem details in KPPP

once youve connected the USB stick. Snippet 1 shows my terminal output. Snippet 1: The /var/log/message output after inserting the USB stick
Oct 27 00:08:09 OMSAI kernel: usb 1-1: new full speed USB device using uhci_hcd and address 4 Oct 27 00:08:10 OMSAI kernel: usb 1-1: device not accepting address 4, error -71 Oct 27 00:08:10 OMSAI kernel: usb 1-1: new full speed USB device using uhci_hcd and address 6 Oct 27 00:08:11 OMSAI kernel: usb 1-1: configuration #1 chosen from 1 choice Oct 27 00:08:11 OMSAI kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device Oct 27 00:08:11 OMSAI kernel: usbcore: registered new interface driver cdc_acm Oct 27 00:08:11 OMSAI kernel: drivers/usb/ class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters

To configure or recompile a kernel, install the kernel source code and execute the following code at a terminal prompt:
# make menuconfig <output truncated> ... Device Drivers USB support > >

USB Modem (CDC ACM) support Device Drivers>Network device support> PPP (point-to-point protocol) support SLIP (serial line) support ... <output truncated> .... # make # make module_install # make install

If your terminal output matches Snippet 1, then it means your system has detected the card and provided it a name ttyACM0. In case you are not able to view this information on the log window, do not worry. Issue the following command:
# dmesg | grep ttyACM

Once you are done recompiling the kernel, reboot your system using the new kernel and follow Steps 1 and 3 again. This time, if your log still does not show your device, then you need to create a device using the following command and try again.
# mknod /dev/ttyACM0 c 166 0

If this command throws up the information [cdc _acm 1-1:1.0: ttyACM0: USB ACM device], it means your system has detected the device and you are ready to configure it. However, if the command returns no results, that means your system was unable to detect the USB stick. Make sure your card is properly connected to your system and follow the procedure again. If even that does not work, then follow the somewhat tedious job of recompiling your kernel to enable USB support.

Unplug the device and re-insert it; this time you will see the message stating that the device has been recognised as ttyACM0. To make your life a bit easier, I recommend you create a symbolic link /dev/mobile to the /dev/ ttyACM0 device, as follows:
# ln -s /dev/ttyACM0 /dev/mobile

www.linuxforu.com

LINUX FOR YOU

JANUARY 2008

13

CMYK

Review

The above step is important because it is much easier to remember a device name like mobile. For example, in our case, while configuring this device using the KPPP dialer, we can point it to the /dev/mobile device. It is now time to check the permission modes of this device. To be on the safe side, use the following command and avoid any permission issues:
# chmod a+rw /dev/mobile

Launch the KPPP application and click on the Configure button to get the KPPP Configuration window. Click on the New button to get the New Account window. Now, fill in tata where it prompts for the Connection name, #777 for Phone number, and click OK. Refer to Figure 1. Back at the KPPP Configuration window, this time select the Modems tab, click on New, and fill in the details as follows: Modem name is tt; select /dev/ttyACM0 or /dev/mobile from the drop-down menu for Modem device; select Hardware[CRTSCTS] for Flow control; CR for Line termination; 115200 for Connection speed, and let the rest of the settings be as is. Click OK. (Refer to Figure 2.) Thats it! You are now ready to launch the KPPP dialer. Do not forget to ifdown your network card as follows, before launching it:
# ifconfig eth0 down

Youll notice that since you are changing the permission of a symlink, it automatically changes the file permission of the /dev/ttyACM0 device. Now create a file in the /etc/udev/rules.d/ directory called mobile.rules. Copy the following content to the file and save it:
Content: MODE==666" BUS==usb SYSFS{product}==Qualcomm CDMA

Technologies MSM* KERNEL==ttyACM* SYMLINK==mobile

You are now done installing your USB data card. So, let us now configure the connection using a dialer program like KPPP.

Connecting to the Internet is simple. On the KPPP screen, make sure that the Connect to option has tata; Login ID is internet and Password is again internet. Finally, click Connect, launch a browser and start surfing. Oh, and before I forgethappy browsing!
By: Prabind Kr Singh. The author is a Linux enthusiast

14

JANUARY 2008

LINUX FOR YOU

www.linuxforu.com

CMYK

Você também pode gostar