I use a Safaricom-branded Huawei E160 USB modem to connect to the Internet over 3G from my apartment in Westlands. It works great but Safaricom has locked the device so it only works on their network—an anti-consumer move they probably learned from the likes of AT&T. We have four different mobile providers in Kenya, each one of which sells their own custom-branded Huawei modems. The other providers are small fries compared to Safaricom, but they love to play catch up so they’ve locked their modems too. Wanna browse on Zain? Buy a Zain modem! Thanks for nothing…
The good thing is that there’s a booming modem unlocking industry on the Internet, but you have to be a Google ninja to wade through all the garbage results. After some creative Googling I got to the bottom of this “unlock your modem” stuff; I learned that it’s free and trivial to do, which is why I hate to see so many people getting burned by some shady “entrepreneurs” who are making a lot of money from this “service.” I unlocked my Huawei E160 in about five minutes on my Linux machine, and within another two I was browsing the net with a Zain SIM card from the Safaricom modem.
Note: I did it on Linux because I like Linux, but there’s nothing about Linux which makes it a “magical modem unlocker.” It’s true, Windows sucks, but you can do this perfectly well on Windows too (but I don’t know how, so do some creative Googling of your own).
Are you ready? All we have to do is generate an unlock code based on your modem’s IMEI, then send ONE AT command to the modem. It’s not rocket science…
Here We Go!
- Make sure the SIM card in the modem is the one from the provider (mine is Safaricom), then plug the modem in
- Generate an unlock code, two options:
- Web-based generator (put your 15-digit IMEI at the end): http://bb5.at/huawei.php?imei=351596037539337
- Another web-based calculator: http://a-zgsm.com/huawei.php
- Much cooler, a python script: huawei-unlock.py
- Send the code to the modem over serial. Here’s a quite literal step-by-step guide:
- Start up minicom:
sudo minicom -s
- Navigate to “Serial port setup” and press Enter
- Press A to set the location of your device (mine, on Ubuntu 10.04, was
/dev/ttyUSB1
) - Press Enter, then Enter again to go back to the main screen
- Press Exit to leave setup and initialize the modem
- Enter
AT^CARDLOCK="50122162"
(using the unlock code you generated earlier) and press Enter - You should see “OK”, after which point you can quit minicom by pressing CTRL-A Z Q. If you don’t see “OK” just hold off for a second and re-read the instructions, because you don’t get an infinite amount of tries for this! After 5–10 failed attempts your modem may be permanently locked to the provider who sold the modem to you…
You’re welcome, now go help out one of your fellow countrymen. Just remember, I didn’t spend all this time writing this just out so you could go rip some poor sucker off.
Also, do yourself a favor and go read Dogbert’s blog, because he’s the one who wrote the Python unlock code generator and there are a lot of great links on his site. Beyond that, I can’t remember what other resources I used… I guess they all got lost in the whirlwind aftermath of my Google kung-fu.
Update (November 27, 2011)
For what it’s worth, I’ve tested this procedure on the Swisscom-branded Huawei E1762 as well, and it’s still working. On this device you most likely want to use /dev/ttyUSB2
, as this is the DIAG port for interacting with the modem. Here’s how it worked:
AT^U2DIAG=276
OK
AT^CARDLOCK=55341785
+CME ERROR: 3
OK
AT^CARDLOCK?
^CARDLOCK: 2,10,0
The first command (AT^U2DIAG=276
) resets the modem to factory settings. The last command simply lists the status of the device’s lock, where a “1” in the first spot would mean it’s locked. Here are a few good references for more information on working with AT commands and serial devices:
Amazing! Again.
You did it!!!! Fantastic!!! Now my Swisscom modem can transform itself from being a ridiculously overpriced internet solution to a versatile (yet still ridiculously overpriced) internet solution!
Hii ni ngumu sana, nilifikiria python ni nyoka inaonekana i thought wrong. Nikikuja Kenya naweza kukutafuta unisaidie ku unlock modem yangu? Am serious, i am not very computer literate. Nitakununulia chapati skate na madodo as payment (ask your watchiee what that means) !
Si ngumu sana, nitakushow! Si lazima utumie python, tumia ile ya bb5.at! Adios
Great,I also have some funny calculator that generates the unlock code once u give it the IME of the modem. All you need is to know how to click.
I also heard someone say they used their YU line on their safaricom modem a couple of times. Thanks for that info; trust me,it is of great use to many.
No problem, the information will set you free!
Wow, this is by far the simplest method I’ve stumbled upon – And here I thought it was just for linux.
I used the web-generator, and just input the unlock code. Thanks. Hope you don’t mind, shared some info on my site: http://tiny.cc/UnlockUrModem
I definitely don’t mind, man. This information should be public anyways :). I hate to see the common mwananchi getting taken advantage of!
Thanks mate.
Unlocked my modem in Australia before leaving for Zambia with VSO for two years.
No worries with an Aussie ‘3’ branded modem with MTN Zambia now!
waw!!!!!!!! thiz iz actually amazing simplest way thanks….bigup……..and Jahbless…yah
Let’s keep movin. Now, find out how we can surf without paying a penny!
what is security code? i have imea but not security code, so i cannote progress
Daniel,
Were you prompted for a security code? Generate an unlock code with one of the methods described above and that’s all you need.
Alan
could you please show me a step by step process of unlockin.
i got the unlock key but then do i need a software to unlock the key.is Minicom-s the software i need to succesfully unlock the modem and whre can i get it.
hi,
thanx so much for the info.i used the web based calculator to get the code but when i try to connect this message appears ‘you must enter a registred network’. i have tried to create a new profile in vain coz i cant save the settings(‘user settings failed’) is all appears all the time.
kindly assist.note the safaricom has no problem registering.
I like this, I was looking for a way to free myself and found just that. It works, thanks so much Alan for the true open spirit of information sharing. In the same spirit if someone has issues figuring out or making it work I can help, at no cost
Fantastic, thanks! Workehuad perfectly on a Huawei E153. Now if only I could find a way to send USSD codes. Any ideas? AT+CUSD=1,”code”,15 doesn’t seem to work on the E153, but works perfectly with the E220 and E160. The E1551 needs 7-bit decoding, but that’s easy enough to handle with this: http://webeve.de/~cwh/huawei-ussd.pl
The E153 seems to be a different beast altogether and doesn’t work with either solution; I don’t have access to Windows and need to refill my account via ussd. I guess the trusty Nokia 1200 will handle that for the time being….
eish! the new airtel E153u-2 is tough to break. does anyone know how to get it to ask for the unlock code? i need help desperately.
Jim,
I haven’t tried the new Airtel modems, are you sure they’re Huawei? I noticed the other day that Safaricom now has some cheap ZTE ones… that might be a whole new can of worms. For what it’s worth, the dude responsible for writing the unlock-code-generating script lists that it should work for the E153… is this “E153u-2” a new model? Anyways, check here, from the source: http://dogber1.blogspot.com/2010/03/unlocker-for-huawei-modems.html
How about the orange modem, mine is a
ZTE model AC2726.
How can you unlock this? These modems don’t seem to have the IMEI number anywhere, so what to do!!!
Any help will be appreciated.
Collins
alan,
thenx alot buddy.
its definitely a huawei. (atleast thats wot it says on the back). and yes,its a new model. its one of those they were offering a few weeks ago at 1750/=. (still wish i hadn’t wasted money). this thing is totally irritating. its super-slow and it keeps disconnecting. today i actually updated my anti-virus software at 1kbps. i need to get this thing unlocked. btw, with number portability, can i transfer to another network, using my airtel sim to surf using safcom without having to unlock my modem? thenx again
@Jim,
Alan’s instructions worked perfectly for me on a Huawei E153u-1 (Tigo) in Tanzania. I rotate between Airtel, Vodacom, and Tigo SIM cards in the same modem (all up or down at various times).
If you’re on Windows instead of *NIX, try removing your SIM card and opening the dialing software that came bundled with the modem. It may prompt you for an unlock code; or you can put in the other sim card and try to connect. Whether (or when) it asks for an unlock code really depends on the software – there may even be something in one of the configuration settings. It’s hard to know for sure.
If that fails, try to find a way to issue AT-commands directly to the modem – I’m not sure what the current Windows equivalent is to minicom.
I’m on linux myself – for me, the E153u-1’s interface is on /dev/ttyUSB0.
Hope this helps,
Alex
i could nt enter code.i use e 1550 telenor sweden.
353443043206601
» Unlock: AT^CARDLOCK=”36711865″
» Flash: 34455741
tnx for help
Can the cracked dude get me into CDMA/EVDO network YU, ZAIN, ORANGE are too damn slow at 2G speeds, maybe 3G+. I rather get my stuff pap at 7.2 mbps than waiting whole evening at 128kbps that is even overated!
It’s not cracked… it’s just SIM unlocked. If the modem supports it and the network supports it then yes, you’ll go fast.
nway my sister and i have the new safaricom modems that don’t ask for the unlock code like the old ones. please help me unlock with windows
E160 351596036931899
E173 356576044597127.
thanx
please where do i enter my imei number
Awesome share. Wanted to move to safcom’s new service without buying a new modem. Works like a charm and easy too. Thanks a lot. God bless you (so u may continue making awesome posts and nuch more :)
my huawei e 160 modem produces an irritating sound after it soaked in water what should i do?
Oops… I dunno. You might have to get a long USB cable and then stick the modem inside a pillow or something hahaha.
hello kindly help me unlock this modem model e 160 the IMEI IS 351596031996392.
THANKS
Try this: 46205717
btw, there are several web-based tools to do this… did you even read this blog post?
This code was giving free from http://www.123siteweb.fr/unlockservices
The code is 46205717