SMS Alphanumeric Sender Id Encoding - sms

When I receive sms on my sim808 module, i can see it as
AT+CMGL="REC UNREAD"
+CMGL: 21,"REC UNREAD","+919538634187","","18/01/28,13:20:31+22"
test1455
OK
When I send the message using a service that uses alphanumeric sender id, I get this
AT+CMGL="REC UNREAD"
+CMGL: 21,"REC UNREAD","14w4w2#45444147425","","18/01/28,13:20:31+22"
test1455
OK
I would like to know how can I decode 14w4w2#45444147425 to get the alphanumeric sender id?

Related

Is there a way to send multipart SMS message which is longer than 160 character with Qpython?

I'm making a SMS robot for my phone that sends delivery time for customers. And the message is over 160 characters.
I successfully sent messages with less than 160 characters with Qpython. But I have not found a way to send multipart SMS.
This is what I have used so far:
import androidhelper
androidhelper.Android().smsSend(01000000,'SMS text')

(Kannel) No foreign message ID when sending concatenated messages

I am trying to send multipart (concatenated) messages using Kannel.
Currently, Kannel is configured to call a dlr url (which is a PHP script) that does some stuff with the delivery report.
When sending single message (ie a message that has 10 characters), it does get delivered to my mobile phone and Kannel calls the dlr url twice, both times returning the foreign message ID - both when the dlr status code was 8, which means that it was accepted by SMSC, and when the dlr status code was 1, which means the message was delivered (as it really was).
Now, that works all great but when I try to send a multipart message (ie a message that has 250 characters), it again gets delivered to my phone as one message (as I set the concatenation parameter to true), but when Kannel called that dlr url when status code was 8 (accepted by SMSC) - it didn't provide any foreign message id, as it would normally in the previous example with message of 10 characters.
I could see in the logs that Kannel indeed received two foreign message ID's from the SMSC (ie 123 and 124), but when calling the dlr url on status code 8 (accepted by SMSC) Kannel never provided those IDs so the field in the database I use to store these IDs has been set from NULL to an empty string.
What is really confusing is that once the multi-part message got delivered to my phone, Kannel called that dlr url again with status code of 1 (delivered) and it passed the foreign message id of the first message, which is what I want to be passed on any status code.
So my question is - how can I make Kannel use that foreign message id when calling the dlr url when status code is 8 (accepted by SMSC)? It works when status code is 1 (delivered) but not when status code is 8.
Note: I am using Kannel 1.4.4 but I am willing to upgrade if there's a newer version with this feature included.

Concatenated PDU Flash message

I'm trying to send concatenated flash messages using a sim900 gsm module. Both messages are sent successfully, but I can see only one on my cell phone.
These are the PDUs I'm using:
AT+CMGS=140
pdu part 1 =
0051000B916998775706F80010A78F050003790201622C908C059AB1403416A8C602D958A01B0B84638172A0B09B0C8AC158A0188C058AC558A0988C058ACD58A0188D058AD558A0988D058ADD58A0188E058AE55820198C0592C55820998C0592CD5820198D0592D55820998D0592DD5820198E0592E558A0198C059AC558A0998C059ACD58A0198D059AD500
AT+CMGS=43
pdu part 2 =
0051000B916998775706F80010A72105000379020258A0998D1593CD6839582E3683E564331C2C17C3C96630
Is there something wrong with the UDH? I'm able to send concatenated SMS, but not Flash messages.
How can I fix this?

How to handle delivery report in GSM Modem?

i want to use GSM Modem in an application for some purpose.
what i want is handling SMS delivery report for list of sent sms.
GSM Modem inbox & outbox are limited to 15 items. every time i read the inbox the gsm modem return a list an clear the list.
how to check delivery status of sms that had been deleted from GSM Modem inbox ?
i need something unique that enables me to identify each message.
every time i read the inbox the gsm modem return a list an clear the list.
Messages that are stored in modem's memory will not be removed after you read them. You just read message with at+cmgl={message id in storage} command and then remove it using at+cmgd={message id in storage} command (or not, as you wish. You can clear all modem's storages using at+cmgd=1,4 command).
Back to the question: after sending SMS, you'll get a response from modem, smth like this: +cmgs: {sms id, 0 to 255} OK. In case, if Service Center has delivered the SMS successfully, modem will return this response: +cds: {some id which does not matter} {PDU status report}. You need just decode this PDU to obtain status report, id of original SMS and other useful data. If sent sms's ID and ID from status report are equal, you have status report exactly for your message. Note, if you remove message from modem's storage before receiving of delivery report, you'll get report which will be containing all usual information, but status of delivery will be most likely 71 instead of 0.

Long Concatenated WAP PUSH over SMS

Can anyone kindly explain how to send a concatenated WAP PUSH SMS? I can send an SI that spans just one message, but I haven't figured out how to send one that spans multiple messages
If you send a WAP Push message with a SMS Bearer, you've got a SMS with a User Data Header. This User Data Header looks like 0605040B8423F0 and contains so to say source and destination port for the WAP Push App in your phone. 0B84 is the destination port number (2948), 23F0 is the source port number (9200).
To send a WAP Push longer than 133 Bytes you have to add a Concatenation Header to the UDH, the UDH will then look like
0B00033F020105040B8423F0 for the first SMS and
0B00033F020205040B8423F0 for the second SMS
Split the remaining Wap-Push data in 128 Byte Chunks and append them to the UDH.
The glory details are part of the 3GPP Specification 23.040 found at http://www.3gpp.org/ftp/Specs/html-info/23040.htm
hth cheerio
Steve

Resources