comgt: add new script to send ussd request and get the answer

New script for comgt. Should help to fetch balance or any additional information with USSD.
This script uses the standard AT command which should be supported by all modems.

Run-tested on: Mikrotik wAP LTE KIT

Signed-off-by: Kirill Lukonin <klukonin@gmail.com>
[fixed from/sob]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
Kirill Lukonin 2020-03-20 14:08:52 +05:00 committed by Petr Štetiar
parent 645b1ec3e2
commit 667fbb8151

View File

@ -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