USB_Modeswitch (Ubuntu systems)

Few week ago, i bought a Internet Key – 3G modem USB, because the one provided by Vodafone stop working (was a Huawei 3G modem).
The new modem is a TP-LINK 3G modem USB (all the feauters here http://www.tp-link.it/products/details/?model=MA180).
450x270
So i connected the modem to the usb port, but on my Ubuntu i686 the device is not automatically recognized by the Ubuntu Network Manager.
Then, i search on Google, and i found the USB_modeswitch project, that is (as reported in the site) “(surprise!) a mode switching tool for controlling “flip flop” (multiple device) USB gear.

So, from the forum of the project and from other results online, i found a configuration that run on my pc, with Ubuntu 12.04.2 LTS i686 and Unity.

 

1ST STEP: prepare the system

The usb-modeswitch needs the libusb and libudev package to run, and the system must not have another usb-modeswitch installed.

$ sudo apt-get install libusb-dev
$ libusb-config –version

(it is needed at least the version 0.1.12)

$ sudo apt-get remove usb-modeswitch
$ sudo apt-get install libudev0 libudev-dev

 

2ND STEP: download and compile the sources

The program source, device database and device references can be downloaded from the page of the project, from these links:

Then, they must be extracted from their archives and installed with the make command (build by the Makefile present in every folder).
Note that these installations need the tcl package already installed in the system. (otherwise see other methods in README file)

$ sudo apt-get install tcl
$ bunzip2 usb-modeswitch-1.2.5.tar.bz2 && tar xvfp usb-modeswitch-1.2.5.tar
$ bunzip2 usb-modeswitch-data-20121109.tar.bz2 && tar xvfp usb-modeswitch-data-20121109.tar

$ su
# cd usb-modeswitch-1.2.5
# make install
# cd ../usb-modeswitch-data-20121109
# make install

 

3TH STEP: configure the system

Now, the system still doesn’t recognize the device as a modem.
Then, the configure file usb_modeswitch.conf must be modified, with changing EnableLogging=1 (default value is 0) to enable the log of the device.

Then to automate the execution of usb_modeswitch, we need to add a command at the end of the file rc.local.

$ sudo nano /etc/rc.local

sudo modprobe usbserial vendor=0x2357 product=0x0201

 

 

Finally my device is working properly!!!!

The Ubuntu Network Manager recognizes a new 3G device, and shows the option “Enable Mobile Broadband“. So the configuration of the new connection is standard:

  • Edit Connections
  • Mobile Broadband
  • Add
  • select your device in the combo-box
  • Continue, select your Country and Continue
  • select your provider and Continue
  • if it appears the choose of the billing plan, select your plan or write it
  • then Continue and Apply
  • (in some cases, the provider may want the PIN to connect: must be entered in the appropriate field in the editing window of the connection)

 

So I’m finally connected to my provider “Vodafone Italy” (yuppi!!) and I’m connected to internet by the mobile broadband connection!!

Enjoy!!  ;o)

Advertisements

12 Responses to USB_Modeswitch (Ubuntu systems)

  1. alessandro says:

    it doesn’t work in my case… i’m trying running ob ubuntu server, last versione. Have u got any other suggestion?
    thanks

  2. fcastagnotto says:

    I’m discussing the problem on the forum of the author of modeswitch: the original setup doesn’t require the “3th step”, but only the compilation of the sources of the module. It seems that the change of “rc.local” is not only not required, but also wrong. On my pc, without that change the dongle doesn’t work, but on another pc I tried the standard procedure and the device correctly start only after the second insertion on the usb port.
    These type of problems I think that are related to the various type of hardwares presents on the pcs.

    So, if you are using a Ubuntu version 12.04 or later, check that you have removed the default version of modeswitch present in Ubuntu; then check that the libusb and libusdev are at least the version 0.1.12, and that tcl is correctly installed.

    If your dongle doesn’t work after these controls, I don’t know which can be the problem.
    If you got some errors, you can post them here (with the Ubuntu system version + kernel version, type of pc, and device code).

  3. Aidan Hannigan says:

    I was up and running in 5 minutes. Thank you!!

  4. vivek says:

    The latest drivers didn’t working in linux mint. But the versions specified in this article works fine. It was good and running in 5 mins. Great Article!!

  5. nicola says:

    hi! is it possible to install on a macosx?

    • fcastagnotto says:

      I don’t know, I don’t have any Apple OS to try it, but this process works on “USB_modeswitch” that is a program for OSs linux-based: so, you must verify if the XNU kernel supports this module and then you can try if this process works also on the Darwin OS.

  6. Pingback: USB_Modeswitch (Ubuntu systems) | Ragnarok Connection

  7. Pingback: USB_Modeswitch (Ubuntu methods) | Ragnarok Connection

  8. yaron says:

    Hi,
    can yoy fix the links:
    usb-modeswitch source
    usb-modeswitch data
    Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: