Ubuntu – configuring USB modem( Huawei EC156) in ubuntu 13.10

huaweiusb-modem

I am facing difficulty in installing my USB modem in Ubuntu 13.10. Contrary to what many have suggested,it does not get detected automatically, nor does setting a new connection help.
USB Device is listed in lsusb, but not under network manager or Devices, it is detected as a CD-ROM, what I understood from the web was that usb-modeswitch can be used to switch it to a USB device. Even 'Enable Mobile Broadband' option is not shown in network manager.

What was interesting is when I start laptop with windows 7 and use the USB modem and after that restart with Ubuntu, both Enable Broadband and the mobile broadband connection can be seen. Sadly, internet connection could not be installed.

I tried using USB-modeswitch command as suggested somewhere, but it does not seem to work. Following is the message.

Take all parameters from the command line 


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.0.1 (C) Josua Dietze 2013
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1505
HuaweiMode=1
NeedResponse=0

InquireDevice enabled (default)

Look for default devices ...
  found USB ID 8087:0020
  found USB ID 1d6b:0002
  found USB ID 0461:4db6
  found USB ID 12d1:1505
   vendor ID matched
   product ID matched
  found USB ID 138a:0007
  found USB ID 03f0:231d
  found USB ID 8087:0020
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration ...
 OK, got current device configuration (1)
Use interface number 0
Use endpoints 0x08 (out) and 0x87 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
 OK, driver detached
 INQUIRY message failed (error -9)

USB description data (for identification)
-------------------------
Manufacturer: HUA?WEI TECHNOLOGIES
     Product: HUAWEI Mobile
  Serial No.: ???????????????????
-------------------------
Send old Huawei control message ...
-> Run lsusb to note any changes. Bye!

I am stuck with this problem for 4 days now, any help would be appreciated

Best Answer

After so much pain, the following post by Jaydeep worked.

http://ubuntuforums.org/showthread.php?t=1814583

Will still post the answer below.

Check the name of your USB device by running the following command on Terminal

lsusb

type the following to go to usb_modeswitch.d folder

cd /etc/usb_modeswitch.d

create a config file (.conf) using the following command.

sudo gedit

Copy and paste the following to the file and save.

DefaultVendor= 0x12d1 
DefaultProduct=0x1505 

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

Keep in mind that the12d1 and 1505 in DefaultProduct and DefaultVendor values are as per the output received in lsusb for your Huawei device.

Save the file as 12d1:1505. ( any other name should also work !!)

Run usb_modeswitch command as below.

sudo usb_modeswitch -I -W -c 12d1\:1505

Device should get detected, please add new connection and see if it is connected.

If not, please restart, run the same usb_modeswitch command again and see if it is working ! ( For me, it worked after restart )

Note, to make it work, you have to run the usb_modeswitch command every PC starts, to avoid it, a script may be used.

Related Question