I decided to re-flash the router back to a pristine state OpenWrt. All the packages I had installed made it murky, and no, i had not installed the 'kmod-usb-net-qmi-wwan', but now I'm going to follow the qmi wiki and ONLY the qmi wiki to the tee.
Yes, or ... connect it to your RPi where the dongle works without issues and change the mode there. You should be able to run the AT commands I mentioned from a terminal app in RPi.
Keep the dongle in RPi for now.
I will try that next and report back. In the meantime, if my RPi uses the modem successfully, wouldn't that indicate that the modem APN setting is at least working as is?
We don't have visibility of the connection procedure used by RPi, so it's hard to compare.
Please also show the relevant fragment of your /etc/config/network so we could see how the modem interface is setup there.
And after setting it and validating the new setting:
AT+CGDCONT=1,"IP","internet.tele2.se"
OK
AT+CGDCONT?
+CGDCONT: 1,"IP","internet.tele2.se","0.0.0.0",0,0
OK
It now works upon plugging it into the router!
Wed Jun 18 09:57:37 2025 daemon.notice netifd: 4G_LTE_WAN_4 (11287): udhcpc: lease of 100.*.*.* obtained from 100.*.*.*, lease time 7200
Wed Jun 18 09:57:37 2025 daemon.notice netifd: Interface '4G_LTE_WAN_4' is now up
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using nameserver 130.244.127.161#53
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using nameserver 130.244.127.169#53
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for test
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for local
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Wed Jun 18 09:57:37 2025 daemon.info dnsmasq[1]: using only locally-known addresses for lan
And for the sake of completeness, here is the output from my routers /etc/config/network
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd19:cdf0:10a9::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface '4G_LTE_WAN'
option proto 'qmi'
option device '/dev/cdc-wdm0'
option apn 'internet.tele2.se'
option auth 'none'
option pdptype 'ipv4'
After running fine for a while the lte link went down and it wouldn't reconnect.
I took this oppertunity to rename the interface to lte as suggested. Modem works when plugged into the RPi, and I was able to 'listen in' using minicom while the RPi was setting things up, here is what is prompted back on RPi-init:
Välkommen till minicom 2.8
FLAGGOR: I18n
Port /dev/ttyUSB2, 13:30:08
Tryck CTRL-A Z för hjälp om specialtangenter
^SRVST:1
^MODE:5,4
^STIN:99,1,0
^SIMST:1
^HWNAT:06
^MODE:5,4
^SRVST:2
ATATE0
OK
OK
OK
+CRSM: 105,129,""
OK
+CPMS: "ME",0,50,"ME",0,50,"ME",0,50
OK
+CCLK: "25/06/18,11:31:06"+08"
OK
OK
OK
The system log on my router now shows this when I plug the modem back in:
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.292619] usb 1-2: new high-speed USB device number 6 using xhci-mtk
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.496978] hub 1-2:1.0: USB hub found
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.506145] hub 1-2:1.0: 4 ports detected
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.832384] usb 1-2.1: new high-speed USB device number 7 using xhci-mtk
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.982585] option 1-2.1:1.0: GSM modem (1-port) converter detected
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1600.995711] usb 1-2.1: GSM modem (1-port) converter now attached to ttyUSB0
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.015554] qmi_wwan 1-2.1:1.1: cdc-wdm0: USB WDM device
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.027816] qmi_wwan 1-2.1:1.1 wwan0: register 'qmi_wwan' at usb-1e1c0000.xhci-2.1, WWAN/QMI device, a2:61:bc:99:ef:0a
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.050101] option 1-2.1:1.2: GSM modem (1-port) converter detected
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.063353] usb 1-2.1: GSM modem (1-port) converter now attached to ttyUSB1
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.078240] option 1-2.1:1.3: GSM modem (1-port) converter detected
Mon Jun 16 22:43:37 2025 kern.info kernel: [ 1601.091418] usb 1-2.1: GSM modem (1-port) converter now attached to ttyUSB2
Mon Jun 16 22:43:38 2025 daemon.notice netifd: Interface 'lte' is setting up now
Mon Jun 16 22:43:38 2025 daemon.notice netifd: lte (8450): Waiting for SIM initialization
Mon Jun 16 22:43:40 2025 daemon.notice netifd: lte (8450): Request timed out
Mon Jun 16 22:43:40 2025 daemon.notice netifd: lte (8450): Failed to parse message data
Mon Jun 16 22:43:40 2025 daemon.notice netifd: lte (8450): SIM in illegal state - Power-cycling SIM
Mon Jun 16 22:43:43 2025 daemon.notice netifd: lte (8450): "Failed to connect to service"
Mon Jun 16 22:43:44 2025 daemon.notice netifd: lte (8450): Failed to parse message data
Mon Jun 16 22:43:44 2025 daemon.notice netifd: lte (8450): PIN status failed (not_initialized)
Mon Jun 16 22:43:45 2025 daemon.notice netifd: lte (8533): Stopping network lte
Mon Jun 16 22:43:45 2025 daemon.notice netifd: lte (8533): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "lte" } (Permission denied)
Mon Jun 16 22:43:45 2025 daemon.notice netifd: Interface 'lte' is now down
Mon Jun 16 22:43:46 2025 daemon.warn odhcpd[1676]: No default route present, overriding ra_lifetime to 0!
((Note: I was using a powered USB hub to eliminate power draw issues in the console output above))
Another update, after a shutdown of the router, a power plug pull and a long wait, I rebooted, and then and only then inserted the usb modem, and voila. The connection is working:
Mon Jun 16 22:27:50 2025 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.191 14:7d:da:90:21:b5
Mon Jun 16 22:27:50 2025 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.191 14:7d:da:90:21:b5
Mon Jun 16 22:27:50 2025 daemon.warn odhcpd[1678]: No default route present, overriding ra_lifetime to 0!
Mon Jun 16 22:27:54 2025 daemon.warn odhcpd[1678]: No default route present, overriding ra_lifetime to 0!
Mon Jun 16 22:27:55 2025 daemon.notice netifd: lte (3099): Starting network lte
Mon Jun 16 22:27:55 2025 daemon.notice netifd: lte (3099): Setting up wwan0
Mon Jun 16 22:27:55 2025 daemon.notice netifd: Interface 'lte' is now up
Mon Jun 16 22:27:55 2025 daemon.notice netifd: Network device 'wwan0' link is up
Mon Jun 16 22:27:56 2025 daemon.notice netifd: Network alias 'wwan0' link is up
Mon Jun 16 22:27:56 2025 daemon.notice netifd: Interface 'lte_4' is enabled
Mon Jun 16 22:27:56 2025 daemon.notice netifd: Interface 'lte_4' has link connectivity
Mon Jun 16 22:27:56 2025 daemon.notice netifd: Interface 'lte_4' is setting up now
Mon Jun 16 22:27:56 2025 daemon.notice netifd: lte_4 (3319): udhcpc: started, v1.36.1
Mon Jun 16 22:27:56 2025 user.notice firewall: Reloading firewall due to ifup of lte (wwan0)
Mon Jun 16 22:27:56 2025 daemon.notice netifd: lte_4 (3319): udhcpc: broadcasting discover
Mon Jun 16 22:27:56 2025 daemon.notice netifd: lte_4 (3319): udhcpc: broadcasting select for 10.42.53.98, server 10.42.53.97
Mon Jun 16 22:27:56 2025 daemon.warn odhcpd[1678]: No default route present, overriding ra_lifetime to 0!
Mon Jun 16 22:27:56 2025 daemon.notice netifd: lte_4 (3319): udhcpc: lease of 10.*.*.* obtained from 10.*.*.*, lease time 7200
Mon Jun 16 22:27:56 2025 daemon.notice netifd: Interface 'lte_4' is now up
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using nameserver 130.244.127.161#53
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using nameserver 130.244.127.169#53
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for test
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for local
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Mon Jun 16 22:27:56 2025 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Mon Jun 16 22:27:57 2025 daemon.warn odhcpd[1678]: No default route present, overriding ra_lifetime to 0!
Mon Jun 16 22:27:58 2025 user.notice firewall: Reloading firewall due to ifup of lte_4 (wwan0)
Mon Jun 16 22:27:59 2025 daemon.warn odhcpd[1678]: No default route present, overriding ra_lifetime to 0!
I'm not overly optimistic about the stability of the connection but I'll report back.