Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Commit

Permalink
Added extra warnings about unsupported modems
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil McPhail committed Nov 24, 2013
1 parent f3dc3c3 commit 7f8cb5d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README
Expand Up @@ -9,7 +9,7 @@ Licence:
GNU GPL version 2

Version:
0.3
0.4

Requirements:
Linux
Expand Down Expand Up @@ -52,5 +52,12 @@ Troubleshooting:
Early reports suggest that some modems cannot be unlocked by this
program. When I get hold of one of these devices I will work on it.

E220 devices will not work. I don not think they will ever work with
this script.

Devices beginning "E3" are unlikely to work at this point. I hope to
support these in a future version. If you have such a device and decide
to try this script please give me feedback on the link below.

Bugs:
Please raise issues at https://github.com/mcphail/linux_huawei_unlocker
15 changes: 14 additions & 1 deletion unlocker.py
Expand Up @@ -3,7 +3,7 @@
# unlocker.py
# - Remove simlock on huawei modems
#
# Copyright (C) 2012 Neil McPhail
# Copyright (C) 2013 Neil McPhail
# neil@mcphail.homedns.org
#
# Unlock code generator Copyright (C) 2010 dogbert
Expand Down Expand Up @@ -123,6 +123,18 @@ def testImeiChecksum(imei):
alt = not alt
return (_sum % 10) == 0

# Display a warning if first digit of IMEI indicates a potentially troublesome
# modem
def checkImeiCompatibility(imei):
if ('8' == imei[0]):
print 80 * "*"
print "\n\tWarning"
print "\n\tYour modem's IMEI begins with '8'"
print "\tIt is likely to be incompatible with this script"
print "\tProceed at your own risk"
print "\n\tPlease provide feedback: see README and HELPME\n"
print 80 * "*"

# Interrogate the lock status
# Returns a dictionary with the lock status, remaining unlock attempts
# and the - largely unused - carrier code
Expand Down Expand Up @@ -205,6 +217,7 @@ def main():
exit(1)
else:
print "IMEI checksum OK."
checkImeiCompatibility(imei)

# Obtain lockstatus
try:
Expand Down

0 comments on commit 7f8cb5d

Please sign in to comment.