GSM/GPRS/GPS Shield (B)
| ||
Introduction
GSM/GPRS/GPS Shield (B), Arduino Shield Based on SIM808
More |
How to use
Hardware description
- SIM808 module
- MIC29302 power chip
- CP2102: USB TO UART converter
- SMF05C: TVS diode
- 1N5408: onboard rectifier
- SIM808 functional pins
- Arduino expansion connector
- USB TO UART interface
- DC power jack
- GPS antenna connector
- Bluetooth antenna connector
- Firmware upgrade interface
- GSM antenna connector
- SIM card slot
- 3.5mm earphone/mic jack
- GPS status indicator
- CP2102 UART Tx/Rx indicator
- NET indicator:
- flashes fast when the module starts up
- flashes slowly after GSM register succeed
- Power indicator
- Power switch
- SIM808 control button: press the button and hold for 1s, to startup/shutdown the SIM808
- Reset button
- UART selection switch, select controlling the SIM808 via:
- CP2102
- UART pins of Arduino interface
- SIM808 UART configuration:
- SIM_TX: SIM808 UART TX
- SIM_RX: SIM808 UART RX
- IOREF power selection: configure the UART voltage level
Getting started
Preparation
- GSM/GPRS/GPS Shield (B) (this product)
- SIM card
- 5V TTL UART module
- Serial monitor software (installed on your PC)
- u-center software (of course also installed on your PC)
- GSM antenna
- GPS antenna
- Bluetooth antenna
- Micro USB cable
- 9V DC adapter
Basic operation
We will demonstrate some basic operations by GSM mode in this section.
- Power up and the power indicator lights up.
- Switch to CP2102 (UART selection switch).
- Toggle the switch to the side of the USB port by which setting communication between CP2102 and SIM808.
- Press the SIM808 control button and hold for 1s to startup the SIM808 until the NET indicator flashes.
- Run a serial monitor software and set it as:
a) UART settings
PortNum | choose a COM Port (*) |
BaudR | 115200 |
Dpaity | NONE |
DataB | 8 bit |
StopB | 1 bit |
(*) You shall choose the COM Port listed in the Device Manager (This PC -> Properties -> Device Manager).
b) Check the Auto Checksum and then an Apendix bits setting box pops up. Check the Fixed Byte Checksum and input 0D into the following box.
c) Input AT+GSV into the Sending box then click the button Send.
d) You can get the received information from the COM port data receive box.
GSM Debugging
GSM Commands Description
Frequently used commands for sending SMS.
Command | Description | Response |
---|---|---|
AT | Make sure the module is working properly. | AT OK |
AT+CNMI | New SMS message indications, e.g. send: AT+CNMI=2,1 to setup new SMS message indications. When a new message is received and SIM card is not full, the SIM808 module will respond via serial port, e.g. received: +CMTI:"SM",1 means a new message received was stored into the position 1 of the SIM card. | |
AT+CMGF=1 | SMS Configuration | AT+CMGF=1 OK |
AT+CSCS | Select TE Character Set Send: AT+CSCS="GSM" to use GSM 7 bits default alphabet; Send: AT+CSCS="UCS2" to use 16-bit universal multiple-octet coded character set. |
|
AT+CMGR | Read SMS message | |
AT+CSMP | Set SMS Text Mode Parameters. It should be set as AT+CSMP=17,167,2,25 for using the UCS2 format. | |
AT+CMGS="phone number" | Set the message transmission number and send the SMS message. After receiving the symbol >, a message (end with 0x1A) can be sent out. | > |
0x1A | This is a terminator. Before sending it out, you should check the option Send As Hex |
(*) After sending the message, you should check the option Send As Hex, then send the command 1A which means to send a message. Besides, you can send 1B, ESC's ASCII, to cancel sending.
- Sending messages using the GSM default alphabet.
Command | Description |
---|---|
AT | Make sure the module is working properly. |
AT+CMGF=1 | SMS Configuration. |
AT+CMGS="phone number" | Set the message transmission number and send an SMS message. After receiving the symbol >, a message (end with 0x1A) can be sent out. |
0x1A | This is a terminator. Before sending it out, you should check the option Send As Hex |
- Receiving messages using GSM default alphabet
Command | Description |
---|---|
AT | Make sure the module is working properly. |
AT+CMGF=1 | SMS Configuration. |
AT+CSCS="GSM" | Use GSM alphabet |
AT+CNMI=2,1 | Setup new SMS message indications |
AT+CMGR=num | Read SMS message. The num means the storage location of a message. |
- Sending messages using UCS2 character set.
Command | Description |
---|---|
AT | Make sure the module is working properly. |
AT+CMGF=1 | SMS Configuration. |
AT+CSMP=17,168,2,25 | Set SMS Text Mode Parameters. |
AT+CSCS="UCS2" | Use UCS2 character set. |
Use the software Unicode Converter | Use software to convert phone numbers and messages to Unicode. |
AT+CMGS="a phone number in unicode" | Set the phone number (in unicode). After receiving the symbol >, a message (end with 0x1A) can be sent out. |
0x1A | This is a terminator. Before sending it out, you should check the option Send As Hex |
- Receiving messages using UCS2 character set.
Command | Description |
---|---|
AT | Make sure the module is working properly. |
AT+CMGF=1 | SMS Configuration. |
AT+CSCS="GSM" | Use GSM alphabet |
AT+CNMI=2,1 | Setup new SMS message indications |
AT+CMGR=2 | Read SMS message |
Use the software Unicode Converter | Use software to convert messages to Unicode. |
- Frequently used commands for making and receiving calls.
Command | Description | Response |
---|---|---|
ATD13612345678; | Dial 13612345678, end with semicolon(;). You can make a call. | ATD13612345678 ok |
AT+CLIP | Calling line identification presentation | AT+CLIP=1 OK |
ATA | Answer an Incoming Call | RING |
ATH | Disconnect Existing Connection |
(Please see SIM808_AT+Command+Manual_V1.01 for more details of AT commands)
GPS Debugging
Switching to GPS mode from GSM mode
1) Send the following commands:
- AT+ CGNSPWR =1 (GPS power up)
- AT+ CGNSTST =1 (GPS reset)
Return OK.
2) GPS signal output: Choose the GPS serial port.
See GPS information by u-center
1) Open u-center software.
2) Click the button Receiver to set Port or Baudrate. Baudrate is 12500 by default which can be set by the command AT+CGPSIPR. "Port" is the serial port in use.
3) Click Player to check the GPS information.
Remark: Please see the User Guide PDF for more details of u-center.
GPS Command Description
AT+CGNSPWR | GPS power control | =1, GPS power up |
AT+CGNSINF | Get current GPS location info | often 32 |
T+CGPSSTATUS | GPS status |
(Please see SIM808_AT+Command+Manual_V1.01 for more details of AT commands).
GPRS Debugging
Local virtual servers settings
Virtual servers can be used for setting up public services on your LAN. A virtual server is defined as a service port, and all requests from the Internet to this service port will be redirected to the computer specified by the server IP. Please see your router's guide.
- Service Ports setting: set to a no conflict port. In this example, the service port is set as 12345.
- IP Address setting: Run CMD in the PC, and execute the 'ipconfig' command to confirm your IPv4 address. In this example, the IP address is 192.168.1.104.
GPRS Command Description
1) The GPRS configuration can be performed by sending out the following commands sequentially:
command | Description |
---|---|
AT+CSQ | Signal quality report |
AT+CSTT="CMNET" | Set APN as "CMNET". |
AT+CIICR | Bring up a wireless connection with GPRS or CSD |
AT+CIFSR | Get Local IP Address |
AT+CDNSGIP=www.sim.com | Query the IP Address of Given Domain Name |
2) GPRS debugging:
Find out the PC's WAN IP, which can be obtained by searching "IP" in a search engine, or inquiring about your Internet service providers directly. In this example, the WAN IP address is 222.125.175.28. Then send out the following commands sequentially:
Command | Description |
---|---|
AT+CIPSTART="TCP","222.125.175.28","12345" | The WAN IP address should be set according to the actual condition. In this example, the WAN IP address is 222.125.175.28, and the port number is 12345. |
AT+CIPSEND | Send an SMS message. After receiving the symbol >, a message (ending with 0x1A) can be sent out |
0x1A | This is a terminator. Before sending it out, you should check the option Send As Hex |
AT+CIPCLOSE | Close TCP or UDP Connection |
AT+CIPSHUT | Deactivate GPRS PDP Context |
(*) After sending the message, you should check the option Send As Hex, then send the command 1A which means to send a message.
(Please see SIM808_AT+Command+Manual_V1.01 for more details of AT commands).
Bluetooth Debugging
AT commands for Bluetooth debugging
Command | Description |
---|---|
AT+BTPOWER=1 | BT power control. =1, BT power up |
AT+BTHOST? | Inquiry and set host BT device name. Response: Name and MAC address |
AT+BTSCAN=1,10 | Scan surrounding BT device. Scanning time 10-60s (10s here) |
AT+BTPAIR=1,1 | Set BT pairing mode. To connect with a BT device, you need input
AT+BTPAIR=1,1 to confirm the pairing request. |
AT+BTACPT=1 | There is a request that tries to build an SPP's
connection. |
AT+BTATD=10086 | Dial up a voice call using a BT device. Here 10086 is a phone number to be dialed. |
How to use Arduino UNO R3
Preparation
- GSM/GPRS/GPS Shield (B) (this product)
- Arduino UNO R3
- SIM card
- USB cable (type B)
- Serial monitor software (installed on your PC)
- u-center software (of course also installed on your PC)
- GSM antenna
- GPS antenna
- Bluetooth antenna
- 9V DC adapter
1) Operation
- Tag 1: Connect a USB cable (type B) to your Arduino.
- Tag 2: Connect a micro USB cable to the module.
- Tag 3: DC power supply (6-9V).
- Tag 4: Power up your board.
- Tag 5: Set the VREF for your Arduino.
- Tag 6: Connect a GPS antenna.
- Tag 7: SIM808 control button.
- press the button and hold for 1s, to startup/shutdown the SIM808
- Tag 8: Connect a BT antenna.
- Tag 9: Connect a GSM antenna.
- Tag 10: SIM808 UART configuration
- SIM_TX: SIM808 UART TX
- SIM_RX: SIM808 UART RX
- Tag 11: Set the UART communication port, select controlling the SIM808 via:
- CP2102
- UART pins of Arduino interface
Software Debugging
For example, we use GPS in the steps:
- Set the UART communication port to Arduino.
- Press PWRKEY and hold for 1s to startup the SIM808.
- Upload the program to your Arduino R3
- Open Arduino's Serial Monitor.
- Press RESET
Or use the software U-center instead of Serial Monitor.
How to use NUCLEO-F401RE
Preparation
- GSM/GPRS/GPS Shield (B) (this product)
- NUCLEO-F401RE
- ST-LINK Debugger
- Micro USB cable
- Serial monitor software (installed on your PC)
- u-center software (of course also installed on your PC)
- 9V DC adapter
1) Operation
- Tag 1: SIM808 UART configuration
- SIM_TX: SIM808 UART TX
- SIM_RX: SIM808 UART RX
- Tag 2: Connect a micro USB cable to the serial port of Nucleo board.
- Tag 3: DC power supply (6-9V).
- Tag 4: Jumper settings: Enable the communication between STM32 MCU and this product.
- RX---PA3
- TX---PA2
- Tag 5: Jumper settings: Enable the communication between CP2102 and STM32 MCU.
- RX---PC7
- TX---PC6
- Tag 6: Power up your board.
- Tag 7: Set the VREF for your Nucleo.
- Tag 8: Connect a GPS antenna.
- Tag 9: SIM808 control button.
- press the button and hold for 1s, to startup/shutdown the SIM808
- Tag 10: Connect a BT antenna.
- Tag 11: Connect a GSM antenna.
- Tag 12: SIM808 UART configuration
- SIM_TX: SIM808 UART TX
- SIM_RX: SIM808 UART RX
Software Debugging
For example, we use GPS by the following steps:
- Download the program to your NUCLEO-F401RE using ST-LINK.
- Press the RESET button.
- Download the program to your Nucleo.
- Open serial monitor software. Choose the serial port and set the baud rate as 115200. Press RESET and get the info.
- Or use the software U-center instead of serial monitor software.
Resources
Datasheets
GSM808 Related
- SIM800 Bluetooth applocation
- SIM800 Series GNSS Application Note V1.00
- SIM808 SPEC V1507.pdf
- SIM808 Hardware Design V1.02.pdf
- SIM800 Series AT Command Manual V1.09
Other chips
FAQ
if you want to control the switch of the module, it is controlled by A5. Keep A5 at high level for two seconds to turn on or off, and maintain low level when idle
The following program can be used to control the power on and off of SIM8XX:
#define SIM800_RX_PIN 2 #define SIM800_TX_PIN 3 #define SIM800_START_PIN 0 // Wire this to A5 // setup pinMode(SIM800_START_PIN, OUTPUT); digitalWrite(SIM800_START_PIN, LOW); // start SIM800 while(!sim800l->isReady()) { Serial.println(F("Problem initialising AT command, initialising and retry in 3 sec")); // Activate module Serial.println(F("Activate SIM800")); digitalWrite(SIM800_START_PIN, HIGH); delay(2100); digitalWrite(SIM800_START_PIN, LOW); delay(1000); }
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)