openwrtv4/package/network/utils/comgt/files/runcommand.gcom
John Crispin 623716dd43 comgt-ncm: Fix NCM protocol
This patch fixes the NCM protocol by adding the missing ifname
to the netifd script and changing one unintended "send" statement to
"print" in runcommand.gcom. It also cleans up logging and makes the
manufacturer names case-insensitive. Furthermore, comgt-ncm should
not depend on the USB-serial-related kernel modules, as the cdc-wdm
control device works without them. There is also no need to depend on
kmod-huawei-cdc-ncm, since other manufacturers (like Sony-Ericsson
and Samsung) which use other kernel modules should also be supported.

I'd appreciate if someone with Samsung or Sony-Ericsson modems could
test this, I was only able to test it with Huawei E3276, E3372 and
E353.

Signed-off-by: Matti Laakso <malaakso@elisanet.fi>

SVN-Revision: 44182
2015-01-28 19:19:33 +00:00

31 lines
516 B
Text

# run AT-command from environment
opengt
set com 115200n81
set senddelay 0.02
waitquiet 1 0.2
flash 0.1
:start
print "sending -> ",$env("COMMAND"),"\n"
send $env("COMMAND")
send "^m"
waitfor 15 "OK","ERR","ERROR","COMMAND NOT SUPPORT"
if % = 0 goto continue
if % = 1 goto error
if % = 2 goto error
if % = 3 goto notsupported
print "Timeout running AT-command\n"
exit 1
:error
print "Error running AT-command\n"
exit 1
:notsupported
print "AT-command not supported\n"
exit 1
:continue
exit 0