Archive for July, 2012

Using a Telkom Huawei modem under Ubuntu

Sunday, July 8th, 2012 | Uncategorized | No Comments

Telkom sell a wireless land-line phone build on the Huawei ETS6630 chipset. Under the hood it’s essentially a cellphone in a land-line form factor and it has a USB connector on the side that allows it to function as a USB GSM modem. However, there are a couple of obstacles to getting it running under Linux (specifically Precise):

  • When first plugged into a USB port, it’s just a USB storage device (containing the Windows drivers). It needs to be sent a special command to make its GSM modem available.
  • There is a utility for doing this (usb_modeswitch) but the version in Precise doesn’t pick up Telkom’s phone by default.

To help usb_modeswitch along, create /etc/usb_modeswitch.d/12d1:1011 containing the configuration needed for the Telkom phone:

# /etc/usb_modeswitch.d/12d1:1011
# Huawei ETS6630
TargetClass=0xff
HuaweiMode=1

The “12d1″ and “1011” are the vendor and product code that identify the device. The TargetClass tells usb_modeswitch how to recognize when the GSM modem has been activated. HuaweiMode specifies the command to send to activate the device.

Then edit /lib/udev/rules.d/40-usb_modeswitch.rules to add:

# /lib/udev/rules.d/40-usb_modeswitch.rules
# Huawei ETS6630
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1011", RUN+="usb_modeswitch '%b/%k'"

This tells udev to call usb_modeswitch when the Telkom phone is connected. Unfortunately these rules can’t just be put into /etc/udev/rules.d/ because 40-usb_modeswitch.rules includes additional actions needed to help recognize the device as a GSM modem.

If everything is working, you should now be able to restart NetworkManager and add a new Mobile Broadband connection via NetworkManager’s GUI. If things go wrong you can watch what is happening by tailing /var/log/syslog and watching what happens when you plug the Telkom phone into the USB port. Using “lsusb” and “lsusb -v” to look at what interfaces the Telkom phone is currently providing and poking the phone directly with “usb_modeswitch -v 12d1 -p 1011 -H” can also help. Note that running “usb_modeswitch” from the command-line won’t be enough to get the phone picked up as a USB serial device (that’s what all the additional rules in 40-usb_modeswitch.rules are for).

Hopefully I can get these fed back to the maintainer of the usb-modeswitch-data package and this blog post will become irrelevant. :)

Addendum: You might need to `modprobe options` and `modprobe usbserial` to get this to work (it looks like usb_modeswitch is meant to do this but my hacky additions don’t appear to get those steps to happen).

Meta

Search