8-bitMicrocontrollers Application Note Rev. 8016A-AVR-02/06 AVR323: Interfacing GSM modems Features • Interface to GSM modems. • Implementation of AT-Command set. • PDU string compression and decompression. • SMS transmission, how to send and receive. 1 Introduction The GSM net used by cell phones provides a low cost, long range, wireless communication channel for applications that need connectivity rather than high data rates. Machinery such as industrial refrigerators and freezers, HVAC, vending machines, vehicle service etc. could benefit from being connected to a GSM system. Take a given example. A garage offers a very special package to their customers. Based on the mechanics knowledge and the given vehicle, tailored service intervals can be specified. A part of the service agreement is installation of a GSM modem in the vehicle. An onboard service application can then notify the garage when the vehicle approaches its service interval. The garage will schedule an appointment and inform the customer. The customer will benefit from a reliable and well-serviced vehicle at a minimum cost. The garage on the other hand can provide excellent customer support, vehicle statistics, efficient work scheduling, and minimum stocks. This application note describes how to use an AVR to control a GSM modem in a cellular phone. The interface between modem and host is a textual protocol called Hayes AT-Commands. These commands enable phone setup, dialing, text messaging etc. This particular application connects an AVR Butterfly and Siemens®M65 cellular phone using a RS232 based data cable. Most cellular phones could be used, except Nokia®phones using F or M-bus. Figure 1-1.Interconnection phone vs. AVR
has intentionally blurred sections.
Sign up to view the full version.
2 AVR323 8016A-AVR-02/06 2 Theory of operation The protocol used by GSM modems for setup and control is based on the Hayes AT-Command set. The GSM modem specific commands are adapted to the services offered by a GSM modem such as: text messaging, calling a given Phone number, deleting memory locations etc. Since the main objective for this application note is to show how to send and receive text messages, only a subset of the AT-Command set needs to be implemented. The European Telecommunication Standard Institute (ETSI) GSM 07.05 defines the AT-Command interface for GSM compatible modems. From this document some selected commands are chosen, and presented briefly in this section. This command subset will enable the modem to send and receive SMS messages. For further details, please consult GSM 07.05. 2.1 AT-Command set The following section describes the AT-Command set. The commands can be tried out by connecting a GSM modem to one of the PC’s COM ports. Type in the test-command, adding CR + LF (Carriage return + Line feed = \r\n) before executing. Also see chapter 3.1 for further details.
This is the end of the preview.
access the rest of the document.