How i can make read and resend multipart SMS?

I am working with a quectel MC60 modem with OpenCPU. Tell me how you can determine that the received message is composite and other parts also come in SMS. how can I forward such a message to a recorded number?

I would be working in PDU mode: AT+CMGF=0

To determine if an incoming SMS is part of a concatenated set, you need to analyze the PDU-type octet (AKA the first octet - “FO”).

If the SMS is concatenated, the user-data-header-indicator bit will be set in the FO. Then you need to identify the user-data-header (UDH) at the beginning of the user data field to determine if that contains concatenated SMS part numbering.

In order to forward SMSs correctly, you need to deconstruct the incoming MT-PDU, and reconstruct it as an MO-PDU (change the content from mobile-terminated to mobile-originated).

Much of the PDU content will remain unchanged.

The message centre number gets removed.

The FO needs changing from MT format to MO.

The originator address needs changing to the destination address.

Set the message reference to “00”.

The service centre time stamp gets replaced by a suitable validity period.

What you can’t do to the PDU is include the original originator address (unless you can expand the message text to include it within the 140-byte user data limit).

You could consider sending an additional SMS giving the original sender’s address (whether it be numeric or alphanumeric).

Nor can you pass a status report request in any way that will result in the original sender being notified.

1 Like