From 5d0e55f465b750d1379eea934055b8738db8fc8a Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Fri, 13 Dec 2019 17:40:34 +0200 Subject: [MTX-3102] mPower Feb20: IN:3899 MTCDT-LVW3 fails SMS with GUI Fixed the logic for parsing single-part and multi-part messages for LVW3 and LNA3. Now single-part messages should be parsed as correctly as multi-part messages. This logic improves the logic that were previously implemented in with multi-part messages support for LVW2: bbf6ae9b1790c7129bf249641350b302def3ee27. What changed: - CDMA-specific SMS Teleservice ID is now saved as part of the PDU structure - SMS Teleservice ID is now used to determine if the message CDMA Wireless Enhanced Messaging Teleservice (WEMT) with an actual UDH header - UDH headers are used for multi-part messages in LVW3/LNA3 Why changed: - UDH header may NOT be present in the SMS PDU - first byte of user data may be a letter instead of the UDH header size - when letter is parsed as side we get a lot of issues with segmentation faults, parsing issues, garbage in payload and so on - so this commit adds SMS type detection before actual UDH header parsing attempt is performed Sources for implementation: - Telit LE910 V2 SERIES AT COMMANDS REFERENCE GUIDE 80446ST10707A Rev.3, section 5.1.5.5.7 Read Message (3GPP2) - +CMGR contains definition of Teleservice ID field and four of the types: 4097 page, 4098 SMS (0x1002), 4099 voice mail, 262144 voice mail notification - 3GPP2 X.S0004-550-E, section 2.256 SMS_TeleserviceIdentifier contains definition for additional SMS types including 4101 (0x1005) CDMA Wireless Enhanced Messaging Teleservice (WEMT). - Teleservice ID 0x1002 is actually used for short messages in Verizon: ```+CMGL: 12,1,"",23 098010310REDACTED4F3 191213 050558 1002 0009 0C D4F29C0E32CBDF6D503508``` - Teleservice ID 0x1005 is actually used for multi-part messages in Verizon: ```+CMGL: 13,1,"",152 098010310REDACTED4F3 191213 050741 1005 0009 A0 05 00 03 4A 02 01 CC 66B3D96C369BCD66B3D96C369BCDE6E3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCFE7F3F97C3E9FCF +CMGL: 14,1,"",143 098010310REDACTED4F3 191213 050743 1005 0009 95 05 00 03 4A 02 02 CE E7F3F97C3E9FCFE7F3F97C3E9FCFE7B3D96C369BCD66B3D96C369BCD66B3D96C369BCDE670381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E170381C0E87C3E17038168BC562B1582C168BC562B1582C1603``` --- src/sms_list.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sms_list.c') diff --git a/src/sms_list.c b/src/sms_list.c index dcad3fe..678c158 100644 --- a/src/sms_list.c +++ b/src/sms_list.c @@ -177,6 +177,10 @@ static int print_list_yaml(struct msg_list_info *list_info) indentf(indent, "message-reference: 0x%02X\n", msg->pdu.msg_reference); indentf(indent, "protocol-id: 0x%02X\n", msg->pdu.protocol_id); + if (Global.core.verbose) { + indentf(indent, "tele-id: 0x%04X\n", msg->pdu.teleservice_id); + } + if (Global.core.verbose) { indentf(indent, "addr-length: 0x%02X\n", msg->pdu.addr.len); } -- cgit v1.2.3