Monday 7 November 2011

Get a Vodafone 3G Dongle (Huawei K3770) working on Linux (Ubuntu, Archlinux etc..)


The funny thing about my Vodafone K3770 dongle was that it took me less time to get it working with Linux - which isn't officially supported - than it did getting it working on Windows 7 - which is its  recommended Operating System!!

The first problem that you will encounter, is that the USB dongle is in "file" mode when you first plug it in. This means it is ready to be mounted with the Windows/Mac software and not actually ready to surf the web.

To prove you have this problem, connect the dongle to your computer, open a Terminal, then type:

lsusb | grep

You should get something like this:

Bus 002 Device 005: ID 12d1:14d1 Huawei Technologies Co., Ltd.

"14d1" is the product id for the file mode of this dongle, we need it to say:

Bus 002 Device 005: ID 12d1:1c05 Huawei Technologies Co., Ltd.

UPDATE: Ubuntu may describe the dongle as 14c9 instead of 1c05.

for the modem to actually work.

The remedy is simple, install usb_modeswitch.
On Ubuntu, type:

sudo apt-get install usb_modeswitch

On Arch Linux, type:

sudo pacman -Sy usb_modeswitch

This program allows you to change the mode from file to modem. Next open the config file for usb_modeswitch and add a rule to change the product id (this will happen when you start the machine up and have the dongle inserted during boot):

Edit the config file like so:

gksu gedit /etc/usb_modeswitch.conf

and add the lines to the bottom of the file:

DefaultVendor=0x12d1
DefaultProduct=0x14d1
TargetVendor=0x12d1
TargetProduct=0x1c05
CheckSuccess=20
MessageContent="55534243123456780000000000000011060000000000000000000000000000"

You can either now reboot your machine, or run:

sudo usb_modeswitch -c /etc/usb_modeswitch.conf

After you have done this, type lsusb and check that the product id has changed as expected:

Bus 002 Device 005: ID 12d1:1c05 Huawei Technologies Co., Ltd.

You now need to use something like wvdial or sakis3g* (recommended). To get you going, here is my command line that I use to get my Vodafone 3G dongle - Huawei K3770 - working on Linux:

sakis3g connect MODEM='12d1:1c05' APN='pp.vodafone.co.uk' USBDRIVER='option' USBINTERFACE='0'

and to disconnect, I use:

sakis3g disconnect

5 comments:

  1. Hi, im a newbie, how do i use sakis3g?

    ReplyDelete
  2. ! Thank you SO MUCH !

    I tried a lot of things, even betavine drivers and apps and manual package installations all day long, and finally, your solution works.

    And remember everyone, run usb_modeswitch as root! I struggled quite a bit because I forgot! :*)

    Also, usb_modeswitch didn't work the first time around (when I first used sudo), so I thought perhaps Gnome or such was occupying my K3770 as a filesystem. What I did: restarted PC, and logged into terminal (Ctrl-Alt-F1) and ran usb_modeswitch correctly from there. After that, sakis3g did the job! :D

    ReplyDelete
  3. Simply plug a vodafone dongle into the USB port of your laptop to take the internet everywhere you go. The Vodafone K3770 MBB dongle comes with 2 top ups for 250MB with a maximum of 30 days each

    ReplyDelete
  4. Awesome post! I love it.
    I get vodafone offers for online mobile recharge and dongle on freecharge at CuponsWall India.

    ReplyDelete
  5. Magicjack Support 1-800-653-4096,
    Customer Support For Magicjack
    COMPLETEPCSOLUTION is one of the best way to resolve
    all problems like magicjack technical support,
    magicjack customer suppport and installation,
    magicjack contact number.

    ReplyDelete