tom_modem: gate Turkish GSM-7 shift table behind UDH language IE - #259
tom_modem: gate Turkish GSM-7 shift table behind UDH language IE#259ozgunokan wants to merge 3 commits into
Conversation
|
Thank you for revising the Turkish SMS support. I found two remaining blockers before this PR can be merged:
Please track the locking and single-shift selections separately, apply them to the base and extension lookups respectively, and add focused tests for locking-only, single-only, and combined UDH cases. Thanks again for the contribution and the device testing. |
Addresses review feedback on FUjr#257/FUjr#256: the Turkish national language extension mappings were previously written directly into the shared gsm7bits_extend_to_latin1 table, so every GSM 7-bit message decoded through it regardless of language -- reserved extension codes used by other languages/future 3GPP additions could have been misdecoded as Turkish characters. This moves the Turkish mappings into a separate turkish_extend_to_latin1 table and adds udh_has_turkish_shift(), which walks the PDU's User Data Header IEs and only selects that table when a National Language Locking Shift (IEI 0x24) or Single Shift (IEI 0x25) IE explicitly selects Turkish (language id 0x01, per 3GPP TS 23.038 table 6.2.1.2.5). Every other message continues to decode through the original, unmodified table. Also adds a bounds check in sms_send() (operations.c): profile->sms_pdu was hex-encoded into a fixed 512-byte pdu_hex buffer with no upper bound on the source PDU length, which could overflow the stack buffer for a long/malformed PDU. This rejects PDUs longer than 255 chars (the max that fits pdu_hex[512] as hex + terminator) up front. Tested on Arcadyan AW1000 (Quectel RG500Q-EA), IPQ807x: Turkish SMS with the language shift IE set decode correctly; a batch of non-Turkish GSM 7-bit messages (EN/DE test SMS) decode unchanged before and after this patch.
c8da16a to
0a5b566
Compare
|
I have now rebuilt this branch on the latest The changes include:
The updated head is Would you be comfortable merging this SMS-only version in its current form? |
|
Thanks for the quick turnaround. Before giving a final go-ahead, I want to double-check the locking vs. single-shift decoding against a couple of manual test PDUs and confirm the diff is fully clean of the kernel/NSS changes. I'll follow up within the next day with a confirmation. |
This replaces the Turkish SMS support from PR #256/#257 (closed as
duplicate) with a version that addresses the review feedback:
when the PDU's UDH explicitly signals Turkish via the National
Language Locking/Single Shift IE (0x24/0x25, language id 0x01).
Non-Turkish GSM 7-bit messages now decode exactly as before.
PDU length going into the fixed 512-byte pdu_hex buffer.
Kernel 6.18 changes are intentionally left out of this PR per your
request to split unrelated changes -- this is SMS-only.
Tested on Arcadyan AW1000 (Quectel RG500Q-EA), IPQ807x.