Skip to content

Split long messages into concatenated SMS parts - #22

Open
dormancygrace wants to merge 2 commits into
obsy:masterfrom
dormancygrace:agent/sms-multipart-submit
Open

Split long messages into concatenated SMS parts#22
dormancygrace wants to merge 2 commits into
obsy:masterfrom
dormancygrace:agent/sms-multipart-submit

Conversation

@dormancygrace

Copy link
Copy Markdown

Summary

  • split long GSM-7 messages into parts of up to 153 septets
  • split long UCS-2 messages into parts of up to 67 characters
  • add the standard 8-bit concatenation UDH and a shared reference to every part
  • preserve GSM extension escape pairs across part boundaries
  • submit all generated PDUs sequentially and report each modem reference
  • retain the existing non-concatenated encoding for messages fitting one SMS

This is a separate follow-up to #21 and currently stacks on that PR. Once #21
is merged, GitHub will show only the multipart commit here.

Validation

  • exact single-part vectors remain byte-for-byte unchanged
  • unit coverage for GSM-7 and UCS-2 multipart UDH and payloads
  • GSM-7 fill-bit and escape-boundary tests
  • 255-part acceptance and 256-part rejection tests
  • encoder tests pass under ASan and UBSan
  • cross-compiled for OpenWrt MIPS32r2/musl
  • tested on a physical Fibocom NL678

The hardware test sent a 121-character Cyrillic message as two parts. The
modem accepted them as +CMGS: 10 and +CMGS: 11; the receiving phone
reassembled both parts into one message with the exact original text.

Encode non-ASCII UTF-8 input as UCS-2.

Normalize leading plus signs in international numbers.

Reject malformed input instead of submitting a broken PDU.

Add deterministic ASCII and UCS-2 submit test vectors.

Make the send path propagate encoding and modem errors.
Add concatenated SMS submission with an 8-bit UDH reference.

Use 153 septets per GSM-7 part and 67 characters per UCS-2 part.

Keep GSM extension pairs together at part boundaries.

Add multipart packing, boundary and 255-part limit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant