[openwrt/openwrt] comgt: ncm: support Mikrotik R11e-LTE6 modem

LEDE Commits lede-commits at lists.infradead.org
Wed Mar 29 08:33:19 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/dbd6ebd6d84b35599a0446559576df41f487200e

commit dbd6ebd6d84b35599a0446559576df41f487200e
Author: Szabolcs Hubai <szab.hu at gmail.com>
AuthorDate: Sat Mar 25 00:00:27 2023 +0100

    comgt: ncm: support Mikrotik R11e-LTE6 modem
    
    The Mikrotik R11e-LTE6 modem is similar to ZTE MF286R modem, added
    earlier: it has a Marvel chip, able to work in ACM+RNDIS mode, knows ZTE
    specific commands, runs OpenWrt Barrier Breaker fork.
    While the modem is able to offer IPv6 address, the RNDIS setup is unable
    to complete if there is an IPv6 adress.
    
    While it works in ACM+RNDIS mode, the user experience isn't as good as
    with "proto 3g": the modem happily serves a local IP (192.168.1.xxx)
    without internet access. Of course, if the modem has enough time
    (for example at the second dialup), it will serve a public IP.
    
    Modifing the DHCP Lease (to a short interval before connect and back to
    default while finalizing) is a workaround to get a public IP at the
    first try.
    
    A safe workaround for this is to excercise an offline script of the
    pingcheck program: simply restart (ifdown - ifup) the connection.
    
    Another pitfall is that the modem writes a few messages at startup,
    which confuses the manufacturer detection algorithm and got disabled.
    
        daemon.notice netifd: Interface 'mikrotik' is setting up now
        daemon.notice netifd: mikrotik (2366): Failed to parse message data
        daemon.notice netifd: mikrotik (2366): WARNING: Variable 'ok' does not exist or is not an array/object
        daemon.notice netifd: mikrotik (2366): Unsupported modem
        daemon.notice netifd: mikrotik (2426): Stopping network mikrotik
        daemon.notice netifd: mikrotik (2426): Failed to parse message data
        daemon.notice netifd: mikrotik (2426): WARNING: Variable '*simdetec:1,sim' does not exist or is not an array/object
        daemon.notice netifd: mikrotik (2426): Unsupported modem
        daemon.notice netifd: Interface 'mikrotik' is now down
    
    A workaround for this is to use the "delay" option in the interface
    configuration.
    
    I want to thank Forum members dchard (in topic Adding support for
    MikroTik hAP ac3 LTE6 kit (D53GR_5HacD2HnD)) [1]
    and mrhaav (in topic OpenWrt X86_64 + Mikrotik R11e-LTE6) [2]
    for sharing their experiments and works.
    Another information page was found at eko.one.pl [3].
    
    [1]: https://forum.openwrt.org/t/137555
    [2]: https://forum.openwrt.org/t/151743
    [3]: https://eko.one.pl/?p=modem-r11elte
    
    Signed-off-by: Szabolcs Hubai <szab.hu at gmail.com>
---
 package/network/utils/comgt/files/ncm.json | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json
index 7d9a38fe36..df0810ddbc 100644
--- a/package/network/utils/comgt/files/ncm.json
+++ b/package/network/utils/comgt/files/ncm.json
@@ -112,5 +112,17 @@
 		],
 		"connect": "AT+ZGACT=1,${profile}",
 		"disconnect": "AT+ZGACT=0,${profile}"
+	},
+	"\"mikrotik\"": {
+		"configure": [
+			"AT+CFUN=4",
+			"AT+ZGDCONT=${profile},\\\"${pdptype}\\\",\\\"${apn}\\\",0",
+			"AT+ZDHCPLEASE=10",
+			"AT+CFUN=1"
+		],
+		"waitforconnect": "\\\"+ZCONSTAT: 1,${context_type}\\\",\\\"+ZGIPDNS: ${context_type}\\\"",
+		"connect": "AT+ZGACT=1,${context_type}",
+		"finalize": "AT+ZDHCPLEASE=0",
+		"disconnect": "AT+ZGACT=0,1"
 	}
 }




More information about the lede-commits mailing list