MC8795 received SMS in text mode woes

I’m using an MC8795V module that does not seem to be coping with long SMS messages.
I put the modem into plain text mode (ie, not PDU Mode) using the AT+CMGF command.

When I send a message < 160 characters I get the following after issuing AT+CMGL=“ALL”…

+CMGL: 0,"REC UNREAD","+642122xxxxx",,"14/05/06,16:55:00+48"
Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long

OK

but if the message is longer than 160 characters I get…

+CMGL: 0,"REC UNREAD","+642122xxxxx",,"14/05/06,16:56:00+48"
67206C6F6E670A4C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C6F6E67206C
+CMGL: 1,"REC UNREAD","+642122xxxxx",,"14/05/06,16:57:00+48"
6F6E67206C6F6E67206C6F6E67

OK

Now before you say it’s switching to PDU mode, it isn’t, there is no header info etc. It seems to be switching to ascii hex!

6F 6E 67 20 6C 6F 6E 67 20 6C 6F 6E 67
o  n  g     l  o  n  g     l  o  n  g

To get around this for now, I’ve implemented a way of recognising what’s going on and converting it to text, but I was wondering if anyone else has had this problem and found away to make it work correctly and/or if there is likely to be a fix in the future.

Cheers, Hazel.

Longer that 160 characters is only possible to send in PDU mode.

Also the AT+CMGL=“ALL” command does only work in text mode. If your module is in text mode(AT+CMGF=1) it will display messages also received in PDU mode mode, but it will display the the message encoded as in PDU. It will not decode it to plain text.

If you plan to be able to receive messages longer that 160 characters I would recommend you to run the module in PDU mode AT+CMGF=0.

As you can see from my results above, the modem is not reporting the long message in PDU mode. I’m sure that what it should be doing is reporting the message in plain text when in text mode. I’m sure if I did use the modem in PDU mode, then all may be well, but what I’m trying to highlight, and work around, is a bug in the modem in text mode, which I’m currently using.

I have tried this with other modems too (as the product I’m developing interfaces to more than one type of modem), and they behave correctly. For example, this is what a Fastrack Xtend output looks like using the same test:

+CMGL: 1,"REC UNREAD","+642122xxxxx",,"14/05/06,17:25:00+48"
Long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long lon
+CMGL: 2,"REC UNREAD","+642122xxxxx",,"14/05/06,17:25:00+48"
g long long

OK

All readable! :smiley: