aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/comgt/files/runcommand.gcom
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-01-28 19:19:33 +0000
committerJohn Crispin <john@openwrt.org>2015-01-28 19:19:33 +0000
commit623716dd4318cd05022d5d1bb0875906ddfc12c2 (patch)
tree23a4656d291af5d8234b6263c97dedecb73d1a24 /package/network/utils/comgt/files/runcommand.gcom
parente25e6df2cf38de386cc5d06ec9b1e33ab3bce638 (diff)
downloadupstream-623716dd4318cd05022d5d1bb0875906ddfc12c2.tar.gz
upstream-623716dd4318cd05022d5d1bb0875906ddfc12c2.tar.bz2
upstream-623716dd4318cd05022d5d1bb0875906ddfc12c2.zip
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
Diffstat (limited to 'package/network/utils/comgt/files/runcommand.gcom')
-rw-r--r--package/network/utils/comgt/files/runcommand.gcom9
1 files changed, 7 insertions, 2 deletions
diff --git a/package/network/utils/comgt/files/runcommand.gcom b/package/network/utils/comgt/files/runcommand.gcom
index ab24339dc9..e99b6f922a 100644
--- a/package/network/utils/comgt/files/runcommand.gcom
+++ b/package/network/utils/comgt/files/runcommand.gcom
@@ -6,14 +6,15 @@ opengt
flash 0.1
:start
- send "sending -> "
+ print "sending -> ",$env("COMMAND"),"\n"
send $env("COMMAND")
send "^m"
- waitfor 15 "OK","ERR","ERROR"
+ 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
@@ -22,5 +23,9 @@ opengt
print "Error running AT-command\n"
exit 1
+:notsupported
+ print "AT-command not supported\n"
+ exit 1
+
:continue
exit 0