Tech Blog‎ > ‎

(Solved) Ubuntu 10.10 and Huawei E160E (12d1:140c)

lähettänyt Jukka Niiranen 8.11.2010 klo 9.59   [ 16.11.2010 klo 9.59 päivitetty ]
- 8. Nov 2010 -

Mobile Internet Dongles - I think they are some evil Chinese plan to drive us crazy. While most of the times they work nicely and straight out-of-the-box in Ubuntu, there still are times when one doesn't seem to be able to make them work no matter what! I just had the latter case with Huawei E160E and recently released Ubuntu 10.10 Maverick Meerkat. But finally I managed to find a solution how this usb stick can be made to work.

The situation at the start was that I had clean installed 64bit version of Ubuntu 10.10 on a small HP Pavilion dv2 laptop. Unlike normally the USB mobile internet dongle did not appear in Network Manager. The funny thing was that if the laptop was booted up while the mobile dongle was attached to usb port, the Network Manager did see it and everything worked just fine. But if I plugged it in during I was using the laptop - nothing!

After digging around the Internet I came across this site: http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=3307&sid=0b14471182781e0ecd4affbfa8537a40 which eventually helped me to make this dongle work.

For me the solution was at the very end of the original post:

E) Now switch the usb mode and kick the serial driver
/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/12d1:140c
modprobe -v usbserial vendor=0x12d1 product=0x140c

F) these two commands could be added to /etc/rc.local to have them execute on each reboot.

Actually all I had to do was to type in this:

modprobe -v usbserial vendor=0x12d1 product=0x140c

After that the Huawei E160E USB dongle appeared correctly in Ubuntu's Network Manager and the Internet connection was just a normal one click away. Apparently Ubuntu 10.10 includes already the usb-modeswitch and usb-modeswitch-data so no need to do anything to them. Also it did not seem to matter whether the file "/etc/usb_modeswitch.d/12d1:140c" was called or not - I tried both with it and without - only thing that mattered was the above "modprobe" -line.

You can test your system by entering this in console:

sudo modprobe -v usbserial vendor=0x12d1 product=0x140c

And if that seems to work for you also and the USB dongle turns visible to Network Manager, then just add the line (without "sudo") to /etc/rc.local -file. Nothing else to it!

Here below is also a copy of the conclusions made by Josh and Boran at www.draisberghof.de site. Thanks guys!

Boran wrote on Friday September 10, 2010:

so if I summarise the procedure (for others with thsi usb stick and older kernels...
------
a) Compile/install usb-modeswitch-1.1.4 according to:
http://www.draisberghof.de/usb_modeswitch/


apt-get install libusb-dev (needed for Ubuntu 8.04)

make install

B) likewise install usb-modeswitch-data

(also via 'make install')

C) Create a "12d1:140c" spec which corresponds to the ID showns by 'lsusb':

vi /etc/usb_modeswitch.d/12d1:140c
---
########################################################
# Huawei, newer modems
DefaultVendor= 0x12d1
DefaultProduct=0x140c
#TargetVendor= 0x12d1
#TargetProductList="1001,1406,140b,140c,1412,141b,14ac"
TargetClass=0xff
CheckSuccess=20
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
----

D) vi /lib/udev/rules.d/40-usb_modeswitch.rules

--- add on the line before Huawei E180 ----
# Huawei E180v [http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=3301]
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="140c", RUN+="usb_modeswitch '%b/%k'"
----

E) Now switch the usb mode and kick the serial driver

/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/12d1:140c
modprobe -v usbserial vendor=0x12d1 product=0x140c

F) these two commands could be added to /etc/rc.local to have them execute on each reboot.


Comments