QMI does not use correct APN
Username: Evren Yurtesen
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1363
I get 4G service from a provider which provide public IP if APN of “opengate” is used. I found out that qmi.sh does not set the card correctly. The –autoconnect
setting seems to be the cause. (Also maybe related:
https://forum.openwrt.org/viewtopic.php?pid=372211
)
I replaced in my qmi.sh “–autoconnect” with “–set-autoconnect enabled” in lines where “–start-network” is used.
Seems to do the trick. However “–stop-network” requires “–autoconnect” to be present or I get errors.
See:
root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --stop-network 0xffffffff --autoconnect root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings "Out of call" root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --start-network --apn opengate --autoconnect -2020095904 root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings {"pdp-type":"ipv4","ip-family":"ipv4","mtu":1500,"ipv4":{"ip":"100.69.24.116","dns1":"192.89.123.230","dns2":"192.89.123.231","gateway":"100.69.24.117","subnet":"255.255.255.248"},"ipv6":{},"domain-names":{}} root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --stop-network 0xffffffff --autoconnect root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings "Out of call" root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --start-network --apn opengate -2020095904 root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings {"pdp-type":"ipv4","ip-family":"ipv4","mtu":1500,"ipv4":{"ip":"46.132.191.50","dns1":"192.89.123.230","dns2":"192.89.123.231","gateway":"46.132.191.49","subnet":"255.255.255.252"},"ipv6":{},"domain-names":{}} root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --stop-network 0xffffffff --autoconnect root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings "Out of call" root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --set-client-id wds,19 --start-network --apn opengate --set-autoconnect enabled -2020095904 root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-current-settings {"pdp-type":"ipv4","ip-family":"ipv4","mtu":1500,"ipv4":{"ip":"194.251.18.231","dns1":"192.89.123.230","dns2":"192.89.123.231","gateway":"194.251.18.232","subnet":"255.255.255.240"},"ipv6":{},"domain-names":{}}