Skip to contentSkip to conversation

telit: register SIM if it goes straight to ready

PATCH Applied Piotr Haber 2 participants 2 messages Feb 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 plugins/telit.c | 5 +++++
 1 file changed, 5 insertions(+)
plugins/telit.c +5 -0
index 19898f95..b194b65a 100644
@@ -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);
Signature · 1 line
2.11.0
#1 lore raw

Hi Piotr,

Quoted 6 lines · Piotr Haber

SIM without PIN goes straight to state 3 (INSERTED and READY) on some modem/firmware versions.

---
 plugins/telit.c | 5 +++++
 1 file changed, 5 insertions(+)

Applied, thanks.

Regards,
-Denis