Take a look at the wwan and comgt packages. You'll see that the wwan handlers use comgt to set up a connection for devices using the cdc_ether, cdc_ncm or huawei_cdc_ncm drivers. The AT commands for each vendor are collected in the ncm.json file in comgt. Would be great if you extended that with support for this modem and similar ones.
I am afraid that I need some more help to get this properly integrated with OpenWrt. I have installed wwan and comgt packages. I then noticed that the /lib/netifd/proto/wwan.sh script makes use of a long list of configuration files in /lib/network/wwan, with names consisting of the USB vendor and product ID.
I have created a new file 19d2:0532 in that directory, but I cannot figure out what configuration section I need to create in /etc/config/network or elsewhere, in order to trigger proto_wwan_setup() within wwan.sh to get called. I have tried something like this:
config interface 'modem'
option proto 'wwan'
option ifname 'eth1'
But all that happens is that the UI reports the new interface as "Unsupported protocol type."
Also, I have not figured out where in the configuration I would set the keyword user to look up the relevant set of AT commands in ncm.json. Existing sections have keys such as "huawei", "samsung", or "sony", and I think that I could easily populate a new section called "zte" with the commands I have seen working, but I need help where to then put "zte" in my configuration.
I have not been able to get the builtin ncm or wwan drivers to work with the ThinkWill ML7820 modem, however, a workaround is to put the following in the rc.local file (can be done from the web interface):
That, together with having isntalled kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-serial will result in the eth1 interface becoming functional and forwarding LTE data. By then editing the two WAN interfaces to use eth1 instead of eth0.1, both IPv4 and IPv6 routing works for me.
Depending on your carrier, you may need to provide an "APN" as an additional argument in quotes to the AT+CGDCONT command.
echo "0x19d2 0x0532" > /sys/bus/usb-serial/drivers/generic/new_id
sleep 1
gcom -d /dev/ttyUSB0 -s /proc/self/fd/0 << EOF
opengt
set com 115200n81
set comecho off
set senddelay 0.02
waitquiet 0.2 0.2
flash 0.1
:start
send "AT!RESET^m"
EOF
sleep 10
gcom -d /dev/ttyUSB0 -s /proc/self/fd/0 << EOF
opengt
set com 115200n81
set comecho off
set senddelay 0.02
waitquiet 0.2 0.2
flash 0.1
:start
send "AT+CFUN=1^m"
waitfor 3 "OK"
send 'AT+CGDCONT=1,"IPV4V6"^m'
waitfor 10 "OK"
send 'AT+CGACT=1,1^m'
waitfor 10 'OK'
send 'AT+ZGACT=1,1^m'
waitfor 10 'OK'
EOF
Sorry, but that will not be accepted unless the modem speaks QMI. Does it? If not, then use the cdc_ether driver instead. It should work without any patching.
QMI control is in the original firmware, but so far im just poking around for now.
Yes i wont push this as is, probably only the serial id for now as you can use the modem via ppp and you are correct using the usb_cdc_ether will achieve the same result