aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils
diff options
context:
space:
mode:
authorJan-Niklas Burfeind <git@aiyionpri.me>2022-12-07 19:12:13 +0100
committerDavid Bauer <mail@david-bauer.net>2022-12-09 00:19:36 +0100
commit3f7ce4bd4040aab2ff9fa38a5b00c26851341b75 (patch)
treefef26f994d6edd90fdec5e47ac3e54ec1696a6cb /package/network/utils
parent03ab5a60da6c5f992fceda2c23a3f462e94e61b5 (diff)
downloadupstream-3f7ce4bd4040aab2ff9fa38a5b00c26851341b75.tar.gz
upstream-3f7ce4bd4040aab2ff9fa38a5b00c26851341b75.tar.bz2
upstream-3f7ce4bd4040aab2ff9fa38a5b00c26851341b75.zip
comgt-ncm: add support for quectel modem EC200T-EU
context_type is an integer mapping of pdptype: 1: IPV4 2: IPV6 3: IPV4V6 Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me> (cherry picked from commit 13f82ce264ed2d02c66cb2cae8f013c8f64a979f)
Diffstat (limited to 'package/network/utils')
-rw-r--r--package/network/utils/comgt/files/ncm.json16
-rw-r--r--package/network/utils/comgt/files/ncm.sh6
2 files changed, 22 insertions, 0 deletions
diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json
index b6ad717529..7d9a38fe36 100644
--- a/package/network/utils/comgt/files/ncm.json
+++ b/package/network/utils/comgt/files/ncm.json
@@ -75,6 +75,22 @@
"finalize": "AT+CGDATA=\\\"M-MBIM\\\",${profile},1",
"disconnect": "AT+CGACT=0,${profile}"
},
+ "quectel": {
+ "initialize": [
+ "AT+CFUN=1"
+ ],
+ "configure": [
+ "at+qicsgp=${profile},${context_type},\\\"${apn}\\\",\\\"${username}\\\",\\\"${password}\\\",0"
+ ],
+ "modes": {
+ "lte": "AT+QCFG=\\\"nwscanmode\\\",3",
+ "umts": "AT+QCFG=\\\"nwscanmode\\\",2",
+ "gsm": "AT+QCFG=\\\"nwscanmode\\\",1",
+ "auto": "AT+QCFG=\\\"nwscanmode\\\",0"
+ },
+ "connect": "AT+qnetdevctl=1,${profile},1",
+ "disconnect": "AT+qnetdevctl=0,${profile},0"
+ },
"\"zte": {
"initialize": [
"AT+CFUN=1"
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh
index a2c913ea1d..2f36697487 100644
--- a/package/network/utils/comgt/files/ncm.sh
+++ b/package/network/utils/comgt/files/ncm.sh
@@ -31,6 +31,8 @@ proto_ncm_setup() {
local device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
json_get_vars device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
+ local context_type
+
[ "$metric" = "" ] && metric="0"
[ -n "$profile" ] || profile=1
@@ -38,6 +40,10 @@ proto_ncm_setup() {
pdptype=$(echo "$pdptype" | awk '{print toupper($0)}')
[ "$pdptype" = "IP" -o "$pdptype" = "IPV6" -o "$pdptype" = "IPV4V6" ] || pdptype="IP"
+ [ "$pdptype" = "IPV4V6" ] && context_type=3
+ [ -z "$context_type" -a "$pdptype" = "IPV6" ] && context_type=2
+ [ -n "$context_type" ] || context_type=1
+
[ -n "$ctl_device" ] && device=$ctl_device
[ -n "$device" ] || {