Tuesday, December 25, 2007

EVDO and Linux

Hi all,

I have a (company) TSTT CCU-550 USB Modem and I'm posting this right now from an Ubuntu Live CD using it. The USB modem is really a Franklin Wireless USB modem that has support for Windows, Mac and yes, Linux (2.4 and higher I believe).

To get it to work, you first need to know your username and password. You can ask your TSTT representative (like they say on the corporate website if you have a Mac) or if you have a Windows Box with the software you can get what you need from the Modem application itself (look around in the settings and eventually you'll see a username and asterixed out password).

Your username is a number@tstt3g.co.tt and your password is your USB Modem's ESN in lowercase.

Copy the following code and save it as tstt.modem.sh

#!/bin/sh
# usb : acm
echo -e "33[32mMake Modem Device33[0m"
for i in `seq 0 2`; do
mknod /dev/ttyACM$i c 166 $i
done

echo -e "33[32mMake Dual Mode Device33[0m"
for i in `seq 0 2`; do
mknod /dev/ttyUSB$i c 188 $i
done

echo -e "33[32mMake driver rule33[0m"
/sbin/modprobe usbserial vendor=0x16d8 product=0x5511
/sbin/modprobe usbserial vendor=0x16d8 product=0x5512
/sbin/modprobe usbserial vendor=0x16d8 product=0x5513
/sbin/modprobe usbserial vendor=0x16d8 product=0x5521
/sbin/modprobe usbserial vendor=0x16d8 product=0x5522
/sbin/modprobe usbserial vendor=0x16d8 product=0x5523
/sbin/modprobe usbserial vendor=0x16d8 product=0x5531
/sbin/modprobe usbserial vendor=0x16d8 product=0x5532
/sbin/modprobe usbserial vendor=0x16d8 product=0x5533
/sbin/modprobe usbserial vendor=0x16d8 product=0x5541
/sbin/modprobe usbserial vendor=0x16d8 product=0x5542
/sbin/modprobe usbserial vendor=0x16d8 product=0x5543
/sbin/modprobe usbserial vendor=0x16d8 product=0x5551
/sbin/modprobe usbserial vendor=0x16d8 product=0x5552
/sbin/modprobe usbserial vendor=0x16d8 product=0x5553
/sbin/modprobe usbserial vendor=0x16d8 product=0x5561
/sbin/modprobe usbserial vendor=0x16d8 product=0x5562
/sbin/modprobe usbserial vendor=0x16d8 product=0x5563
/sbin/modprobe usbserial vendor=0x16d8 product=0x6011
/sbin/modprobe usbserial vendor=0x16d8 product=0x6012
/sbin/modprobe usbserial vendor=0x16d8 product=0x6013
/sbin/modprobe usbserial vendor=0x16d8 product=0x6021
/sbin/modprobe usbserial vendor=0x16d8 product=0x6022
/sbin/modprobe usbserial vendor=0x16d8 product=0x6023
/sbin/modprobe usbserial vendor=0x16d8 product=0x6511
/sbin/modprobe usbserial vendor=0x16d8 product=0x6512
/sbin/modprobe usbserial vendor=0x16d8 product=0x6513
/sbin/modprobe usbserial vendor=0x16d8 product=0x6521
/sbin/modprobe usbserial vendor=0x16d8 product=0x6522
/sbin/modprobe usbserial vendor=0x16d8 product=0x6523
/sbin/modprobe usbserial vendor=0x16d8 product=0x6531
/sbin/modprobe usbserial vendor=0x16d8 product=0x6532
/sbin/modprobe usbserial vendor=0x16d8 product=0x6533
/sbin/modprobe usbserial vendor=0x16d8 product=0x6541
/sbin/modprobe usbserial vendor=0x16d8 product=0x6542
/sbin/modprobe usbserial vendor=0x16d8 product=0x6543
/sbin/modprobe usbserial vendor=0x16d8 product=0x6551
/sbin/modprobe usbserial vendor=0x16d8 product=0x6552
/sbin/modprobe usbserial vendor=0x16d8 product=0x6553
/sbin/modprobe usbserial vendor=0x16d8 product=0x6561
/sbin/modprobe usbserial vendor=0x16d8 product=0x6562
/sbin/modprobe usbserial vendor=0x16d8 product=0x6563


While these instructions can work for almost any Linux distribution, I'll give instructions specifically for Ubuntu 7.10.

1. Make the file tstt.modem.sh executable
sudo chmod +x tstt.modem.sh


2. Run the script. You should see output like below:
ubuntu@ubuntu:~/Desktop$ sudo ./tstt.modem.sh
-e Make Modem Device
mknod
: `/dev/ttyACM0': File exists
-e Make Dual Mode Device
-e Make driver rule
ubuntu@ubuntu:~/Desktop$


Your TSTT USB modem is now seen at /dev/ttyACM0 so it's a good idea to create a link to it.

3. Create a link to /dev/modem
sudo ln -s /dev/ttyACM0 /dev/modem


Now that the modem is setup, we need to configure the username and password. Since Ubuntu comes with its own integrated front end to configuring modems, I'll use that (although I prefer gnome-ppp).

4. Use the menu and go to System -> Administration -> Network

5. Under properties for Modem, enable the connection. Set the phone number to 777. Username to number@tstt3g.co.tt and password to the ESN number you can read at the back of the unit in lowercase.

6. Under the modem tab select /dev/modem as the modem device

7. Under options check "Set Modem as default route to Internet" and "Use the Internet Service Provider Nameservers"

8. Start connecting by checking the box next to the Modem in the Network box

9. You should see a familiar blue blinking light while it logs on and establishes a connection.

If you have any trouble, you can do the configration using gnome-ppp instead and check out the log file that is generated.

Good luck (and Merry Christmas)!