Wednesday, August 26, 2009

ZeroCD broadband modem

Just a quick note. Recently my father asked me to get a broadband modem to work again after I installed Ubuntu on his computer. The modem was basically a rectangular black stick. The only brand it wrote on it was CSL. And when you plugged it in, it showed up as a thumb drive. This was expected behaviour in Windows because then they'd click on the driver installation of the thumb drive. Once the driver is installed it would detect and register the modem. I had no idea what was supposed to be done with it to make it work. Untill I ran `lsusb` to get the vendor & product number. Vendor was 0x1c9e and product was 0x1001. And I actually googled THAT.

And then I within those pages I found this gem. The post clued me into a utility called usb-modeswitch which can actually switch the modes of the detected usb device. A search of ubuntu packages I found a deb for karmic. Eventhough the computer is Jaunty but it seems the package works. I had to modify the installed /etc/usb_modeswitch.conf and /etc/udev/rules.d/usb_modeswitch.rules so that it would enable the modem device (use the vendor & product number, just uncomment the right one). The udev rules also needed to add so that it would load the usbserial module when it detects the modem. But the problem with Jaunty is that the module is already compiled in and cannot be unloaded and loaded. So I actually had to modify the kernel line in /boot/grub/menu.lst to have 'usbserial.vendor=0x1c9e usbserial.product=0x6061' (the device change from 1001 to 6061) to make it work (according to the notes in a bug report, this behaviour has been reversed. So insyaAllah in Karmic it would be a module once more). So once it detected the modem on ttyUSB0,1,2 I was able to use wvdial to connect to celcom's broadband. Contents of /etc/wvdial.conf is:

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem = /dev/ttyUSB0
Phone = *99#
Idle Seconds = 300
Modem Type = Analog Modem
Stupid Mode = 1
Baud = 460800
Auto DNS = 1
Dial Command = ATDT
Ask Password = 0
ISDN = 0
Username = 'Celcom'
Password = 'Celcom'

And then to connect to celcom I just had to plug in the modem. And run:

sudo wvdial

And it would connect.

No comments:

Haiya ala Solah