Attention is currently required from: Hoernchen, dexter, laforge.

Hello Jenkins Builder, dexter, laforge,

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/pysim/+/43544?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Code-Review+1 by dexter, Code-Review+1 by laforge, Verified+1 by Jenkins Builder


Change subject: sms/smpp-ota-tool: reassemble multi part response SMS
......................................................................

sms/smpp-ota-tool: reassemble multi part response SMS

A large OTA response (for example GP GET STATUS app registry) is split by the 
card
into multiple SMS, each carries a TS 23.040 9.2.3.24 'concatenated short 
messages'
IE in its UDH. Nothing recombines them, so smpp-ota-tool currently only sees the
first incomplete part.

Add ConcatenatedSmsReassembler that accepts TP-User-Data, buffers parts
by reference number, and returns the reassembled TP-User-Data in the canonical
single-part form. Non-concatenated SMS pass through unchanged.
Both the 8-bit+16-bit references are supported.

A reserved value in the concatenation IE is not an error, these messages
are handed back as is rather than rejected, so the caller can deal with that.

Reassembly leads to a result that looks like a fat single part message the
card could have produced given infinite sms sizes, so the existing decode_resp
path is unaffected.

Feeding those parts to the ota tool needs two more fixes because the card 
returns
the application response as several SMS via proactive SEND SHORT MESSAGE while
the ENVELOPE SMS-PP DOWNLOAD itself contains the POR without a app R-APDU.
smpplib poll() drains everything, so message_received_handler runs on each:

 - a later status-only response must not overwrite an application response
   already captured, or transceive_apdu finds no last_response_data and raises
 - a response that cannot be decoded is be logged and skipped rather raised
        out of client.poll() which kills the tool.

Plus tests from a sja5 session.

Incomplete sets are capped (oldest evicted) so they cannot pile up.

Change-Id: I8c81097e607e0d055c4f031bbcc8a74d5c24a0e7
---
M contrib/smpp-ota-tool.py
M pySim/sms.py
A tests/unittests/test_smpp_ota_tool.py
M tests/unittests/test_sms.py
4 files changed, 455 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/44/43544/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43544?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8c81097e607e0d055c4f031bbcc8a74d5c24a0e7
Gerrit-Change-Number: 43544
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Attention: Hoernchen <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: dexter <[email protected]>

Reply via email to