Check out the most advanced Arduino GPRS shield available.
The XG8100 uses the latest SIM900 GPRS modem with a build-in SIM card socket. This shield includes an on-board high-current power supply. All GPRS modems require a 2Amp power supply, but unlike our competitors, we add this required power supply on the shield.
In the DOCUMENTS section you can find a complete manual on the use of AT commands. These commands allow you to quickly init the modem, send SMS messages and make a TCP/IP connection because TCP/UDP functionality is build-in.
Remote control of your projects becomes suddenly easy.
- Powerfull GPRS modem with build-in SIM card socket
- 2Amp power supply with a 6V to 30V input range. Ideal for your 24V projects.
- TCP/IP stack included
- SMS message support
- Full AT command control
- Arduino Soft-Serial bus compatible
- The hardware serial bus of the Uno is always available for debugging
- Minimum I/O lines used
- Optional magnetic antenna
- Full auto configuration - no jumpers required
- X-Graph Arduino stackable connectors. Stack as many X-Graph Arduino Shields as you need.
I/O pins used: 3
The XG8100 GPRS Shield does not require an Arduino library. The GPRS firmware includes support for sending and receiving SMS and also a complete TCP/IP stack.
With simple AT commands the modem can be controlled and a TCP or UDP channel can be opened.
The module connects to your Arduino module with a software serial bus. The hardware serial bus of the Arduino Uno is always available for debugging.
The Example code shows you how to power on/off the modem and start a AT command session. The manual of the GPRS modem (DOCUMENTS section) includes many AT sequences, for example one for sending and receiving SMS messages.
The modem has a build-in TCP/IP stack and allows you to make a TCP or UDP connection with your project remotely. All functions require a minimum of Arduino memory as the complex algorithms are processed by the modem itself.
/*
Send AT commands to the GPRS modem
This example shows how to send AT commands to the
© Copyright DELCOMp XG8100 GPRS shield and receive the modem
responses.
© Copyright DELCOMp 2011-2012, All Rights Reserved
DELCOMp bvba, Technologielaan 3, B-3001 Leuven, Belgium
http://www.xgraph.be ©
Change History:
Date: 1.0, 28 Sep 2011
1.1, 10 Jan 2012
- R2 support
This example code is in the public domain.
XG8100 GPRS Shield functions demonstrated:
- power on GPRS modem
- send AT commands
- dump data received
NewSoftSerial does not use handshaking which is not
needed for the GPRS modem running at 9600 baud.
*/
#include <SoftwareSerial.h>
//#include <NewSoftSerial.h>
#define pin_pon 3
#define rxPin 4
#define txPin 6
// set up a new serial port
//NewSoftSerial gprs = NewSoftSerial(rxPin, txPin);
SoftwareSerial gprs = SoftwareSerial(rxPin, txPin);
void setup() {
Serial.begin(9600); // Debug window
gprs.begin(9600); // GPRS modem
Serial.println("Modem init...");
digitalWrite(pin_pon, LOW); // Default level of power on pin is high
pinMode(pin_pon, INPUT); // This pin has an internal pullup in the modem
while (digitalRead(rxPin)) { // If modem is on
Serial.println("... power off");
pinMode(pin_pon, OUTPUT); // Power it off = reset the modem
delay(1000);
pinMode(pin_pon, INPUT);
delay(2200); // 1.7sec standard delay + 500msec before power on can be done
}
Serial.println("... power on");
pinMode(pin_pon, OUTPUT);
delay(1000);
pinMode(pin_pon, INPUT);
delay(2200); // Wait min. 2.2 seconds
// A check for rx_pin (power level) could be done here, not really needed
Serial.println("... autobauding");
gprs.print("A"); // Send one character for autobauding
delay(3000); // Wait min. 3 seconds for modem to init
Serial.println("Modem ready for commands");
gprs.flush();
}
void loop() {
byte a;
a = 0;
// Copy data received from the serial monitor to the GPRS module
while (Serial.available() > 0) { // Wait for data from the serial monitor
a = Serial.read(); // Then send the complete string
gprs.write(a);
}
if (a) gprs.println(""); // A CRLF is needed to accept the command
// and vice versa
if (gprs.available() > 0) { // All data received from the modem
a = gprs.read(); // is echoed to the serial monitor
Serial.write(a);
}
}
Example 1: Get information
AT
OK
-> The AT command interpreter is actively responding to input.
ATI
SIM900 R11.0
-> The product name and product release information.
AT+GSV
SIMCOM_Ltd
SIMCOM_SIM900
Revision:1137B01SIM900M32_ST
-> Product and manufacturer information.
AT+COPS?
+COPS: MOBISTAR
OK
-> The current network operator.
Example 3: SMS
AT+CMGF=1
OK
-> Put the SMS system into text mode
AT+CSCS="GSM"
OK
AT+CMGS="+32475123456"
+CMGS:34
>This is a test message
OK
AT+CMGR=1
+CMGR:"REC UNREAD","+32475123456",,"02/01/30:40:31+00",This is a test message
OK
-> Send SMS message to yourselves, then read it from the received queue
Example 4: Switch to GPRS mode
ATD*99#
CONNECT
-> Switch to GPRS mode
-> now data can be transmitted/received
+++
ATH
OK
-> End GPRS mode