telit: register SIM if it goes straight to ready

SIM without PIN goes straight to state 3 (INSERTED and READY)
on some modem/firmware versions.
This commit is contained in:
Piotr Haber 2017-02-08 10:25:37 +01:00 committed by Denis Kenzior
parent 149002c110
commit 69c67fce7f
1 changed files with 5 additions and 0 deletions

View File

@ -175,6 +175,11 @@ static void switch_sim_state_status(struct ofono_modem *modem, int status)
}
break;
case 3: /* SIM inserted, SMS and phonebook ready */
if (data->have_sim == FALSE) {
ofono_sim_inserted_notify(data->sim, TRUE);
data->have_sim = TRUE;
}
if (data->sms_phonebook_added == FALSE) {
ofono_phonebook_create(modem, 0, "atmodem", data->chat);
ofono_sms_create(modem, 0, "atmodem", data->chat);