mgaman / PDUlib

Encode/Decode PDU strings for use with most GSM modems. Both 7 bit and 16 bit alphabets are supported.
GNU Lesser General Public License v2.1
22 stars 10 forks source link

Concatenated messages #14

Closed navdotnetreqs closed 2 years ago

navdotnetreqs commented 2 years ago

Hi, thank you for your brilliant work.

You mention that "This implementation does not process the User Data Header (UDH). The practical implication of this is that concatenated messages or national language extensions are not supported."

Are there plans of supporting concatenated/multi-part-messages for sending and/or receiving? If not, there's probably some manual work required to be able to generate valid multipart messages (instead of several single messages) using your library.

mgaman commented 2 years ago

I have no immediate plans for concatenated messages. There are 2 issues here, incoming and outgoing. Outgoing should be easier to handle as I just have to split the message and set up the UDH fields. Incoming is more complex as parts do not necessarily arrive in ascending order, so some juggling is required. UDH is also relevant for sending media files. Bottom Line. I need to do my homework as my knowledge is minimal right now. I’ll get back to you soon.

mgaman commented 2 years ago

Hi, I just uploaded a new version of pdulib that supports concatenated messages. It can be cloned from Github but has not yet been released to Arduino. Read the Readme so learn how to send/receive mult-part messages. I'd appreciate it if you'd clone a copy to check that it works for you. So far I've only used Visual Code, not Arduino IDE. Also just AVR hardware, not ESP32. I'll carry on testing those variants and await your response. If OK I'll release to Arduino

Best Regards, David

On Tue, Apr 26, 2022 at 8:50 AM navdotnetreqs @.***> wrote:

Hi, thank you for your brilliant work.

You mention that "This implementation does not process the User Data Header (UDH). The practical implication of this is that concatenated messages or national language extensions are not supported."

Are there plans of supporting concatenated/multi-part-messages for sending and/or receiving? If not, there's probably some manual work required to be able to generate valid multipart messages (instead of several single messages) using your library.

— Reply to this email directly, view it on GitHub https://github.com/mgaman/PDUlib/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3KSTTENVWSMG2QAHKZRA3VG57ZLANCNFSM5UKVGGLA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mgaman commented 2 years ago

Fixed in 0.5.4

EliasA97 commented 2 years ago

Just a clarification:

Using int encodePDU(const char *recipient,const char *message, unsigned short refNumber,unsigned char numParts,unsigned char partNumber) it means that we need to send a pdu message that is over 70 characters long.

So we have: recipient, message, refNumber, numParts, partNumber. The first two are the same with the single message conversion. How we use the other three?

My thought is like: We make the sms array with sprintf, then we sizeof(array) and get the real number of characters in our message. Lets say its 253 letters. Then probably we do 253/70 = 3,61 and that gives us 4 messages. numParts = 4

What about refNumber and partNumber?