[PATCH] mm-broadband-modem-mbim: support hot swapping

Aleksander Morgado aleksander at aleksander.es
Thu Jun 29 09:08:34 UTC 2017


On 29/06/17 10:51, Aleksander Morgado wrote:
>> +    if (self->priv->last_ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED &&
>> +        ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED) {
>> +        /* SIM has been removed */
>> +        mm_iface_modem_update_failed_state (MM_IFACE_MODEM (self),
>> +                                            MM_MODEM_STATE_FAILED_REASON_SIM_MISSING);
>> +    } else if (self->priv->last_ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED &&
>> +               ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED) {
>> +        /* SIM has been reinserted */
>> +        mm_broadband_modem_update_sim_hot_swap_detected (MM_BROADBAND_MODEM (self));
>> +    }
>>  
> If I'm not mistaken, whenever a sim insert/removal event is detected, we should just call mm_broadband_modem_update_sim_hot_swap_detected(), which will trigger a full modem re-probe. In this case the method is only being called for the case where the SIM is inserted, not for when the SIM is removed.
> 

Also, could you provide MM debug logs showing the SIM card hot insertion and the SIM card hot removal?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list