From 3c70077f308437281c72431223b532f6f427e1d0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 7 Jul 2010 23:58:22 +0200 Subject: add support for hso umts modems if you like to use an usb umts modem with hso chipset, this is the support for it. use following in /etc/network/interfaces: auto hso0 iface hso0 inet manual pin xxxx apn foo.bar credentials go to freewrt 1.0 supporters... --- package/comgt/files/waitready.comgt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/comgt/files/waitready.comgt (limited to 'package/comgt/files/waitready.comgt') diff --git a/package/comgt/files/waitready.comgt b/package/comgt/files/waitready.comgt new file mode 100644 index 000000000..0de4df5d4 --- /dev/null +++ b/package/comgt/files/waitready.comgt @@ -0,0 +1,34 @@ +# wait till the sim is ready +opengt + set com 115200n81 + set senddelay 0.02 + waitquiet 1 0.2 + flash 0.1 +:start + print "Waiting for SIM..." + let c=0 +:waitready + send "AT+CPIN?^m" + waitfor 2 "SIM PUK","SIM PIN","READY","ERROR","ERR" + if % = -1 goto tryagain + if % = 0 goto simready + if % = 1 goto simready + if % = 2 goto simready + if % = 3 goto tryagain + if % = 4 goto tryagain + +:tryagain + if c > 120 goto waittimeout + let c=c+2 + print "." + goto waitready + +:waittimeout + print " Timeout +" + exit 1 + +:simready + print " OK +" + exit 0 -- cgit v1.2.3