From be174b78167bf9f2b77901b4b318606144a5ae58 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 17 Aug 2007 08:31:21 +0000 Subject: From: Andrzej Zaborowski Date: Fri, 27 Jul 2007 19:39:15 +0200 Subject: [PATCH] Cell Broadcast message decoding and presentation in libgsmd-tool. This time Cell Broadcast is tested to work, I should have made tests earlier. Now I'm correctly getting a CB message with the human readable name of the city and district when I'm connecting. In the previous patches the CB PDU was not being decoded at all. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2723 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/gsmd/usock.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'include/gsmd/usock.h') diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 18ffa5e..ce5c25e 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -365,6 +365,48 @@ struct gsmd_sms_storage { struct __gsmd_sms_storage mem[3]; } __attribute__ ((packed)); +/* Refer to GSM 03.41 subclause 9.3.1 - note: this indicates display mode too */ +enum gsmd_geographical_scope { + GSMD_SCOPE_CELL_WIDE_OPER = 0, + GSMD_SCOPE_PLMN_WIDE, + GSMD_SCOPE_LOC_AREA_WIDE, + GSMD_SCOPE_CELL_WIDE, +}; + +enum gsmd_language { + GSMD_LANG_GERMAN = 0, + GSMD_LANG_ENGLISH, + GSMD_LANG_ITALIAN, + GSMD_LANG_FRENCH, + GSMD_LANG_SPANISH, + GSMD_LANG_DUTCH, + GSMD_LANG_SWEDISH, + GSMD_LANG_DANISH, + GSMD_LANG_PORTUGUESE, + GSMD_LANG_FINNISH, + GSMD_LANG_NORWEGIAN, + GSMD_LANG_GREEK, + GSMD_LANG_TURKISH, + GSMD_LANG_HUNGARIAN, + GSMD_LANG_POLISH, + GSMD_LANG_UNSPECIFIED, +}; + +/* Refer to GSM 03.41 subclause 9.3 */ +struct gsmd_cbm { + struct { + enum gsmd_geographical_scope scope; + int msg_code; + int update_num; + } serial; + u_int16_t msg_id; + enum gsmd_language language; + u_int8_t coding_scheme; + int pages; + int page; + u_int8_t data[82]; +}; + /* Refer to GSM 07.07 subclause 8.12 */ struct gsmd_phonebook_readrg { u_int8_t index1; -- cgit v1.2.3