SMS over IMS: a (U)SIM data download is acknowledged and never reaches the card #4

Open
opened 2026-11-19 11:07:55 +00:00 by jorijnvdgraaf · 1 comment

SMS over IMS, which comes with 1.2.0 (SMS_OVER_IMS=1): OnSmsMessage acknowledges every SMS-DELIVER it can parse with an RP-ACK and hands it to the bus, whatever its class and its protocol identifier (AGENTS.md §7.9). For two kinds of message the acknowledgement says more than was done:

  • A (U)SIM data download (TP-PID 0x7F with a class 2 coding), by which an operator updates the card over the air. TS 23.040 9.2.3.9: "the ME must pass the short message in its entirety including all SMS elements contained in the SMS deliver to the (U)SIM". imsd stores it and hands it to the consumer like any other message. The card never gets it, and the network has its acknowledgement.
  • Any class 2 message. TS 23.038 4: the MS "shall ensure that the message has been transferred to the SMS data field in the (U)SIM before sending an acknowledgement to the SC", and returns "protocol error, unspecified" when it cannot store it there while other storage is free. imsd writes nothing to the card.

What a user sees: nothing. An update the operator sent does not happen.

With the setting off, which is the default, imsd does not advertise SMS over IP and takes no short messages. This is about phones that turn it on.

What a fix needs:

  • A way to hand the TPDU to the card and to get the card's answer before the delivery report goes out: an ENVELOPE (SMS-PP download), by the route the AKA APDU already takes (qmicli --uim-send-apdu) or through QMI's toolkit service. Which of the two the modem accepts is to be found out. The delivery report is then made from the card's answer.
  • Until that exists, a decision on what such a message gets: an RP-ACK, as now, tells the network it arrived; an RP-ERROR tells it that it did not.
  • The same for a class 2 message that is no download: the card's EF_SMS, or the error TS 23.038 4 names.
  • tests/Engine fixtures for both, and §7.9.
SMS over IMS, which comes with 1.2.0 (`SMS_OVER_IMS=1`): `OnSmsMessage` acknowledges every SMS-DELIVER it can parse with an RP-ACK and hands it to the bus, whatever its class and its protocol identifier (AGENTS.md §7.9). For two kinds of message the acknowledgement says more than was done: - A (U)SIM data download (TP-PID 0x7F with a class 2 coding), by which an operator updates the card over the air. TS 23.040 9.2.3.9: "the ME must pass the short message in its entirety including all SMS elements contained in the SMS deliver to the (U)SIM". imsd stores it and hands it to the consumer like any other message. The card never gets it, and the network has its acknowledgement. - Any class 2 message. TS 23.038 4: the MS "shall ensure that the message has been transferred to the SMS data field in the (U)SIM before sending an acknowledgement to the SC", and returns "protocol error, unspecified" when it cannot store it there while other storage is free. imsd writes nothing to the card. What a user sees: nothing. An update the operator sent does not happen. With the setting off, which is the default, imsd does not advertise SMS over IP and takes no short messages. This is about phones that turn it on. What a fix needs: - A way to hand the TPDU to the card and to get the card's answer before the delivery report goes out: an ENVELOPE (SMS-PP download), by the route the AKA APDU already takes (`qmicli --uim-send-apdu`) or through QMI's toolkit service. Which of the two the modem accepts is to be found out. The delivery report is then made from the card's answer. - Until that exists, a decision on what such a message gets: an RP-ACK, as now, tells the network it arrived; an RP-ERROR tells it that it did not. - The same for a class 2 message that is no download: the card's EF_SMS, or the error TS 23.038 4 names. - tests/Engine fixtures for both, and §7.9.
Author
Owner

1.2.1 decides the "until that exists" part: a class 2 message is refused with an RP-ERROR (cause 111, TP-FCS 0xFF) instead of acknowledged, a short message type 0 excepted (d6d7ba1). The way to the card — an ENVELOPE for a data download, EF_SMS for the rest — is what this issue stays open for.

1.2.1 decides the "until that exists" part: a class 2 message is refused with an RP-ERROR (cause 111, TP-FCS 0xFF) instead of acknowledged, a short message type 0 excepted (d6d7ba1). The way to the card — an ENVELOPE for a data download, EF_SMS for the rest — is what this issue stays open for.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Catcrafts/imsd#4
No description provided.