GL6110 Truncates SMS Received

I have been using this GL6110 USB Modem for sometime but SOME messages received from the network operator with special characters are truncated.

For example this Message received from Network Operator Safaricom is as below:-

EM10MH594 Confirmed.

But this should be received in full without truncation as below:-


EM10MH594 Confirmed.
You have received Ksh10.00 from
ROBERT PAVEL 254722221544
on 9/1/14 at 5:45 AM
New M-PESA balance is Ksh16.00.PIN YAKO SIRI YAKO

NOTE: When the SIM Card is on a normal phone(Nokia E72), all the message content is received. When the same message from a normal phone (Nokia E72) is forwarded to a line in the GL6110 USB, the message is NOT truncated.

I will appreciate a assistance on how to rectify this.

Best Regards,

Robert
:open_mouth:

Hiya,

It sounds like your module is not dealing with 8bit (or 16 bit) characters properly.

GSM 03.38 mandates that the standard encoding for SMS is 7 bit (and there is some internal encoding done to fit 160 chars into the 140 byte SMS limit).

However, there are some other encoding schemes used - and this wikipedia entry indicates that there are some shift characters used to encode different character sets.

I’m wondering if the inbound SMS is encoded in a different language (which your modem is not set for), and when the modem’s internal SMS decoder hits an invalid character it just stops.

Have a look in your modem doco to see if there are any language specific options for SMS.

Maybe AT+CLAN or AT+WLPR

Also, turn on the extended error reporting (AT+CMEE=1) and see if you can capture any errors when you get a truncated SMS.

Finally, you might be able to use PDU mode and decode the SMS yourself…

ciao, Dave

Dave,

Many thanks for your reply. I have enabled extended error reporting, though i have new developments on the problem as below.

The supported languages (My language is English) are as below:-


AT+CLAN=?
+CLAN: (“AUTO”,“de”,“en”,“it”,“fr”,“es”,“nl”,“sv”,“da”,“pt”,“fi”,“no”,“el”,“tr”,“hu”,“pl”,“cs”,“he”,“ar”,“ru”,“is”)

OK


AT+CMGL=“ALL” gives the following information which is complete but on receiving the SMS through Activexperts SMS Messaging Serve (activexperts.com/), the messages are truncated as I will indicate below:-

+CMTI: “SM”,2

+CMGL: 1,“REC READ”,“MPESA”,“14/01/09,10:05:35+12”
EM12JW725 Confirmed.
You have received Ksh10.00 from
ROBERT PAVEL 254722221544
on 9/1/14 at 10:05 AM
New M-PESA balance is Ksh80.00.PIN YAKO SIRI YAKO
+CMGL: 2,“REC UNREAD”,“MPESA”,“14/01/09,10:10:27+12”
EM12LM276 Confirmed.
You have received Ksh10.00 from
ROBERT PAVEL 254722221544
on 9/1/14 at 10:10 AM
New M-PESA balance is Ksh90.00.PIN YAKO SIRI YAKO

OK

TRUNCATED SMS:-

EM12LM276 Confirmed.

EM12JW725 Confirmed.


Best Regards,

Robert

Hi Robert,

I’m a little confused…

Is the GL6110 modem SENDING SMS to the ActiveExperts service?
or
Is the GL6110 modem RECEIVING SMS from the ActiveExperts service?

I initially read your post as the GL6110 modem was RECEIVING SMS and truncating them. Is this the case?

My suspicions are that there is a NULL (0x00) or otherwise unprintable character in the data stream for some reason.

I’ve had another look at the AT commands guide … there are a number of SMS configuration commands that you should probably have a look at - I would start with AT+CSMP, +CMGF, +CSDH - and maybe +CNMI as well.

Also, do you get a different response when you read a message using AT+CMGR as opposed to AT+CMGL=“ALL”?

Hope this helps a little more.

ciao, Dave

Hi Dave,

Many thanks.

The GL6110 is sending SMS to Activexperts (AX) while activexperts (AX) receives the SMS and stores into MYSQL database for further processing. If i dissable AX and receive SMS via AT Commands after settinng the modem to text mode, the SMS is received in full…without truncation. Seems the truncation of SMS occurs when AX receives SMS via AT Commands.

I will test the AT Commands you mentioned and revert. I will also provide AX AT commands sequence issued to the GL6110.

Regards,

Robert

That is still confusing!

:confused:

Do you mean to say that the GL6110 is receiving SMS from the network, and then communicating with AX?

\|/
   |                               +--------+
   |   SMS Received from Network   |        |
   +------------------------------>+ GL6110 +-----> SMS passed on to AX
        (Mobile Terminated; MT)    |        |
                                   +--------+

You mean using Hyperterminal or somesuch?

Hi Robert,

Thanks for the clarification that the modem is SENDING the SMS.

Are you sure that you have no odd characters in your SMS string? I’m assuming that the SMS data is being generated by an external microprocessor and transmitted to the Modem.

Also, are you using line breaks in your SMS string? Your message as presented below is 153 chars long, not counting line breaks. If you’re using (\r\n in C), then your message will exceed the 160 character limit and the message will probably be split into two SMS. This also may happen if any of the fields in your SMS (maybe the name or balance values) grow a little as well.

Otherwise, you’re going to have to see what logging the ActiveExperts API gives you - as it looks like the problem is at their end.

I’d also try sending different format SMS to AX to see if the issue also appears there.

ciao, Dave

I’m not really sure that is clear - see my previous post!

I think the use of “sending” may be ambiguous:

  • It could refer to the GL6110 originating the message; ie “sending” it over the GSM air interface;
  • It could refer to the GL6110 receiving the message from the GSM air interface, and then “sending” what it received on to AX (over UART or USB link)

I’m not sure - hopefully my little diagram might help to clarify? If not, perhaps robertoimeke would provide a diagram to show things more clearly…

Hi Dave,

Many thanks.

The process is as you presented and indicated below:-

|/
| ±-------+
| SMS Received from Network | |
±----------------------------->+ GL6110 ±----> SMS passed on to AX
(Mobile Terminated; MT) | |
±-------+

Yes I use this m2msupport.net/m2msupport/module-tester/ to execute AT Commands but still Hyperterminal works well too.

Yes, the SMS could be having some odd characters in the message since the SMS is originated from the Network operator (Safaricom) on their Mobile Money Transfer (Mpesa) platform, which i have no control over. Surprisingly, a smilar SMS received on a Nokia E72 and forwarded to GL6110 from a normal phone is received by AX without truncation.

I have not been able to test the commands but I will once am back in office on 13th January 2014.

Regards,

Robert

Hi Robert,

Thanks for the further clarifications - I still had the wrong idea about what you were doing.

If reading the SMS directly from the modem (via the USB port/Hyperterm/AT commands) gives you the full message, and the ActiveExperts code doesn’t, then that leads me to the inference that there is a subtle bug in the way that AX is parsing the message.

If your modem appears as a (USB) serial port (which it sounds like it does if Hyperterm can connect to it), then I would suggest connecting to the modem using a serial program such as RealTerm which will display each byte (as hexadecimal) and the control pin status from the serial port - this will show you exactly what the modem is transmitting. I haven’t used it for a while (I now have both hardware serial port and hardware USB sniffers), but I seem to recall that you can also use realterm to forward data between two ports. Check out the documentation on SPY mode. and then try connecting your modem to AX and see what’s going up and down the wire…

Alternatively, there are also methods to sniff the USB data stream using Wireshark - see this wireshark wiki page for details.

ciao, Dave

You can also “sniff” (virtual) COM ports using com0com

com0com.sourceforge.net/

Hiya,

Excellent - I hadn’t seen this (but also hadn’t had to look for a while either). Thanks for the link.

ciao, Dave