aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
Diffstat (limited to 'package/network')
-rw-r--r--package/network/utils/comgt/files/ussd.gcom21
1 files changed, 21 insertions, 0 deletions
diff --git a/package/network/utils/comgt/files/ussd.gcom b/package/network/utils/comgt/files/ussd.gcom
new file mode 100644
index 0000000000..c5be80b2d7
--- /dev/null
+++ b/package/network/utils/comgt/files/ussd.gcom
@@ -0,0 +1,21 @@
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CUSD=1,"
+ send $env("ussd")
+ send ",15"
+ send "^m"
+ waitfor 120 "+CUSD:"
+ if % = -1 goto timeout
+ get 1 "^m" $s
+ print $s
+ exit 0
+
+:timeout
+ print "ERROR: no USSD response, timeout.\n"
+ exit 1