# initialize the EC200 serial modem
opengt
 set com 115200n81
 set senddelay 0.05
 waitquiet 3 0.5
 flash 0.1

 let c=0
:start
 send "AT+ROUTEIP=192.168.250.1^m"
 waitfor 5 "OK"
 if % = -1 goto retry
 if % = 0 goto ready

:retry
 inc c
 if c > 10 goto timeout
 waitquiet 12 0.5
 goto start

:timeout
 print "timeout when set route ip"
 exit 1

:ready
 send "AT+RESET^m"
 print "set Route IP READY"

 exit 0
