All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com>
To: ofono@ofono.org
Subject: [PATCH 04/13] USSD atom driver changes to read current character setting
Date: Thu, 09 Sep 2010 12:02:57 -0700	[thread overview]
Message-ID: <1284058977-15575-1-git-send-email-jeevaka.badrappan@elektrobit.com> (raw)
In-Reply-To: <1284035516-21359-5-git-send-email-jeevaka.badrappan@elektrobit.com>

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

---
 drivers/atmodem/ussd.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c
index 1e1fc25..30145ad 100644
--- a/drivers/atmodem/ussd.c
+++ b/drivers/atmodem/ussd.c
@@ -44,12 +44,25 @@
 
 static const char *cusd_prefix[] = { "+CUSD:", NULL };
 static const char *none_prefix[] = { NULL };
+static const char *cscs_prefix[] = { "+CSCS:", NULL };
 
 struct ussd_data {
 	GAtChat *chat;
 	unsigned int vendor;
+	enum at_util_charset charset;
 };
 
+static void read_charset_cb(gboolean ok, GAtResult *result,
+				gpointer user_data)
+{
+	struct ussd_data *data = user_data;
+
+	if (!ok)
+		return;
+
+	at_util_parse_cscs_query(result, &data->charset);
+}
+
 static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd)
 {
 	GAtResultIter iter;
@@ -247,6 +260,9 @@ static int at_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor,
 
 	ofono_ussd_set_data(ussd, data);
 
+	g_at_chat_send(chat, "AT+CSCS?", cscs_prefix, read_charset_cb, data,
+			NULL);
+
 	g_at_chat_send(chat, "AT+CUSD=1", NULL, at_ussd_register, ussd, NULL);
 
 	return 0;
-- 
1.7.0.4


  reply	other threads:[~2010-09-09 19:02 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 12:31 Add support for Send USSD proactive command handling Jeevaka Badrappan
2010-09-09 12:31 ` [PATCH 01/12] atutil changes for parsing cscs query and cscs support Jeevaka Badrappan
2010-09-09 14:45   ` Denis Kenzior
2010-09-09 18:56     ` Jeevaka Badrappan
2010-09-09 18:56       ` [PATCH 01/13] " Jeevaka Badrappan
2010-09-10 17:27         ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 02/12] atgen changes for setting TE character set Jeevaka Badrappan
2010-09-09 14:50   ` Denis Kenzior
2010-09-09 19:00     ` [PATCH 02/13] " Jeevaka Badrappan
2010-09-09 12:31 ` [PATCH 03/12] phonesim " Jeevaka Badrappan
2010-09-09 19:01   ` [PATCH 03/13] " Jeevaka Badrappan
2010-09-10 17:07     ` Denis Kenzior
2010-09-10 20:29       ` [PATCH 2/7] " Jeevaka Badrappan
2010-09-09 12:31 ` [PATCH 04/12] USSD atom driver changes to read current character setting Jeevaka Badrappan
2010-09-09 19:02   ` Jeevaka Badrappan [this message]
2010-09-09 12:31 ` [PATCH 05/12] Add internal api __ofono_call_barring_is_busy Jeevaka Badrappan
2010-09-09 15:06   ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 06/12] Add internal api __ofono_call_forwarding_is_busy Jeevaka Badrappan
2010-09-09 15:07   ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 07/12] Add internal api __ofono_call_settings_is_busy Jeevaka Badrappan
2010-09-09 15:07   ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 08/12] Add Send USSD command specific result codes Jeevaka Badrappan
2010-09-09 15:09   ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 09/12] Add Send USSD terminal response data structures Jeevaka Badrappan
2010-09-09 15:20   ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 10/12] Add build_dataobj_ussd_text for ussd specific text string handling Jeevaka Badrappan
2010-09-09 15:31   ` Denis Kenzior
2010-09-09 19:06     ` [PATCH 10/13] " Jeevaka Badrappan
2010-09-10 17:29       ` Denis Kenzior
2010-09-10 20:19         ` [PATCH 4/7] " Jeevaka Badrappan
2010-09-10 20:22           ` Denis Kenzior
2010-09-09 12:31 ` [PATCH 11/12] Internal and Driver api changes for Send USSD proactive command Jeevaka Badrappan
2010-09-09 15:59   ` Denis Kenzior
2010-09-09 20:25     ` [PATCH 6/8] " Jeevaka Badrappan
2010-09-09 20:25       ` [PATCH 7/8] Add __ofono_ussd_initiate internal api for Sending USSD Jeevaka Badrappan
2010-09-09 12:31 ` [PATCH 12/12] Handling of Send USSD proactive command Jeevaka Badrappan
2010-09-09 15:37   ` Denis Kenzior
2010-09-09 19:42     ` [PATCH 8/8] " Jeevaka Badrappan
2010-09-13 23:00 ` Added UCS2 handling and review comments incorporated Jeevaka Badrappan
2010-09-13 23:00   ` [PATCH 1/8] smsutil: Add USSD encoding function Jeevaka Badrappan
2010-09-13 23:00     ` [PATCH 2/8] util: Add UCS2 to GSM 7bit converion function Jeevaka Badrappan
2010-09-13 23:00       ` [PATCH 3/8] test-util: Add function for validating UCS2 to GSM bit conversion Jeevaka Badrappan
2010-09-13 23:00         ` [PATCH 4/8] USSD atom driver changes to read current character setting Jeevaka Badrappan
2010-09-13 23:00           ` [PATCH 5/8] Internal and Driver API changes for Send USSD Jeevaka Badrappan
2010-09-13 23:00             ` [PATCH 6/8] Add __ofono_ussd_initiate internal api for Sending USSD Jeevaka Badrappan
2010-09-13 23:00               ` [PATCH 7/8] stk: Handling of Send USSD proactive command Jeevaka Badrappan
2010-09-13 23:00                 ` [PATCH 8/8] stkutil: Add handling of error case scenario in build USSD data object Jeevaka Badrappan
2010-09-14 21:49                 ` [PATCH 3/4] stk: Handling of Send USSD proactive command Jeevaka Badrappan
2010-09-15 17:15                   ` Denis Kenzior
2010-09-14 17:45               ` [PATCH 6/8] Add __ofono_ussd_initiate internal api for Sending USSD Denis Kenzior
2010-09-14 21:31                 ` [PATCH 2/4] " Jeevaka Badrappan
2010-09-15 17:13                   ` Denis Kenzior
2010-09-14 17:24             ` [PATCH 5/8] Internal and Driver API changes for Send USSD Denis Kenzior
2010-09-14 21:23               ` [PATCH 1/4] " Jeevaka Badrappan
2010-09-15 17:13                 ` Denis Kenzior
2010-09-14 17:01           ` [PATCH 4/8] USSD atom driver changes to read current character setting Denis Kenzior
2010-09-14 17:01         ` [PATCH 3/8] test-util: Add function for validating UCS2 to GSM bit conversion Denis Kenzior
2010-09-14 17:01       ` [PATCH 2/8] util: Add UCS2 to GSM 7bit converion function Denis Kenzior
2010-09-14 16:58     ` [PATCH 1/8] smsutil: Add USSD encoding function 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=1284058977-15575-1-git-send-email-jeevaka.badrappan@elektrobit.com \
    --to=jeevaka.badrappan@elektrobit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.