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