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
- 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: