If you try to send a message under 160 character long, containing some characters which need to be escaped, it is possible that an invalid >160 char single message is generated. It then appears as an empty incoming message on my phone.
This string is 158 char long. It contains 8 brackets which need an escape character, so the real length of the message is 166 septets. It should be split into two SMS, but it isn't.
How to quickly reproduce:
open examples/sms_handler_demo.py
replace sms.reply.... (line 23) with a static string
sms.reply('12345-010,12345-020,12345-030,12345-040,12345-050,12345-060,12345-070,12345-080,12345-090,12345-100,12345-110,12345-120,12345-130,12345-140,12345-150,[[[[[[[[')
save, start, send sms to modem and wait for the response.
my phone receives an empty message
copy generated PDU message here: http://rednaxela.net/pdu.php and check the contents by decoding it. It shows something like this:
123456789,123456789,123456789,123456789,123456789,123456789,123456789,123456789,123456789,12345-100,12345-110,12345-120,12345-130,12345-140,12345-150,€<€<€<€<€<€<€<€< Length:166
If you try to send a message under 160 character long, containing some characters which need to be escaped, it is possible that an invalid >160 char single message is generated. It then appears as an empty incoming message on my phone.
12345-010,12345-020,12345-030,12345-040,12345-050,12345-060,12345-070,12345-080,12345-090,12345-100,12345-110,12345-120,12345-130,12345-140,12345-150,[[[[[[[[
This string is 158 char long. It contains 8 brackets which need an escape character, so the real length of the message is 166 septets. It should be split into two SMS, but it isn't.
How to quickly reproduce:
sms.reply('12345-010,12345-020,12345-030,12345-040,12345-050,12345-060,12345-070,12345-080,12345-090,12345-100,12345-110,12345-120,12345-130,12345-140,12345-150,[[[[[[[[')
123456789,123456789,123456789,123456789,123456789,123456789,123456789,123456789,123456789,12345-100,12345-110,12345-120,12345-130,12345-140,12345-150,€<€<€<€<€<€<€<€< Length:166