1 # set pin code from evnironment "$PINCODE"
11 waitfor 15 "SIM PUK","SIM PIN","READY","ERROR","ERR"
12 if % = -1 goto timeout
16 if % = 3 goto checkrepeat
17 if % = 4 goto checkrepeat
26 print "timeout checking for PIN."
35 # check if output was "SIM PIN2", that's ok.
39 print "Trying to set PIN\n"
45 if % = -1 goto pinerror
46 if % = 0 goto continue
47 if % = 1 goto pinerror
50 print "Error setting PIN, check card manually\n"
54 print "PIN set successfully\n"