5

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

5 Answers 5

6

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.

3
  • thank you very much this solution works for me in ubuntu 13.10
    – Roshan
    Dec 13, 2013 at 9:14
  • 1
    How do you get that value for MessageContent? It's not working for me! May 8, 2014 at 11:58
  • It's magic, but it works for me too. What does MessageContent really mean ? Apr 29, 2015 at 13:03
2

I had the same problem in Ubuntu 14.04.3. Finally I found a permanent solution by installing the Huawei driver. (No need to execute usb_modeswitch anymore)

Download the modified Huawei driver from this link. (The Huawei driver from official link gives some problems during installation. Check this question: Huawei Linux driver on Ubuntu 13.04)

Installation

  • Extract the archive to Desktop

    $ cd ~/Desktop

    $ tar -xvf Linux\Driver\ 4.19.19.00(Modified).tar.gz

  • Change to the extracted directory whose name is driver

    $ cd driver

  • Switch to root and make the script named install executable

    $ sudo chmod +x install

  • Install the script

    $ sudo ./install

Creating a Mobile Broadband connection

  • Go to Settings -> Network -> Mobile Broadband and click Add new connection
  • Follow the steps which involves selecting the country, operator etc.

Next time if you insert the modem it will be detected properly and you can connect to the Mobile Broadband connection you created previously by clicking the Network icon on the system tray.

Credits to: Vels

0

If you still have the problem and don't have "enable mobile broadband" as an available option. This could be similar to the problem I have had.

I installed the GUI for "modem-manager".

Then connected the dongle and ran the GUI. This found the dongle and after filling in the on screen details for supplier etc, the modem worked.

1
  • Unfortunately, even Modem manager GUI does not detect the modem.. :( Oct 27, 2013 at 2:20
0

Open your terminal and type the command:

 sudo apt-get install modemmanager

(You need a working internet connection to download this package.)

0

sandeep's answer is perfect but I just felt like adding to it , this is a way to automate the process and will work 100% of the time :

  • after following what sandeep said , copy the following into a file named foo.sh (the 'foo' part can be anything you want) and make sure to replace 140c with the product id of you ec156 lsusb

      #!/bin/bash
    
      sudo usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1\:1505 
      sudo usb_modeswitch -v 0x12d1 -p 0x140c -H -W 
      sudo wvdialconf
      wvdial
    
  • in the terminal type chmod +x foo.sh and then sudo ./foo.sh

  • it should work perfectly now , if it doesn't , and even if it does (to avoid future problems ) , open /etc/wvdial.conf (in gedit by typing sudo gedit /etc/wvdial.conf) and add Carrier Check = no at the end of the file , that's because some modems are weird and keep insisting that there is no carrier which can cause a lot of trouble.

now all you have to do every time you want to connect to the internet is to insert your modem and go to the directory where you put foo.sh and type in the terminal sudo ./foo.sh , if you run into any problems feel free to mention them in a comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .