20.2. Selecting the Operating Mode (AT+CMGF)

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. SMS PDU mode is the default mode if it is implemented on the mobile device.

To find out the operating mode(s) supported by a GSM/GPRS modem or mobile phone, perform a test operation with the +CMGF AT command. Below shows the response returned from my Nokia 6021 mobile phone after the execution of the command line "AT+CMGF=?":


AT+CMGF=?
+CMGF: (0,1)

OK


The information response "+CMGF: (0,1)" indicates Nokia 6021 supports both PDU mode and text mode.

To change the operating mode of a GSM/GPRS modem or mobile phone, perform a set operation with the +CMGF AT command. The following example demonstrates how to set the operating mode to SMS text mode:


AT+CMGF=1
OK


If the operating mode specified is not supported by the GSM/GPRS modem or mobile phone, the final result code "ERROR" will be returned.

To find out the operating mode currently used by a GSM/GPRS modem or mobile phone, perform a read operation with the +CMGF AT command. Here is an example:


AT+CMGF?
+CMGF: 0

OK


The response above indicates the GSM/GPRS modem or mobile phone is using SMS PDU mode.


Previous Page Page 34 of 65 Next Page

Contents at a Glance (Click Here for Full Table of Contents)

Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page