aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-07-21 15:15:09 -0500
committerDan Williams <dcbw@redhat.com>2011-07-21 15:16:44 -0500
commit70715c1c124b3220969a432be5ad2ad6f44913fe (patch)
tree59e70bb7f0559320caeafaa0701806e7d954c97f /src
parentb82cec8c7e0aaab04a855d64ac46b6244b6cd98c (diff)
huawei: implement ussd encoding/decoding
Huawei wants the USSD as packed GSM.
Diffstat (limited to 'src')
-rw-r--r--src/mm-generic-gsm.c2
-rw-r--r--src/mm-modem-gsm-ussd.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mm-generic-gsm.c b/src/mm-generic-gsm.c
index 854ac0c0..541c2dda 100644
--- a/src/mm-generic-gsm.c
+++ b/src/mm-generic-gsm.c
@@ -4820,9 +4820,9 @@ ussd_encode (MMModemGsmUssd *modem, const char* command, guint *scheme)
if (!success)
goto out;
+ *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT;
/* convert to hex representation */
hex = utils_bin2hexstr (ussd_command->data, ussd_command->len);
- *scheme = 15;
out:
g_byte_array_free (ussd_command, TRUE);
diff --git a/src/mm-modem-gsm-ussd.h b/src/mm-modem-gsm-ussd.h
index 6859d739..04d2be88 100644
--- a/src/mm-modem-gsm-ussd.h
+++ b/src/mm-modem-gsm-ussd.h
@@ -80,6 +80,10 @@ void mm_modem_gsm_ussd_cancel (MMModemGsmUssd *self,
MMModemFn callback,
gpointer user_data);
+/* CBS data coding scheme - 3GPP TS 23.038 */
+#define MM_MODEM_GSM_USSD_SCHEME_7BIT 0b00001111;
+#define MM_MODEM_GSM_USSD_SCHEME_UCS2 0b01001000;
+
char *mm_modem_gsm_ussd_encode (MMModemGsmUssd *self,
const char* command,
guint *scheme);