How to set "AUTO-SIM" mode in Linux with default drivers

I’m trying to enable a data connection on an EM9291 in Fedora Core 40.

The device is functional and shows up in ModemManager as connected. I can send SMSes through it and I can get an IP through NetworkManager but I can’t ping over it. I switched to a Windows install with the SW drivers installed and had the modem come up as “No service”. Finally I tried AT!IMPREF=”AUTO-SIM" and powered cycled and the data connection started working. I put the Linux image back on and it could ping over the modem interface.

Unfortunately, I can’t use this procedure for production. I’m limited using the default Linux drivers because the SW drivers are not signed and I can’t use USB because of hardware issues. The default drivers expose the following devices wwan0mbim0, wwan0qmi0 and another device, I can’t remember. No serial devices are exposed including wwan0at0 or any ttyUSB0.

I can interact with the device via mbim using mmcli or qmicli.

My question is, is there a way to put the firmware in “AUTO-SIM” mode, like I can with the AT command AT!IMPREF=”AUTO-SIM"?

I tried the the following with no luck:

# sudo qmicli -d /dev/wwan0mbim0 --client-no-release-cid --dms-set-firmware-preference="carrier=auto-sim,config-version=0,firmware-version=0" 
error: couldn't select stored image: QMI protocol error (48): 'InvalidArgument' [/dev/wwan0mbim0] Client ID not released: Service: 'dms' CID: '1' 

# sudo qmicli -d /dev/wwan0mbim0 --client-no-release-cid --dms-set-firmware-preference="0,0,AUTO-SIM" 
[25 Nov 2024, 01:30:41] -Warning ** [/dev/wwan0mbim0] couldn't enable QMI indications via MBIM: Transaction timed out error: couldn't open the QmiDevice: Transaction timed out

have you tried the fw-download-tool in MBPL?

https://source.sierrawireless.com/resources/airprime/software/mbpl/mbpl-software-latest/#sthash.ZXRwiiKx.dpbs

From the readme file, I can see the followings:

- $sudo ./fwdwl-litehostx86_64 -a The application enables device AUTO-SIM based image switch feature. There is no actual FW download occurred. Device will reset and come back in APP mode with AUTO-SIM feature enabled.

Thanks, that seems to work. I used the following command and got the following response:

$ sudo ./fw-download-toolhostx86_64 -p /dev/wwan0mbim0 -c MBIM --autosim
Application version: 1.0.2405.0
INFO: QDL Port:
INFO: Device Path: /dev/wwan0mbim0
INFO: Device Port: 0-0
INFO: FW Path:
Switching device into download mode for image switch ...
No need to download any images.  Device will reboot for image switching.
Waiting for modem to disconnect from the host ...
Modem disconnected from host.
Waiting for modem to come up in ONLINE mode ...
Modem is now in ONLINE mode ...
Device current image preferences:
Modem image:
Image ID: 000.000_000
Build ID: 00.00.00.00_AUTO-SIM
PRI image:
Image ID: 000.000_000
Build ID: 00.00.00.00_AUTO-SIM
Device AUTO-SIM based image switch is enabled
Firmware download process completed successfully.