Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] xmm7xxx: enable sms and phonebook support
@ 2018-10-03  6:37 Anirudh Gargi
  2018-10-03 16:43 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Anirudh Gargi @ 2018-10-03  6:37 UTC (permalink / raw)
  To: ofono

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

Enable SMS and Phonebook atom for the xmm7xxx series modem.
SMS send and CREG eutran states fixed in atmodem driver to support
sms and phonebook feature for xmm7xxx based modems.
---
 plugins/xmm7xxx.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 9db87ad..a6dd097 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -50,6 +50,8 @@
 #include <ofono/lte.h>
 #include <ofono/ims.h>
 #include <ofono/sim-auth.h>
+#include <ofono/sms.h>
+#include <ofono/phonebook.h>
 
 #include <drivers/atmodem/atutil.h>
 #include <drivers/atmodem/vendor.h>
@@ -128,13 +130,19 @@ static void switch_sim_state_status(struct ofono_modem *modem, int status)
 		break;
 	case 2:	/* SIM inserted, PIN verification not needed - READY */
 	case 3:	/* SIM inserted, PIN verified - READY */
-	case 7:
+	case 7: /* SIM inserted, SMS and phonebook - READY */
 		if (data->have_sim == FALSE) {
 			ofono_sim_inserted_notify(data->sim, TRUE);
 			data->have_sim = TRUE;
 		}
 
 		ofono_sim_initialized_notify(data->sim);
+		if (data->sms_phonebook_added == FALSE) {
+			ofono_phonebook_create(modem, 0, "atmodem", data->chat);
+			ofono_sms_create(modem, 0, "atmodem", data->chat);
+			data->sms_phonebook_added = TRUE;
+		}
+
 		break;
 	default:
 		ofono_warn("Unknown SIM state %d received", status);
-- 
2.7.4


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

* Re: [PATCH] xmm7xxx: enable sms and phonebook support
  2018-10-03  6:37 [PATCH] xmm7xxx: enable sms and phonebook support Anirudh Gargi
@ 2018-10-03 16:43 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2018-10-03 16:43 UTC (permalink / raw)
  To: ofono

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

H Anirudh,

On 10/03/2018 01:37 AM, Anirudh Gargi wrote:
> Enable SMS and Phonebook atom for the xmm7xxx series modem.
> SMS send and CREG eutran states fixed in atmodem driver to support
> sms and phonebook feature for xmm7xxx based modems.
> ---
>   plugins/xmm7xxx.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 

Applied after fixing up the commit message.

Regards,
-Denis


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

end of thread, other threads:[~2018-10-03 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03  6:37 [PATCH] xmm7xxx: enable sms and phonebook support Anirudh Gargi
2018-10-03 16:43 ` Denis Kenzior

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