How to properly disconnect from carrier network?

Hi @qingtao.cao.au

The modem uses raw-IP only, so you can’t just use normal DHCP. You have to get the IP information from the modem and manually set the Linux-side network interface to match. You also have to set the IP mode to “raw” every time the interface appears (on boot and after suspend/resume).

You’ve configured an auto connect profile, so you don’t have to start the modem manually each time:
qmicli -d /dev/cdc-wdm1 --wds-create-profile=3gpp,name=t mobile,apn=fast.tmobile.com,pdp-type=IPV4V6
qmicli -d /dev/cdc-wdm1 --wds-set-autoconnect-settings=[/(enabled|disabled|paused)[,(roaming-allowed|home-only)]]

–wds-get-autoconnect-settings Get autoconnection settings
–wds-set-autoconnect-settings=[/(enabled|disabled|paused)[,(roaming-allowed|home-only)]] Set autoconnection settings (roaming settings optional)

Please refer to the links below for more information:
https://gist.github.com/cullum/cf401be9b6392f11f226a40d39ad0eb3
https://www.freedesktop.org/software/libqmi/man/latest/qmicli.1.html

Please help to tick “Solutions” if your question is answered.