aboutsummaryrefslogtreecommitdiffstats
path: root/package/comgt/files/setpin.gcom
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-10 12:32:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-10 12:32:29 +0000
commit405e21d16731b2764ab82aaaadcf36a813b105f7 (patch)
treec6f9a8402389a5081519b91ce62c4a8cafcb8917 /package/comgt/files/setpin.gcom
parentd0ec348ded6f715b43b396b06ccb10599b37969d (diff)
downloadupstream-405e21d16731b2764ab82aaaadcf36a813b105f7.tar.gz
upstream-405e21d16731b2764ab82aaaadcf36a813b105f7.tar.bz2
upstream-405e21d16731b2764ab82aaaadcf36a813b105f7.zip
packages: sort network related packages into package/network/
SVN-Revision: 33688
Diffstat (limited to 'package/comgt/files/setpin.gcom')
-rw-r--r--package/comgt/files/setpin.gcom55
1 files changed, 0 insertions, 55 deletions
diff --git a/package/comgt/files/setpin.gcom b/package/comgt/files/setpin.gcom
deleted file mode 100644
index 66350fe20b..0000000000
--- a/package/comgt/files/setpin.gcom
+++ /dev/null
@@ -1,55 +0,0 @@
-# set pin code from evnironment "$PINCODE"
-opengt
- set com 115200n81
- set senddelay 0.05
- waitquiet 3 0.5
- flash 0.1
-
- let c=0
-:start
- send "AT+CPIN?^m"
- waitfor 15 "SIM PUK","SIM PIN","READY","ERROR","ERR"
- if % = -1 goto timeout
- if % = 0 goto ready
- if % = 1 goto setpin
- if % = 2 goto ready
- if % = 3 goto checkrepeat
- if % = 4 goto checkrepeat
-
-:checkrepeat
- inc c
- if c>3 goto pinerror
- waitquiet 12 0.5
- goto start
-
-:timeout
- print "timeout checking for PIN."
- exit 1
-
-:ready
- print "SIM ready\n"
- goto continue
- exit 0
-
-:setpin
- # check if output was "SIM PIN2", that's ok.
- waitfor 1 "2"
- if % = 0 goto ready
-
- print "Trying to set PIN\n"
- send "AT+CPIN=\""
- send $env("PINCODE")
- send "\"^m"
-
- waitfor 20 "OK","ERR"
- if % = -1 goto pinerror
- if % = 0 goto continue
- if % = 1 goto pinerror
-
-:pinerror
- print "Error setting PIN, check card manually\n"
- exit 1
-
-:continue
- print "PIN set successfully\n"
- exit 0