Monday, June 26, 2006

Getting a Lanka Bell CDMA working on Linux

Thought of bloggin on the topic as I am constantly asked about the topic. Its not that difficult to get the Bell CDMA phone working most of the time. If you have the hotplug or hald running as soon as you plugin the phone to the USB port it should get detected and the proper driver loaded.

This is how you can check if the driver was loaded properly:

Type dmesg and check the end of the output you should see something that says the ti_usb_3410 driver was loaded successfully.


# dmesg
ti_usb_3410_5052 2-1:2.0: TI USB 3410 1 port adapter converter detected


You can also check that the driver was loaded by using lsmod. The dmesg output should also tell you the USB serial port that the driver has bind itself to. (Usually /dev/ttyUSB0)

# lsmod|grep ti_usb_3410

Also make sure that the proper ppp modules have been loaded, or else you will notice that the dialer will not be able to connect to the ISP.

# lsmod|grep ppp

ppp_generic
ppp_async
ppp_deflate

To connect, I'd recommend using wvdial with stupid mode. I'm not sure if any other dialers support the stupid mode. Create the wvdial.conf script as follows.

# vi /etc/wvdial.conf

[Dialer Defaults]
Init = ATZ

[Dialer BellNet]
Modem = /dev/ttyUSB0
Phone = #777
Baud = 230400
Init1 = ATZ
Stupid Mode = 1
Dial Command = ATDT
Username = your_user_name
Password = your_password

Your ready to dial.

# wvdial BellNet

At this point, I find that sometimes the driver is unable to activate the phone's modem unless you pick up the handset and set it down. This isn't always the case but most of the time wvdial gives up because it doesn't get any respose from the modem.

If by any chance you are having trouble with the driver when you look at the dmesg output then usually upgrading the kernel to the latest should help. Otherwise you could try downloading the old driver for 2.6 and installing it manually (you need to have the kernel source)

http://gate.brimson.com/downloads/ti_usb-0.3-1.tgz

Thats it!

4 comments:

Zammi Khan said...

Hi any chance of getting this working on Ubuntu Daper (6.06).

I've already tried this on both Ubuntu Dapper and Suse 10.1, but could get it to work. Upgraded to latest version of the ti_usb driver (ver: 1.1) as well. I think this driver is designed for hot plug, but both of my distros are using udev.

Bud said...

No its not an issue with udev (it replaces devfs) or hotplug (now replaced with hald). I use udev + hald and it works.

I'm not quite sure what the problem is except to say, upgrade to 2.6.16 or higher. If you installed the latest ti_usb driver then it might work except I think you have two ti_usb_3410_5052.

Check with modprobe -l|greo ti_usb and delete the one supplied by the kernel and do a depmod -a

Anonymous said...

Hi I am using kernel 2.6...(fedora).is ther any chance and how do i upgrade or complie my kernel to support cdma(ti_usb_3410_5052).

Bud said...

Oh it seems like it might actually be a problem with udev - the device not being created by udev. Got the following advice from an Ubuntu forum post:

1. Create the folllowing file

/etc/udev/rules.d/026_ti_usb_3410.rules

2. Add the following lines to this 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'"

3. Plug in your USB Serial cable and it should create a device node as /dev/ttyUSB0

4. Configure the modem using wvdial and specify the modem as /dev/ttyUSB0