Quectel EC25 AFX, issue with enabling sim hot plug

Hi,
We have Quectel EC25AFX(FW:EC25AFXGAR07A03M1G) in our box. We are unable to enable hot plug with AT commands.
We use Build root Linux 4.19.148 with QMI WWAN drivers and ModemManager& mmcli to talk to the device.
After inserting the sim to modem we have observed the following logs from ModemManager debug mode.

<<<<<< TLV:
<<<<<<   type       = "Card Status" (0x10)
<<<<<<   length     = 15
<<<<<<   value      = FF:FF:FF:FF:FF:FF:FF:FF:01:00:00:00:00:00:00
<<<<<<   translated = [ index_gw_primary = '65535' index_1x_primary = '65535' index_gw_secondary = '65535' index_1x_secondary = '65535' cards = '{ [0] = '[ card_state = 'absent' upin_state = 'not-initialized' upin_retries = '0' upuk_retries = '0' error_code = 'unknown' applications = '{}' ] '}' ]
ModemManager[14769]: <debug> [1657893482.924034] Card '0' is absent
ModemManager[14769]: <debug> [1657893482.924082] Couldn't check if unlock required: 'QMI operation failed: No card found'
ModemManager[14769]: <warn>  [1657893482.924382] Modem couldn't be initialized: Couldn't check unlock status: QMI operation failed: No card found
ModemManager[14769]: <info>  [1657893482.924451] Modem: state changed (unknown -> failed)
ModemManager[14769]: <debug> [1657893482.924900] (ttyUSB2) device open count is 2 (open)
ModemManager[14769]: <debug> [1657893482.925057] (ttyUSB2): --> 'ATH<CR>'
ModemManager[14769]: <debug> [1657893482.932078] (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
ModemManager[14769]: <debug> [1657893482.932198] (ttyUSB2) device open count is 3 (open)
ModemManager[14769]: <debug> [1657893482.932268] (ttyUSB2) device open count is 2 (close)
ModemManager[14769]: <debug> [1657893482.932329] (ttyUSB2): --> 'AT+CLCC=?<CR>'
ModemManager[14769]: <debug> [1657893482.944806] (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
ModemManager[14769]: <debug> [1657893482.945077] periodic call list polling will be used if supported
ModemManager[14769]: <debug> [1657893482.945455] (ttyUSB2) device open count is 3 (open)
ModemManager[14769]: <debug> [1657893482.945648] (ttyUSB2) device open count is 2 (close)
ModemManager[14769]: <debug> [1657893482.945760] (ttyUSB2): --> 'AT+QFASTBOOT=?<CR>'
ModemManager[14769]: <debug> [1657893482.965291] (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
ModemManager[14769]: <debug> [1657893482.965810] SIM is missing, but this modem does not support SIM hot swap.
ModemManager[14769]: <debug> [1657893482.966041] Extended signal information reporting disabled
ModemManager[14769]: <debug> [1657893482.966245] Couldn't finish initialization in the current state: 'Modem is unusable, cannot fully initialize'

We tried sending AT commands to the modem to enable the Hot-plug mode.

# mmcli -m 0 --command='AT+QSIMSTAT?'
response: '+QSIMSTAT: 1,0'
# mmcli -m 0 --command='AT+QSIMDET=?'
response: '+QSIMDET: (0,1),(0,1)'
# mmcli -m 0 --command='AT+QSIMDET=1,0'
response: ''

ModemManger debug log
ModemManager[18177]: <debug> [1657894744.196587] (ttyUSB2) opening serial port...
ModemManager[18177]: <debug> [1657894744.199038] (ttyUSB2): setting up baudrate: 57600
ModemManager[18177]: <debug> [1657894744.199091] (ttyUSB2): no flow control explicitly requested for device
ModemManager[18177]: <debug> [1657894744.199113] (ttyUSB2): port attributes not fully set
ModemManager[18177]: <debug> [1657894744.199159] (ttyUSB2) device open count is 1 (open)
ModemManager[18177]: <debug> [1657894744.199242] (ttyUSB2): --> 'AT+QSIMDET=?<CR>'
ModemManager[18177]: <debug> [1657894744.215577] (ttyUSB2): <-- '<CR><LF>+QSIMDET: (0,1),(0,1)<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[18177]: <debug> [1657894744.216067] (ttyUSB2) device open count is 0 (close)
ModemManager[18177]: <debug> [1657894744.216122] (ttyUSB2) closing serial port...
ModemManager[18177]: <debug> [1657894744.218403] (ttyUSB2) serial port closed
ModemManager[18177]: <debug> [1657894752.012127] (ttyUSB2) opening serial port...
ModemManager[18177]: <debug> [1657894752.014626] (ttyUSB2): setting up baudrate: 57600
ModemManager[18177]: <debug> [1657894752.014681] (ttyUSB2): no flow control explicitly requested for device
ModemManager[18177]: <debug> [1657894752.014722] (ttyUSB2): port attributes not fully set
ModemManager[18177]: <debug> [1657894752.014787] (ttyUSB2) device open count is 1 (open)
ModemManager[18177]: <debug> [1657894752.014895] (ttyUSB2): --> 'AT+QSIMDET=1,0<CR>'
ModemManager[18177]: <debug> [1657894752.038207] (ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
ModemManager[18177]: <debug> [1657894752.038473] (ttyUSB2) device open count is 0 (close)
ModemManager[18177]: <debug> [1657894752.038526] (ttyUSB2) closing serial port...
ModemManager[18177]: <debug> [1657894752.041361] (ttyUSB2) serial port closed

We still see the modem state as ‘failed’ from mmcli output.

  Status   |                   state: failed
           |           failed reason: sim-missing
           |             power state: on
           |          signal quality: 0% (cached)

Could someone please help to enable SIM hot swap?

Note: Unable to attach full debug logs, as I am a new user.

–Sashi

Hi
Please refer to the following instructions to use the hot plug function. Thank you.