Skip to content

Draft: broadband-modem: send SYNC_NEEDED signal before enabling modem

Michał Mazur requested to merge mkm/ModemManager:simswap into main

It is not possible to connect after the PIN locked SIM card is hot swapped while MBIM modem is disabled or suspended. Following steps make it impossible to unlock SIM card after hot swap:

  1. Unlock SIM card with PIN (IMSI number cannot be read when SIM is locked and stays empty after unlocking)
  2. Disable modem or suspend the device
  3. Take out the SIM card (it will be PIN locked again)
  4. Insert the SIM card
  5. Enable modem or wake up the device
  6. Connection will fail because SIM card is locked and MM didn't update its state

In both cases hot swap will not be detected because value of IMSI is cached on MBIM modems. In case of suspend the IMSI will be always empty. Following patch fixes both issues (no IMSI after SIM unlocking and no detection of PIN lock state). It uses signal introduced for suspend support and sends this signal at the beggining of enabling_step function in mm-broadband-modem.

Merge request reports