Sending Out An SMS In PDU Mode

PDU mode is a lot more interesting than text mode. There are all kinds of things that can be done with SMS messages, all leveraging special formatting that is only available if you use PDU mode:
- Send flash SMS messages
- Send a bookmark
- Configure the phone
- Send EMS messages
- Send a WAP push
- Send ringtones and wallpapers
- Set or remove the voicemail waiting indicator
The formatting of these PDU’s is a little more complicated and requires some bit manipulations that are hard to do by hand.
The GSM modem is put into PDU mode with the command ‘AT+CMGF=0’. Once in PDU mode, a PDU can be sent using the ‘AT+CMGS’ command:
AT+CMGS=<length><CR> > <here goes your PDU><Crtl-Z>
The actual PDU consists of a number of octets (bytes). In the command, the <length> field represents the number of octets and the PDU is given in the hexadecimal representation of those octets. The ‘> ‘ on the second line is a prompt that is written by the GSM modem to indicate that it is ready to accept your PDU.
Of course the interesting part is what the PDU looks like…. more on this in the post “More on the SMS PDU“.