|Fixed Line SMS Modem
Reference should first be made to the Z-text SMS AT Command Set.
The Z-text supports two different formats for the transfer of messages to and from the host PC, text mode and PDU mode. In text mode, the mobile number and the message are sent as simple ASCII text, but in PDU mode a hexadecimal representation of the binary data to or from the server is sent instead, with all the fields encoded within a single packet known as a PDU (Protocol Data Unit).
PDU mode allows access to many options that are not available in the simpler text mode, such as requesting delivery reports and using alternate character sets. Landline SMS servers normally implement only a small subset of these, with unsupported features either being ignored or causing the PDU to be rejected, so some testing will need to be carried out to determine what a particular server supports.
The commands for use with PDU mode are very similar to those for text mode, and are described in GSM 07.05 section 4.
The PDU is composed of two parts, the SC (Service Centre) address and the TPDU (Transfer Protocol Data Unit). The Z-text will always use the SC address programmed with the AT+CSCA command, so there is no point in specifying one in the PDU. The first byte of the SC address is the length, setting this to 0 indicates that the address has not been supplied and is immediately followed by the TDU.
The format of the TPDU is specified in GSM 03.40 section 188.8.131.52 and there is a good explanation of it at this web site: http://www.dreamfabric.com/sms. The most useful parameter is the Data Coding Scheme, which would be set to 08 to send using Unicode. If using the default 7 bit GSM alphabet then it is recommend to use text mode instead of PDU mode, as the the packing of eight seven bit characters into seven eight bit bytes is then handled by the Z-text.
Enabling PDU mode
Send the command AT+CMGF=0 to enable PDU mode. To return to text mode, use the command AT+CMGF=1
Sending a message
As with text mode, the AT+CMGS command is used:
The '12' after the command is the length of the TPDU, which in this case is one less than the length of the PDU. The Z-text will respond with +CMGS: n in the same way as for text mode.
Receiving a message
The incoming message is announced by the +CMT message in the same way as text mode. The message can then be retrieved with the AT+CMGR or AT+CMGL command, but the format of the response differs slightly from text mode:
The 0 of the +CMGL message is the store number, as with text mode. The 1 corresponds to the “REC READ” that would have been output in text mode. See the definition of <stat> in section 3.1 of GSM 07.05 for other values of this field. The 23 is the length of the TPDU, as with message sending. The first byte of the PDU will always be 00 as the Z-text does not provide the SC address in the PDU.
Details of the GSM alphabets and language-specific information can be found in GSM 03.38
GSM specifications are copyright of ETSI, the latest version of the specifications can be found at www.etsi.org