Open Source Telephony
 help / color / mirror / Atom feed
From: Anthony Viallard <viallard@syscom-instruments.com>
To: ofono@ofono.org
Subject: [PATCH 3/6] SIMCOM: add a quirk for signal strength reporting.
Date: Fri, 19 Jul 2013 15:35:37 +0200	[thread overview]
Message-ID: <1374240940-30892-3-git-send-email-viallard@syscom-instruments.com> (raw)
In-Reply-To: <1374240940-30892-1-git-send-email-viallard@syscom-instruments.com>

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

We must tell we want the signal strength reporting using
AT+AUTOCSQ command (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §10.7").
---
 drivers/atmodem/network-registration.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 24b71a3..8cc04b7 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -1753,6 +1753,14 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	}
 
 	switch (nd->vendor) {
+	case OFONO_VENDOR_SIMCOM:
+		/* Register for CSQ changes */
+		g_at_chat_send(nd->chat, "AT+AUTOCSQ=1,1", none_prefix,
+				NULL, NULL, NULL);
+
+		g_at_chat_register(nd->chat, "+CSQ:",
+				   csq_notify, FALSE, netreg, NULL);
+		break;
 	case OFONO_VENDOR_PHONESIM:
 		g_at_chat_register(nd->chat, "+CSQ:",
 					csq_notify, FALSE, netreg, NULL);
@@ -1898,7 +1906,6 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		break;
 	case OFONO_VENDOR_NOKIA:
 	case OFONO_VENDOR_SAMSUNG:
-	case OFONO_VENDOR_SIMCOM:
 		/* Signal strength reporting via CIND is not supported */
 		break;
 	default:
-- 
1.8.3.1


  parent reply	other threads:[~2013-07-19 13:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 13:35 [PATCH 1/6] Add SIMCOM support Anthony Viallard
2013-07-19 13:35 ` [PATCH 2/6] SIMCOM: add a quirk for AT+CNMI command building Anthony Viallard
2013-07-22 20:49   ` Denis Kenzior
2013-07-19 13:35 ` Anthony Viallard [this message]
2013-07-22 20:49   ` [PATCH 3/6] SIMCOM: add a quirk for signal strength reporting Denis Kenzior
2013-07-19 13:35 ` [PATCH 4/6] SIMCOM: add a quirk to fix crsm request Anthony Viallard
2013-07-22 20:51   ` Denis Kenzior
2013-07-19 13:35 ` [PATCH 5/6] Add a function to be able to report network technology change Anthony Viallard
2013-07-22 20:57   ` Denis Kenzior
2013-07-19 13:35 ` [PATCH 6/6] SIMCOM: add a quirk to retrieve network technology used Anthony Viallard
2013-07-22 21:08   ` Denis Kenzior
2013-07-22 20:45 ` [PATCH 1/6] Add SIMCOM support Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374240940-30892-3-git-send-email-viallard@syscom-instruments.com \
    --to=viallard@syscom-instruments.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox