Telecom New Zealand had an offer on last Thursday, for all fixed broadband customers. You could get a T-Stick including a prepaid SIM card for free, only thing you had to do is to pay 30 bucks to buy 500MB of traffic. I couldn’t resist, especially since I just got myself a Netbook a few weeks ago, perfect fit I’d say. ;-)
There’s obviously no problem in getting the stick running in Windows 7 Starter, but I wasn’t too sure how hard it’ll be under Linux. To be honest, its quite simple!
The stick is a ZTE MF626, and it runs with different USB modes. When plugged in under Linux (Mandriva in my case), it shows up as a storage media and as a CD drive. Ah well. The storage is the builtin micro SDHC slot (I think), the CD drive contains the drivers and the autostart for Windows. Not of much use. To get it to show up as modem, the device has to switch to its modem mode. All thats needed is to install usb_modeswitch, modify the config file in /etc/usb_modeswitch.conf and enable the settings in the MF626 section. Awesome work!
All you need to do now is to run the usb_modeswitch command. The LED on the stick will turn off, and then turn on again (hopefully blue, as thats the UMTS network, green is the old and slow one). You gotta do that everytime you plugin the stick. But I’m sure I can automate that, and will update this post once I did.
Next thing is to modify the ppp configuration in (in my case) /etc/sysconfig/network-scripts/ifcfg-ppp0. I had to change the MODEMPORT to ttyUSB2, it was on ttyUSB0. Thats most likely related to the fact that the stick is 3 devices, and the third one is the actual modem. Be sure to do this every time after you plugged in the stick. Once I came up with a solution to automate this, I’ll update this post.
Now I opened the Network Center and chose the now available option GPRS/EDGE/3G / ppp0. Once you click on it, it starts scanning the network, and will hopefully show the Telecom NZ entry with a reasonabl signal strength.
Under configure I had to select the “Unlisted – edit manually” option, as there are only Vodafone entries for New Zealand… That might change over time.
The only thing that needs to get set is the APN, Access Point Name. Its value needs to be internet.telecom.co.nz.
And thats all! Click on Connect, wait a couple of seconds (you can have a peek at /var/log/messages to see whats going on), and there you go, a blinking blue LED on the stick, and a running internet connection!
This can be quite different on other distributions! But you should be able to adapt these steps to modify other setups.
Edit the file /etc/udev/rules.d/91-usb_modeswitch.rules. Modify the vendor id and the product id to match the ones from the /etc/usb_modeswitch.conf file. Once thats done, plug the T-Stick in and you’ll see that it automatically switches the USB mode, and the modem will be available.
The default ttyUSB0 instead of ttyUSB2 is a bug in Mandriva, but if you only use one 3G modem like I do, you can hack it to get it to work.
In /etc/httpd/lib/libDrakX/network/connection/cellular_card.pm there’s a function called get_tty_device. That function returns ttyUSB0 for the hso driver (don’t ask me why its named like that). All you need to do is change that to ttyUSB2, and it’ll work!
But remember, this might break other 3G modems!