Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send SMS by GSM modem in PDU mode?

Tags:

modem

gsm

I want to send SMSs in PDU mode. I have checked the spec for my modem, and it supports PDU mode.

I have developed a PDU encoder and decoder, but now I do not know how to send data to my modem. I tried these AT commands:

AT

AT+CMGF=0

after sending these commands I sent the PDU data like this:

AT+CMGW="16079189390500410011000C918939050000000000AA02E834" 

I have checked the correctness of this PDU using this online tool :

http://www.twit88.com/home/utility/sms-pdu-encode-decode

but after sending it via the AT command, the modem hangs.

Is this the right way to send SMS PDUs? I searched on Google and can not find useful information.

like image 870
motevalizadeh Avatar asked Aug 28 '13 13:08

motevalizadeh


People also ask

What is PDU mode SMS?

(PDU stands for Protocol Data Unit.) The mode that a GSM/GPRS modem or mobile phone is operating in determines the syntax of some SMS AT commands and the format of the responses returned after execution. Below are the SMS AT commands affected: +CMGS (Send Message)

Which GSM command is used send the message to a mobile number?

Line 10: The AT command +CMSS is used to send the SMS text message from the message storage of the GSM / GPRS modem.

What is CMGF in GSM?

The AT command +CMGF (command name in text: Message Format) is used to select the operating mode of the GSM/GPRS modem or mobile phone. It takes one parameter. The value of the parameter can either be 0 or 1. The values 0 and 1 refer to SMS PDU mode and SMS text mode respectively.

How can I read GSM SMS module?

To enable a computer / PC to read SMS messages from a message storage area, the GSM/GPRS modem or mobile phone has to support either of the AT commands +CMGR (command name in text: Read Messages) and +CMGL (command name in text: List Messages).


1 Answers

First of all, to send sms when modem is in pdu mode, you must send these commands: AT+CMGS=<length> <CR>, where length is (length of PDU binary string - 2) / 2. When '>' symbol appears you must send your pdu and ctrl+z character (char.ConvertFromUtf32(26)).

Here are some resources that may be useful: http://www.developershome.com/sms/ SMS Tutorial http://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-deliver-pdu-decoder/ another online pdu decoder (but your link is better in my opinion) http://www.fccps.cz/img.asp?attid=24590 AT commands guide (for wavecom, but there is no difference)

Last advice - use any telnet client to connect and test your modem and see how it responds

like image 133
soalflow Avatar answered Oct 03 '22 09:10

soalflow