{"id":82,"date":"2012-07-08T18:24:13","date_gmt":"2012-07-08T18:24:13","guid":{"rendered":"http:\/\/hodgestar.za.net\/blog\/?p=82"},"modified":"2012-07-09T17:46:59","modified_gmt":"2012-07-09T17:46:59","slug":"using-a-telkom-huawei-modem-under-ubuntu","status":"publish","type":"post","link":"http:\/\/hodgestar.za.net\/blog\/2012\/07\/using-a-telkom-huawei-modem-under-ubuntu\/","title":{"rendered":"Using a Telkom Huawei modem under Ubuntu"},"content":{"rendered":"<p>Telkom sell a wireless land-line phone build on the Huawei ETS6630 chipset. Under the hood it&#8217;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):<\/p>\n<ul>\n<li>When first plugged into a USB port, it&#8217;s just a USB storage device (containing the Windows drivers). It needs to be sent a special command to make its GSM modem available.<\/li>\n<li>There is a utility for doing this (usb_modeswitch) but the version in Precise doesn&#8217;t pick up Telkom&#8217;s phone by default.<\/li>\n<\/ul>\n<p>To help usb_modeswitch along, create\u00a0\/etc\/usb_modeswitch.d\/12d1:1011 containing the configuration needed for the Telkom phone:<\/p>\n<pre># \/etc\/usb_modeswitch.d\/12d1:1011\r\n# Huawei ETS6630\r\nTargetClass=0xff\r\nHuaweiMode=1<\/pre>\n<p>The &#8220;12d1&#8221; and &#8220;1011&#8221; 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.<\/p>\n<p>Then edit\u00a0\/lib\/udev\/rules.d\/40-usb_modeswitch.rules to add:<\/p>\n<pre># \/lib\/udev\/rules.d\/40-usb_modeswitch.rules\r\n# Huawei ETS6630\r\nATTRS{idVendor}==\"12d1\", ATTRS{idProduct}==\"1011\", RUN+=\"usb_modeswitch '%b\/%k'\"<\/pre>\n<p>This tells udev to call usb_modeswitch when the Telkom phone is connected. Unfortunately these rules can&#8217;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.<\/p>\n<p>If everything is working, you should now be able to restart NetworkManager and add a new Mobile Broadband connection via NetworkManager&#8217;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 &#8220;lsusb&#8221; and &#8220;lsusb -v&#8221; to look at what interfaces the Telkom phone is currently providing and poking the phone directly with &#8220;usb_modeswitch -v 12d1 -p 1011 -H&#8221; can also help. Note that running &#8220;usb_modeswitch&#8221; from the command-line won&#8217;t be enough to get the phone picked up as a USB serial device (that&#8217;s what all the additional rules in\u00a040-usb_modeswitch.rules are for).<\/p>\n<p>Hopefully I can get these fed back to the maintainer of the usb-modeswitch-data package and this blog post will become irrelevant. :)<\/p>\n<p><strong>Addendum:\u00a0<\/strong>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&#8217;t appear to get those steps to happen).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Telkom sell a wireless land-line phone build on the Huawei ETS6630 chipset. Under the hood it&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":8,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":90,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/posts\/82\/revisions\/90"}],"wp:attachment":[{"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hodgestar.za.net\/blog\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}