The SIM300 module is used to realize the GSM
communication, and it is integrated with the RF circuit and
GSM baseband processor. GSM module and ARM
communicate with each other by AT commands. Firstly, the
ARM serial port and GSM module are initialized, and the
ARM processor sends the command "AT" to the GSM
module to ensure their connection. After that, the commands
"AT+CMGF=1
", "AT+CNMI=2,2,0,0,0
" are sent to
configure the message format as text mode and indicate new
message to ARM processor directly. So the ARM can
directly read the content of the message and realize
automatic detection of any message command. For example,
the command “Light1 ON” is sent to the GSM module, and
the command is responded to ARM as following.