How to send long sms | Telit Cinterion IoT Developer Community
August 15, 2018 - 2:35pm, 18428 views
Dear Gemalto
Have any of You tryed to send a long sms, splitting it up in ex 3 sms?
I have tryed use AT+CMMS=1/2, but when I send a ctrl-Z, the senarie stop.
I have then tryed to send SMS without ctrl-Z,
but then it hang.
I can only use AT+CMGS, not AT+CMGC don't know why?
I other words, how to use AT+CMMS=1/2
I unfortunate did a duplicate.
Sorry
Dear Bartłomiej
This is my try to generate a long SMS.
The output from
http://smstools3.kekekasvi.com/topic.php?id=288# is
00110000910000FF
The output from
http://rednaxela.net/pdu.php is
00110000910000
So, in order to construct me out of problem I do this replasements:
String 0011 -> 0041
00 0091 ->
00 +
the length of the telephone number in hex +
91 + padded phonenumber + 0000 +
index/poimter +
050003XX0301 or
050003XX0302 or
050003XX0303 +
the pdu string
In Your case
0041000B918466767788F8000018050003A60201 54 + the pdu string (54 the length)
But what I am missing is the calculation of index/poimter (18) -> 24 dec
How to find this?
According to
http://mobiletidings.com/2009/02/18/combining-sms-messages/
the line
0041000B915121551532F40000 A0 050003000301 98 (98 the length)
say, that the A0 saying:
UDL 0xA0 Total payload length in septets (160)
and the 98 indicate a length of 152 in dec differense 8
Br Morten
Dear Bartłomiej
I am rather stalled, have You anything against sendeng me Your code ?
I do not know how to overcome this: Exception in CharArray java.lang.ArrayIndexOutOfBoundsException: 0 when putting pdu in char[] or byte[]
Br Morten DK
Hi
I've done some research and i found there is nice program to decode PDU messages: http://www.*****.com/pduspy.html This one can help you to little understand PDU and what message will arrive to your mobile.
First i generated a PDU message form here: http://smstools3.kekekasvi.com/topic.php?id=288
Text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt blandit enim a pellentesque. 1
It has 100 characters.
Where I've added my phone number (in egzample i changed it) and set it as "International" (for Polen it is: +48 *** *** ***).
AT+CMGS=102
0011000B918XXXXXXXXXF80000FF64CCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
Then change PDU type, as mentioned: http://mobiletidings.com/2009/02/18/combining-sms-messages/
0041000B918XXXXXXXXXF80000FF64CCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
There I added UDH.
UDL - length of Text message + UDHL + UDH + 1 = 100 + 1 + 6 + 1 = 108 = 6C
UDH for one message:
6C050003010101
For two messages:
6C050003010201 / 6C050003010202 etc.
0041000B918XXXXXXXXXF800006C050003010101FF64CCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
Then to make readable and without garbage message there is need to delete "FF"
0041000B918XXXXXXXXXF800006C050003010101FF64CCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
0041000B918XXXXXXXXXF800006C05000301010164CCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
And from now there is added "2" beceause of "64". I don't know why exactly it is, but i've found out there you can change it for "1B" and on mobilie there will addes little "space". 1B is for "escape" character.
0041000B918XXXXXXXXXF800006C0500030101011BCCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806
And from now it works:
AT+CMGS=108
0041000B918XXXXXXXXXF800006C0500030101011BCCB7BCDC06A5E1F37A1B447EB3DF72D03C4D0785DB653A0B347EBBE7E531BD4CAFCB4161721A9E9E8FD3EE33A8CC4ED35DA02A1D444FBBC76972DD4D0789D96137394D0795DDE936280C8297D9ECB29B5E9EC7EB65172806 (CTRL + Z)
and you will receive message.
For longer messages like 410 characters you can split it into 160 + 160 + 90. Then make UDH as:
6C050003010301 / 6C050003010302 / 6C050003010303
and paste it in plece where i've mentioned you.
Please try by your own research. I heard there is program like "PDUgen.exe". I've seen my colleague was using that named program but he don't send it to me so maybe in Internet is more programs which can generated for you concated PDU SMS.
Hope I helped you.
Regards
Krzysztof
pdu_ex.txt Padding_PhoneNumber.txt
Dear Krzysztof.
I hope it works this padding phone
But my pdu does not, I really do not know why.
My command is:
sms_response =
parent.SendCommand("AT+CMGS=" + "160" + "\r");
open command prompt AT+CMGS=160
>
sms_response = parent.SendCommand(pdu_string + (char) 26 + "\r");
return +CMS ERROR: operation not supported
Hope You can help me
Br Morten
Hi
Could you try without "\r"? It has behaviour like "enter" but to send PDU message or normal txt message (char)26 only need to.
Did you try to send prepared by your own PDU message with only AT commands doing it by your hand?
Please check your PDU message with PDUspy application. I can see that you have wrong data length written in PDU header. That can be caused of your "operation not supported". Try to replace "78" for "81".
(Here is print screen of that. I replaced "****" for "2222")
Regards
Krzysztof
I found this link
https://smspdu.benjaminerhart.com/
Wich gives me an exact length, othervice a warning if too big or too small.
So, in order to find out what is wrong, I would like if You could test the attathed data, just inserting Your own padded phone and length (0xB?).
Doing by command prompt also gives an error.
br
pdu.txt
Hi
I see that you have written wrong CMGS length.
I've replaced *** with my number and also add "0xB" and I've tried to send sms with your length and i doesn't work. Module has returned with: "+CMS ERROR: operation not supported".
Then I've read the correct message length:
And... It doesn't work. I've got that ERROR too. So then I've tried to find other cmgs length. i thought i should by +- 5. So If at+cmgs=130 doesn't work 125-135 should works but first i had to find it. So i've tried and at+cmgs=127 goes with "+CMGS: 112 OK" response. Then I've done it with your other messages. After sending third part I've got all contacted message on my phone.
However, is one problem but I think it is by network provider side. Yesterday It work's and today my phone doesn't receive any message. Even my previous message. Only signle PDU works.
Regards
Krzysztof
I will close this thread and say it was feasible to send 5,
but I am not proud of it.
Thanks to You both for Your patient.
Br Morten