www.techmind.org logo
by W.A. Steer  PhD
Back to contentsAbout...


 

3G Mobile Broadband: Huawei modems unleashed

Having spent a weekend firmware-updating, speeding up, network-unlocking, and making interoperable between computers (and a Netgear 3G Mobile Boardband router) a pair of Huawei modems, I thought it'd be useful for my reference -and maybe for yours- if I were to write up a few notes. This page is not about running dubious 'unlock' applications, but lower level manual hacks/tweaking.

3G modems

Introduction

Until now, I have had a venerable Huawei E220 modem (on Vodafone, in the UK) as my primary broadband connection, and principally used on my old Windows XP desktop computer. I have a Huawei E1752 modem (on Orange, in the UK) which I consider my 'backup' internet connection, and working on my newer Windows 7 laptop. Previous experience had shown that the Vodafone Mobile Connect and Orange software and modems were not going to coexist on one computer easily (more on that later).

To start with, the E1752 was definitely network-locked to Orange. The E220 (Vodafone) was probably network-locked, but I can't be sure.

The Vodafone connection routinely got about 1.5Mbps download and about 300kbps upload, although if the E220 was strung up in the right place to get the best signal and conditions were favourable, I got download speeds of around 2Mbps, peaking at 3.6Mbps.

The Orange connection gets 1Mbps download on a good day, only 300kps on a not-good day. Uplink never exceeds 300kbps. I think the network (base-station) infrastructure isn't very up-to-date in my location.

Speeding up the E220 - firmware update 11.117.09.04.00

I had become aware that a newer, faster firmware (11.117.09.04.00) was available for the E220, supporting HSDPA to 7.2Mbps.
Not wanting to get firmwares from dubious sites, I downloaded the firmware update from the German Vodafone site (not sure why, but the German Vodafone website seems to be a repository for firmware updates, even the UK technical-support send customers that way).

http://www.vodafone.de/business/hilfe-support/support-easybox-huawei_106487.html
You can use Google to translate the page, but the updater itself is English language anyway.

Be sure to follow the instructions closely and to remove the SIM card during the firmware update. The updater must be run from a Windows XP system.

I suspect this firmware update may have quietly unlocked the dongle too, but I can't be sure.

Anyhow - result. My download speeds now reach 4~5Mbps sustained, peaking at over 6Mbps (at quiet times when the local cell isn't heavily used). Upload is still stuck at around 300kbps, and pings around 250~270ms. The E220 only supports HSDPA (high speed downlink packet access), not HSUPA (high speed uplink packet access) which will explain why the upload speed was not improved.

Unlocking the E1752 (and other Huawei dongles)

Knowing that the E1752 (network-locked to Orange) supports HSUPA, I hoped to get my Vodafone SIM working in the E1752. (To be honest, Vodafone would probably have given me a newer dongle by now had I asked... but I never wanted to get committed to another 12-18 month contract.)

Again not liking dubious unlock applications (which might come with all kinds of malware, and/or just 'brick' the dongle), I looked for other approaches. It seems that the 8-digit 'unlock' code for Huawei modems can be mathematically/algorithmically derived from the IMEI number. While you can download questionable apps to do this, there's also a few websites which will calculate the code for free and with no-nonsense on a web-page.

I went to:

http://www.bb5.at/huawei.php?imei=xxxxxxxxxxxxxxx

where you substitute your IMEI number for the xxxxxxxxxxxxxxx in the URL.

This returns a simple page of the form

HWCALC V2.0
--------------------------------------------------------------------------------

IMEI: 123456789012345

Entsperren / Unlock: 38563052
Flashen / Flash: 61539927

(c) SERGEY/MKL 2010
Sweet. Make a note of the 8-digit unlock code.

Next you need to enter an AT command to run the unlock-code, for which you require a terminal-emulator program.

You need to run a serial (RS232-like) terminal emulator program. While you can just about get away with Windows XP's Hyperterminal, it is preferable to use a proper application such as PuTTY (available from http://www.chiark.greenend.org.uk/~sgtatham/putty/ ). PuTTY works on Windows XP and Windows 7, but you can use any reputable terminal-emulator you feel comfortable with.

Device manager

You also need to find the COM port of the modem. Use Windows' Device Manager (from System Properties, select the Hardware tab, then press the Device Manager button). Expand the Modems and the Ports (COM & LPT) branches of the tree. Normally two COM ports will be associated with the device - one is the command/control interface and the other is the data traffic. Attempt to connect to each of the relevant COM ports using the terminal emulator program - you may need to stop/close your normal mobile-broadband connection manager (Vodafone Mobile Connect etc) at this point, as otherwise it might tie up the relevant ports. You will probably need to turn on 'local echo' in your terminal emulator, otherwise you won't see what you're typing. Note that the baud-rate setting seems to be irrelevant here - leave it at 9600.

When you think you've got a connection, try entering AT+GMI and press [enter]. It should reply "huawei". Other harmless commnds to try include:

AT+GMM              (returns model)
AT+GMR              (returns firmware)
AT+CSQ              (returns some numbers relating to the signal strength)
AT+COPS?            (returns some numbers relating to the cell / operator code)
AT+COPS=?           (may take a half a minute or so - returns info on available networks)

A web-search will reveal a whole host of 'AT' modem-control commands which you can try on 3G modems.

For the unlocking part, try entering:

AT^CARDLOCK?
It should return something like
^CARDLOCK: 2,10,0
where apparently the first digit, a 2, means that the current SIM/network is not blocked by the modem. Apparently the 10 means that 10 PIN-entry tries remain.

If you now insert a 3rd party SIM (i.e. one from a network other than that to which it is locked) into the dongle at this point, and again try:

AT^CARDLOCK?
It will probably return something like
^CARDLOCK: 1,10,0
where apparently the first digit, a 1, means that the current SIM/network is blocked by the modem. Apparently the 10 means that 10 PIN-entry tries remain.

Now enter

AT^CARDLOCK="nnnnnnnn"
where nnnnnnnn is the unlock code we obtained before.
With any luck this will unlock your modem, and a repeat of
AT^CARDLOCK?
should return something like
^CARDLOCK: 2,10,0
even with the 3rd-party SIM. Congrats - it's unlocked!

I was able to prove that the device was unlocked, by making a connection to Vodafone on the (formerly Orange-locked) E1752 from a Netgear MBR624GU 3G router.

Later I was also able to make a basic 'dial up networking' connection from the newer laptop (in which I'd used the E1752 on Orange, and had all the correct drivers installed).

However, I couldn't get the E1752 to be recognised properly by the older desktop computer on which I regularly used the E220 and Vodafone Mobile Connect software. The modem 'virtual CD' would kick in and begin to start the software installer (which I cancelled), but the modem part of the device wasn't being recognised...

Huawei dongles, multiple personalities, problems... and fixes

Huawei dongles appear as multiple devices within one physical USB device: they contain the 'modem' part, a 'virtual CD' which (you can see in Windows Explorer) contains the driver/'lite' version of the connection manager software, and some like the E1752 also have a memory-card.

It appears that with some systems (motherboards?) and/or if drivers for different Huawei devices already exist on a system that not all parts of the device are registered properly by the OS. One fix is to disable everything except the modem part. (Obviously this means that you won't have access to the on-board software until/unless you re-enable it. If you normally use a 'full' version of the connection manager on your system then this won't be a problem.)

You have to do this by entering an AT command using the terminal emulator as above... on a system which does recognise the device.

AT^U2DIAG=0             (makes the device modem-only in future)
AT^U2DIAG=255           (makes the device fully-featured in future)
(other variations on the parameters will enable different permutations of the device components). ArchLinux (ref below) reckons:
AT^U2DIAG=0 - the device is only Modem
AT^U2DIAG=1 - device is in modem mode + CD ROM
AT^U2DIAG=255 - the device in modem mode + CD ROM + Card Reader
AT^U2DIAG=256 - the device in modem mode + Card Reader

Having disabled all but the modem on the E1752, it was then recognised by my Windows XP computer and immediately picked up by Vodafone Mobile Connect, and a successful connection made. On speedtest.net and a connection via Vodafone I now get ping times of 135ms, 4~5Mbps download (or more) and 1Mbps upload.

Next is to try doing the same to the E220 and see if the Windows 7 machine (with E1752 drivers installed) will then recognise it. Done...

On further investigation, the systems (both Win XP and Win 7) seem to be a bit flaky about recognising all the modem capabilities (in particular the 'modem' and COM-port interface part as opposed to the CD-ROM part) depending on which USB socket it's plugged into and maybe relative to which USB sockets have previously had drivers installed. That said, tinkering with the U2DIAG parameter seems to reset things and/or force a driver reinstall which gets things moving. Interestingly and with hindsight, this issue may be significantly behind the "error 619" error-messages which used to generate a lot of traffic on Vodafone's support forums... :-)

Epilogue

We just about got there, but it was tortuous! My modems are now network-independent and machine-independent.
Now can I have my weekend back?!

I hope you found this useful, and it enables you to fix some problems you're having in less time than it might otherwise.

Next issue is that the connection is markedly slower (e.g. 1~2Mbps instead of 3~5Mbps) if made via the standalone mobile-broadband MBR624GU router (and Ethernet) than if the dongle is plugged directly into the PC. Hmmmm... If you've come across this problem, solved it, or know whether the same issue affects the newer Netgear MBRN3000 then please email me!

I guess I also ought to write up how to manually create a dial-up netowrking connection for a USB 3G modem at some point. This is useful for testing and making connections without having the overhead of manufactures/phone-network dialler programs.


Useful sources/references


Homepage

Created: January 2012
Last modified: 15 January 2012

Source: http://www.techmind.org/3Gmbb/index.html

©2012 William Andrew Steer
andrew@techmind.org