Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] telit: register SIM if it goes straight to ready
@ 2017-02-08  9:25 Piotr Haber
  2017-02-08 16:55 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Piotr Haber @ 2017-02-08  9:25 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

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(+)

diff --git a/plugins/telit.c b/plugins/telit.c
index 19898f95..b194b65a 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -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);
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-08 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  9:25 [PATCH] telit: register SIM if it goes straight to ready Piotr Haber
2017-02-08 16:55 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox