I have some EM7565 with SWI9X50C_01.07.02.00 or SWI9X50C_01.08.04.00 firmware, I am using ModemManager + libqmi + qmi_wwan/qcserial kernel driver on Linux to drive them. I found that with ATT SIM card, once I disconnect cellmodem (the wwan0 interface became down and there is no default route via wwan0 anymore), pinging the static IP address on the cellmodem allocated by ATT, still got echo reply packets.
# qmicli -p -d /dev/cdc-wdm0 --wds-get-packet-service-status
[29 Nov 2020, 12:03:07] -Warning ** [/dev/cdc-wdm0] requested auto mode but no MBIM QMUX support available
[/dev/cdc-wdm0] Connection status: 'disconnected'
#
# qmicli -p -d /dev/cdc-wdm0 --wds-get-autoconnect-settings
[29 Nov 2020, 12:46:58] -Warning ** [/dev/cdc-wdm0] requested auto mode but no MBIM QMUX support available
Autoconnect settings retrieved:
Status: 'disabled'
#
If I do “mmcli -m X -r”, pinging the cellmodem IP address from my dev PC stops receiving echo replies, but resumes receiving them once the reset is finished I guess.
However, if I use a Verizon Wireless sim card, after disconnecting cellmodem, pinging the cellmodem static IP address becomes completely unresponsive - this is what I have been exepcted.
So, how could I disconnect from ATT network properly?
The issue seems to do with the autoconnect feature, in a strange way.
Once the cellmodem remains disconnected (wwan0 down and no default route), if I ENABLE autoconnect by qmicli --wds-set-autoconnect-settings=enabled, pinging from my dev PC the cellmodem IP address becomes STOPPED.
Whereas if I re-disable the autoconnect feature by --wds-set-autoconnect-settings=disabled, pinging RESUMES receiving echo replies.
How has the autoconnect settinigs made this difference?
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)
Many thanks for the links you gave about autoconnect.
Now I understand if enabled the autoconnect feature will make the cellmodem firmware taking care of setting up bearer connections by itself, so that the host can treat it as an Ethernet-alike interfaces. However, ModemManager by default will disable it, so that the MM user is fully control of cellmodem data connection/disconnection.
However, the issue I am seeing is that the bear connection seems to be kept-alive, from host/MM perspective, the bear is disconnected, but pinging the cellmodem IP address from another machine still get echo replies. So it is opposite to autoconnect, it is more about how to disconnect properly.
As I mentioned before, I am using MM and the autoconect is disabled by default. However, if I ENABLE it, the pinging from another machine will finaly stop receiving echo replies. So it looks like when autoconnect is enabled the cellmodem firwmare will really disconnect any existing bearer connections (so that it can try to do it by itself?)
Lastly, such issue so far only occurs with ATT but not with other carrier networks such as Verizon Wireless or Telstra.