Implementing Unicode SMS support

Hi, CircuitMess team! I was checking the source code to see what it’d take to implement 16-bit SMS encoding support (I get a bunch of texts in cyrillic, they come out as asterisks, and by the time they are saved into a json on the SD card, they are already irreversibly mis-parsed). Looks like you guys don’t use SIM800 native text mode and instead have your own PDU decoder. However, I wasn’t able to figure out exactly which module I need to modify, because these two seem to have some overlap in functionality (plus the arduino_pdu_decoder one seems quite a bit different from the version elsewhere on GitHub):


Could you give me some pointers?
Also, I’m guessing after I figure out this part, I’ll also need to figure out the fonts somewhere?..

Greetings,

I’m just going to get straight to the point.
The SIM800 PDU parser works fine for UTF8 characters, but if you have a Unicode character in the SMS, the SIM800 module reverts back to reporting the raw SMS PDU code. We needed to make our own custom PDU parsing functions, mostly by modifying this project’s code.

We refrained from using UCS2 (Unicode) encoding in our code, mostly because of the font limitations.

A nice place to start would be the MAKERphone::pduDecode function, mostly the parts where we’re decoding the PDU in a different way depending on the codingScheme flag (it shows what coding scheme the SMS is written in).

To save a Unicode SMS you should take a look at the block of code starting from line 6473 in MAKERphone.cpp. There we purposefully refrained from saving any Unicode chars and replacing them with asterisks.

The font, on the other hand, seems like a much more limiting factor, but there should be some Cyrillic fonts somewhere on the web.

Thanks for taking an interest in the project. I hope this gives you an idea of where to start.

Cheers