From 187afa2a1dbf45d02a709b36f3aa5f709ce503e3 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 28 Jan 2015 19:19:33 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44182 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/network/utils/comgt/files/runcommand.gcom | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'package/network/utils/comgt/files/runcommand.gcom') diff --git a/package/network/utils/comgt/files/runcommand.gcom b/package/network/utils/comgt/files/runcommand.gcom index ab24339dc95..e99b6f922a4 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 -- cgit v1.2.3