The SIM900A GSM modem can communicate with controlling devices through UART, I2C, or SPI protocols, providing flexible interface options for different applications. This cellular module functions as a complete mobile equipment unit with its own IMEI number, capable of handling all standard cellular operations including voice calls, SMS/MMS messaging, fax transmission, and GPRS internet connectivity.
The modem operates using AT commands, which allow full configuration and control when sent through its communication interfaces. Historically, basic mobile phones like older Nokia models were built by directly connecting components such as displays, keypads, and audio systems to similar modem modules. Modern smartphones, however, have evolved to use powerful processors running sophisticated operating systems like Android and iOS, which handle these functions at a much higher level while still ultimately communicating with cellular modem chips for network connectivity. The SIM900A represents the earlier approach where the modem itself served as the primary processing unit for cellular functions.
Wireless modems like the SIM900A communicate using AT commands, which stands for “Attention” commands – these text-based instructions form the control language that configures and operates the module. These modules support communication through standard interfaces including UART (the most common serial protocol), I2C (for peripheral connections), and SPI (enabling high-speed data transfer). Any microcontroller like Arduino or single-board computer like Raspberry Pi can control these modems by sending AT commands through these interfaces, just as desktop computers can using USB-to-serial adapters.
The AT command standard originated from the Hayes command set but has evolved to include technology-specific extensions for modern cellular standards. Basic commands like “AT” for attention or “ATD” for dial remain consistent, while network-specific commands vary – GSM/GPRS modules use commands like “AT+CSQ” to check signal strength, 4G/LTE modems implement “AT+CGACT” for PDP context management, and NB-IoT devices support specialized commands like “AT+NBAND?” for band selection. Manufacturers also implement proprietary variations, so a command on a SIM800 module might behave differently than on a SIM900.
These modems process commands similarly to how CPUs execute instructions: they receive ASCII-formatted AT commands through their serial interfaces, execute the requested operation (whether making a call, sending SMS, or connecting to data), then return standardized responses like “OK”, “ERROR”, or relevant data outputs. For example, sending “AT+CMGF=1” sets the SMS mode to text format, to which the modem replies “OK” upon success. This standardized communication method enables diverse applications from remote sensor systems sending SMS alerts to IoT devices transmitting data via GPRS and embedded systems adding cellular connectivity. The consistent AT command structure across manufacturers allows developers to interface with different modems while accounting for vendor-specific variations in implementation.
The AT-Command List
The SIM900 modem supports specific AT commands for managing voice call functionality, enabling users to both initiate and receive phone calls programmatically. These voice call-related AT commands allow complete control over call operations including dialing numbers, answering incoming calls, adjusting call settings, and terminating active connections. For example, basic call control commands include ATD to dial a number, ATA to answer incoming calls, and ATH to hang up active calls, while supplementary commands like AT+CLIP enable caller ID functionality and AT+VTS supports DTMF tone generation during calls.
SMS Messaging with AT Commands on SIM900 Modems
The SIM900 modem provides a comprehensive set of AT commands for complete SMS management, enabling both sending and receiving text messages through programmable control. These SMS-related AT commands allow developers to configure message formats (text vs. PDU mode), specify storage locations, read/write messages, and manage delivery reports. Key commands include AT+CMGF to set the message format (1 for text mode, 0 for PDU mode), AT+CMGS to send messages, AT+CMGR to read stored messages, and AT+CMGD to delete messages from memory. The modem also supports advanced SMS features through commands like AT+CNMI for new message indication alerts and AT+CSMP for setting text mode parameters including validity periods. Unlike voice call commands that focus on real-time communication, these SMS commands provide persistent message storage and retrieval capabilities, making them ideal for remote monitoring systems, alert notifications, and two-factor authentication implementations where message delivery confirmation and timestamp accuracy are critical.
HTTP Data Communication via AT Commands on SIM900 Modems
The SIM900 modem supports HTTP protocol communication through specialized AT commands, enabling bidirectional data transfer with web servers. Before any HTTP interaction, the modem must establish a GPRS connection by configuring a bearer profile using commands like AT+SAPBR to define parameters such as APN, username, and password.
For HTTP data operations, the modem implements two fundamental methods:
- GET Method – Retrieves data from a server (e.g., fetching sensor readings or API responses). Implemented via:
- AT+HTTPINIT (Initialize HTTP service)
- AT+HTTPPARA=”URL”,”example.com/api” (Set target URL)
- AT+HTTPACTION=0 (Execute GET request)
- POST Method – Sends data to a server (e.g., uploading device logs or form data). Requires additional steps:
- AT+HTTPPARA=”CONTENT”,”application/json” (Set content type)
- AT+HTTPDATA=<size>,<timeout> (Prepare POST payload)
- AT+HTTPACTION=1 (Trigger POST request)
Considerations:
- The modem must maintain an active GPRS connection (AT+CGATT=1)
- SSL/TLS support (if needed) requires separate configuration
- Responses are accessed via AT+HTTPREAD and terminated with AT+HTTPTERM
TCP/IP Protocol Support via AT Commands in SIM900 Modems
The SIM900 modem provides robust TCP/IP networking capabilities through specialized AT commands, enabling both single and multiple concurrent socket connections. For TCP/IP communication, the modem operates in two distinct connection modes: single-connection mode (limited to one active socket connection) and multi-connection mode (supporting up to eight simultaneous connections). These connections can function in either transparent mode (where data passes directly through the modem) or non-transparent mode (which requires explicit framing and control). Notably, when using multi-connection mode, the SIM900A exclusively operates in non-transparent application mode, requiring proper packet framing and manual connection management. The modem implements standard AT commands like AT+CIPSTART to initiate connections, AT+CIPSEND for data transmission, and AT+CIPCLOSE to terminate sessions, providing developers with flexible options for IoT applications, remote monitoring, and other networked solutions that require reliable cellular-based IP connectivity.
Example Workflow for Sensor Data Fetch:
Key features include:
- Dual-mode operation (transparent/non-transparent)
- Support for both TCP and UDP protocols
- Configurable keep-alive timers
Sending AT Commands from User Programs to Wireless Modems
Developers can interface with wireless modems like the SIM900 by sending AT commands programmatically through scripting languages such as Python. These commands are transmitted as byte sequences over serial communication, requiring proper handling of line termination characters and special control codes. The implementation varies between Python versions – Python 3 uses ‘\r’ (carriage return) for command line entry, while Python 2 requires ‘\r\n’ (carriage return + line feed) to properly terminate commands.
String manipulation functions become essential when dealing with AT command protocols, particularly for encoding special characters like CTRL+Z (ASCII 26), which often serves as the message termination character in SMS transmissions. In Python 3, the str.encode() method converts command strings to bytes for serial transmission, while control characters can be inserted using either char(26) or its hexadecimal equivalent char(0x1A). For binary data or complex command sequences, developers may need to combine string formatting with careful serial buffer management to ensure reliable modem communication.
Key Implementation Considerations:
- Serial port configuration (baud rate, parity, timeouts)
- Proper command termination for the target modem
- Response parsing and error handling
- Platform-specific line ending requirements
- Special character handling in different language versions
Basic AT Command Test Sequence
1. Communication Check
Send: AT
Expected Response: OK
Purpose: Verifies serial communication is working.
2. Signal Strength Check
Send: AT+CSQ
Expected Response: +CSQ: <rssi>,<ber>
(e.g., +CSQ: 24,0
→ Good signal)
Notes:
-
RSSI (0-31): Higher values = better signal (99 = not detectable)
-
BER (0-7): Bit Error Rate (0 = best)
3. SIM Card Detection
Send: AT+CPIN?
Expected Response: +CPIN: READY
(or NOT INSERTED
/SIM PIN
if locked)
4. Network Registration
Send: AT+CREG?
Expected Response: +CREG: 0,1
(1 = registered, 5 = roaming)
5. GPRS Attach Status
Send: AT+CGATT?
Expected Response: +CGATT: 1
(1 = attached to GPRS)
6. Battery Voltage (if supported)
Send: AT+CBC
Expected Response: +CBC: <bcs>,<bcl>,<voltage>
(e.g., +CBC: 0,90,4200
= 4.2V)
SIM900A Schematics diagram
Wiring Guide using Orange Pi with SIM900
To connect an Orange Pi to a SIM900A module, first wire the SIM900A’s TX pin to the Orange Pi’s RX pin (UART receive) and the SIM900A’s RX pin to the Orange Pi’s TX pin (UART transmit), ensure both devices share a common ground (GND), and power the SIM900A with a stable 5V/2A supply; then enable the Orange Pi’s UART interface by configuring the device tree or boot parameters, install a serial communication tool like minicom or pyserial in Python, and finally test the connection by sending basic AT commands (e.g., AT or AT+CSQ) through the serial port (typically /dev/ttyS1 or /dev/ttyUSB0 if using a USB adapter). For OS Installation please refer to this link / For Third pary operating system image please refer to this link
Wiring Guide using Raspberry Pi with SIM900
To connect your Raspberry Pi to a SIM900A module, first wire the SIM900A’s TX pin to the Raspberry Pi’s RX (GPIO 15) and the SIM900A’s RX pin to the Raspberry Pi’s TX (GPIO 14), ensuring you also connect both devices’ ground pins together. Power the SIM900A with an external 5V/2A power supply (not from the Pi’s GPIO pins) as the modem requires more current than the Pi can safely provide. Enable the Pi’s serial interface by running sudo raspi-config
to disable the console and enable the serial port hardware. Install Python’s pyserial library using pip install pyserial
, then create a Python script to send AT commands like “AT” or “AT+CSQ” through the serial port (typically /dev/ttyS0) to test the connection. Remember to add a 1-second delay between commands and check for “OK” responses to verify proper communication. For SMS or call functionality, use specific AT commands like “AT+CMGF=1” for SMS text mode or “ATD+123456789;” to make a call, always terminating SMS messages with Ctrl+Z (ASCII 26). If you encounter issues, double-check your wiring, ensure the SIM card is properly inserted with active service, and verify the baud rate (usually 9600 for SIM900A). For more stable operation, consider adding a 1kΩ resistor between the Pi’s TX and the SIM900A’s RX line to prevent potential voltage issues. For installation and other distros please refer to this link
Python Code Example
Making Calls from a Desktop Computer Using SIM900 Modem
Step 1: Prepare the Python Environment
-
If adapting a Raspberry Pi script for desktop use:
-
Comment or remove these RPi-specific lines:
-
Step 2: Configure Serial Communication
2. Connect your SIM900 modem via USB-to-Serial adapter and:
-
Identify the COM port (Windows) or
/dev/tty*
device (Linux/Mac)-
Windows Example: Typically
COM3
,COM22
, etc. (check Device Manager) -
Linux/Mac: Usually
/dev/ttyUSB0
or/dev/ttyACM0
-
Step 3: Execute Call Commands
3. Use these AT commands to make a call:
- Baud Rate: Ensure consistency between script (
9600
) and modem configuration - Error Handling: Always check responses:
Permissions: On Linux, ensure user has read/write access to /dev/tty*
devices
The Complete Example Code
Troubleshooting:
No response? Verify:
- Correct COM port
- USB-Serial driver installation
- SIM card network status (
AT+CREG?
)
Call fails? Check:
- Balance/network coverage (
AT+CSQ
) - International number formatting (
+
prefix)