huawei: implement ussd encoding/decoding

Huawei wants the USSD as packed GSM.
This commit is contained in:
Guido Günther
2011-07-21 15:16:44 -05:00
committed by Dan Williams
parent b82cec8c7e
commit 70715c1c12
3 changed files with 54 additions and 3 deletions
+1 -1
View File
@@ -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);
+4
View File
@@ -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);