mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-09-28 15:06:33 +03:00
63d4c447fb
A multi part OTA response (full GP GET STATUS registry or some other fat response that exceeds one SMS) is delivered as several SMS via proactive SEND SHORT MESSAGE. The card only gives us another part if it receives a TERMINAL RESPONSE for the previous one. Currently smpp2sim Proact.handle_SendShortMessage relays the SMS but returns None, so the transport falls back to prepare_response(pcmd) with the ProactiveCommand collection (empty .children) and crashes with 'not enough values to unpack (expected 1, got 0)', dropps the SMPP link, and never fetches the remaining parts. Fix: make handle_SendShortMessage return a successful TERMINAL RESPONSE built from the decoded command so the handshake proceeds. prepare_response() is extended to handle collection via .decoded and raises a useful error. The send_apdu_checksw general_result='FIXME' path is now avoided for SendShortMessage but remains a problem for other handlers that return None. Change-Id: Ib96ce81c4ff093b8a6fc715f79617e95a2dd8433