1 # set pin code from evnironment "$PINCODE"
12 waitfor 15 "SIM PUK","SIM PIN","READY","ERROR","ERR"
13 if % = -1 goto timeout
17 if % = 3 goto checkrepeat
18 if % = 4 goto checkrepeat
27 print "timeout checking for PIN."
36 # check if output was "SIM PIN2", that's ok.
40 print "Trying to set PIN\n"
46 if % = -1 goto pinerror
47 if % = 0 goto continue
48 if % = 1 goto pinerror
51 print "Error setting PIN, check card manually\n"
55 print "PIN set successfully\n"