<div dir="ltr">This is not working with Huawei E3276, only "<span style="font-size:12.8px">option pdptype 'IP' works, IPV6 and IPV4V6... I do not have IPv6 offered from ISP currently, should it matter. At attachment there is clips from the log using each option type, most important clip here, same for IPV4V6 (aka no option set):</span><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">Sun Sep 20 20:32:10 2015 daemon.notice netifd: wan (2935): sending -> AT+CGDCONT=1,"IPV6","opengate"</span></div><div><span style="font-size:12.8px">Sun Sep 20 20:32:11 2015 daemon.notice netifd: wan (2935): Error running AT-command</span></div><div><span style="font-size:12.8px">Sun Sep 20 20:32:11 2015 daemon.notice netifd: wan (2935): Failed to initialize modem</span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">There is also some random other errors seen on log on _working_ connection, I don't know do they bear any importance, as system works. Anything I could do to make it work so that it wouldn't at least fail?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> Sami Olmari</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">P.S. I've updated wiki with this new option information :)</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 7:06 PM, Matti Laakso <span dir="ltr"><<a href="mailto:malaakso@elisanet.fi" target="_blank">malaakso@elisanet.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By setting the option pdptype to IP, IPV6 or IPV4V6 the user can<br>
choose the context type between IPv4, IPv6 and dual stack,<br>
respectively. The default setting is dual stack, except if option<br>
ipv6=0 is specified, in which case IPv4 context is the default.<br>
This allows for an out-of-the-box IPv6 support with modems<br>
utilizing NCM-like protocols.<br>
<br>
While we are at it, also add commands for Sierra DirectIP modems<br>
(currently untested), which will allow us to drop the separate<br>
comgt-directip package (once tested and verified working).<br>
<br>
Signed-off-by: Matti Laakso <<a href="mailto:malaakso@elisanet.fi">malaakso@elisanet.fi</a>><br>
---<br>
package/network/utils/comgt/Makefile | 2 +-<br>
package/network/utils/comgt/files/ncm.json | 26 +++++++++++++++++----<br>
package/network/utils/comgt/files/ncm.sh | 36 ++++++++++++++++++++++--------<br>
3 files changed, 50 insertions(+), 14 deletions(-)<br>
<br>
diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile<br>
index 18085a6..716bbbf 100644<br>
--- a/package/network/utils/comgt/Makefile<br>
+++ b/package/network/utils/comgt/Makefile<br>
@@ -9,7 +9,7 @@ include $(TOPDIR)/<a href="http://rules.mk" rel="noreferrer" target="_blank">rules.mk</a><br>
<br>
PKG_NAME:=comgt<br>
PKG_VERSION:=0.32<br>
-PKG_RELEASE:=25<br>
+PKG_RELEASE:=26<br>
<br>
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz<br>
PKG_SOURCE_URL:=@SF/comgt<br>
diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json<br>
index ea4f984..d1f8699 100644<br>
--- a/package/network/utils/comgt/files/ncm.json<br>
+++ b/package/network/utils/comgt/files/ncm.json<br>
@@ -6,7 +6,8 @@<br>
"ATQ0",<br>
"ATV1",<br>
"ATE1",<br>
- "ATS0=0"<br>
+ "ATS0=0",<br>
+ "AT+CGDCONT=1,\\\"${pdptype}\\\",\\\"${apn}\\\""<br>
],<br>
"modes": {<br>
"preferlte": "AT^SYSCFGEX=\\\"030201\\\",3fffffff,2,4,7fffffffffffffff,,",<br>
@@ -25,7 +26,7 @@<br>
"AT+CGREG=2",<br>
"AT+CFUN=5",<br>
"AT+MODESELECT=3",<br>
- "AT+CGDCONT=1,\\\"IP\\\",\\\"${apn}\\\""<br>
+ "AT+CGDCONT=1,\\\"${pdptype}\\\",\\\"${apn}\\\""<br>
],<br>
"modes": {<br>
"umts": "AT+CHANGEALLPATH=1"<br>
@@ -33,10 +34,27 @@<br>
"connect": "AT+CGATT=1",<br>
"disconnect": "AT+CGATT=0"<br>
},<br>
- "sony": {<br>
+ "sierra wireless, incorporated": {<br>
"initialize": [<br>
"AT+CFUN=1",<br>
- "AT+CGDCONT=1,\\\"IP\\\",\\\"${apn}\\\"",<br>
+ "AT+CGDCONT=1,\\\"${pdptype}\\\",\\\"${apn}\\\"",<br>
+ "AT$QCPDPP=1${auth:+,$auth}${password:+,\\\"$password\\\"}${username:+,\\\"$username\\\"}"<br>
+ ],<br>
+ "modes": {<br>
+ "preferlte": "AT!SELRAT=07",<br>
+ "preferumts": "AT!SELRAT=05",<br>
+ "lte": "AT!SELRAT=06",<br>
+ "umts": "AT!SELRAT=01",<br>
+ "gsm": "AT!SELRAT=02",<br>
+ "auto": "AT!SELRAT=00"<br>
+ },<br>
+ "connect": "AT!SCACT=1,1",<br>
+ "disconnect": "AT!SCACT=0,1"<br>
+ },<br>
+ "sony ericsson": {<br>
+ "initialize": [<br>
+ "AT+CFUN=1",<br>
+ "AT+CGDCONT=1,\\\"${pdptype}\\\",\\\"${apn}\\\"",<br>
"AT*EIAAUW=1,1,\\\"${username}\\\",\\\"${password}\\\",${auth:-00111}"<br>
],<br>
"modes": {<br>
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh<br>
index ffe5615..571cfaa 100644<br>
--- a/package/network/utils/comgt/files/ncm.sh<br>
+++ b/package/network/utils/comgt/files/ncm.sh<br>
@@ -17,6 +17,8 @@ proto_ncm_init_config() {<br>
proto_config_add_string pincode<br>
proto_config_add_string delay<br>
proto_config_add_string mode<br>
+ proto_config_add_string pdptype<br>
+ proto_config_add_boolean ipv6<br>
}<br>
<br>
proto_ncm_setup() {<br>
@@ -24,8 +26,22 @@ proto_ncm_setup() {<br>
<br>
local manufacturer initialize setmode connect ifname devname devpath<br>
<br>
- local device apn auth username password pincode delay mode<br>
- json_get_vars device apn auth username password pincode delay mode<br>
+ local device apn auth username password pincode delay mode pdptype ipv6<br>
+ json_get_vars device apn auth username password pincode delay mode pdptype ipv6<br>
+<br>
+ if [ "$ipv6" = 0 ]; then<br>
+ ipv6=""<br>
+ else<br>
+ ipv6=1<br>
+ fi<br>
+<br>
+ [ -z "$pdptype" ] && {<br>
+ if [ -n "$ipv6" ]; then<br>
+ pdptype="IPV4V6"<br>
+ else<br>
+ pdptype="IP"<br>
+ fi<br>
+ }<br>
<br>
[ -n "$ctl_device" ] && device=$ctl_device<br>
<br>
@@ -116,7 +132,7 @@ proto_ncm_setup() {<br>
return 1<br>
}<br>
<br>
- echo "Connected, starting DHCP"<br>
+ echo "Connected, starting DHCP on $ifname"<br>
<br>
proto_init_update "$ifname" 1<br>
proto_send_update "$interface"<br>
@@ -127,12 +143,14 @@ proto_ncm_setup() {<br>
json_add_string proto "dhcp"<br>
ubus call network add_dynamic "$(json_dump)"<br>
<br>
- json_init<br>
- json_add_string name "${interface}_6"<br>
- json_add_string ifname "@$interface"<br>
- json_add_string proto "dhcpv6"<br>
- json_add_string extendprefix 1<br>
- ubus call network add_dynamic "$(json_dump)"<br>
+ [ -n "$ipv6" ] && {<br>
+ json_init<br>
+ json_add_string name "${interface}_6"<br>
+ json_add_string ifname "@$interface"<br>
+ json_add_string proto "dhcpv6"<br>
+ json_add_string extendprefix 1<br>
+ ubus call network add_dynamic "$(json_dump)"<br>
+ }<br>
}<br>
<br>
proto_ncm_teardown() {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.4<br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
</font></span></blockquote></div><br></div>