freewrt_1_0
freewrt_2_0
|
Last change
on this file since ff48fe6 was ff48fe6, checked in by Markus Wigge <markus@…>, 19 years ago |
- added small script to be started at first on if-pre-up for umts
to wait for SIM to get ready. Otherwise in some situations we
got "SIM ERROR"
git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@2122 afb5a338-a214-0410-bd46-81f09a774fd1
|
-
Property mode
set to
100644
|
|
File size:
527 bytes
|
| Line | |
|---|
| 1 | # wait till the sim is ready
|
|---|
| 2 | opengt
|
|---|
| 3 | set com 115200n81
|
|---|
| 4 | set senddelay 0.02
|
|---|
| 5 | waitquiet 1 0.2
|
|---|
| 6 | flash 0.1
|
|---|
| 7 | :start
|
|---|
| 8 | print "Waiting for SIM..."
|
|---|
| 9 | let c=0
|
|---|
| 10 | :waitready
|
|---|
| 11 | send "AT+CPIN?^m"
|
|---|
| 12 | waitfor 2 "SIM PUK","SIM PIN","READY","ERROR","ERR"
|
|---|
| 13 | if % = -1 goto tryagain
|
|---|
| 14 | if % = 0 goto simready
|
|---|
| 15 | if % = 1 goto simready
|
|---|
| 16 | if % = 2 goto simready
|
|---|
| 17 | if % = 3 goto tryagain
|
|---|
| 18 | if % = 4 goto tryagain
|
|---|
| 19 |
|
|---|
| 20 | :tryagain
|
|---|
| 21 | if c > 120 goto waittimeout
|
|---|
| 22 | let c=c+2
|
|---|
| 23 | print "."
|
|---|
| 24 | goto waitready
|
|---|
| 25 |
|
|---|
| 26 | :waittimeout
|
|---|
| 27 | print " Timeout
|
|---|
| 28 | "
|
|---|
| 29 | exit 1
|
|---|
| 30 |
|
|---|
| 31 | :simready
|
|---|
| 32 | print " OK
|
|---|
| 33 | "
|
|---|
| 34 | exit 0
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.