Template: GSM/GPRS/GPS HAT User Manual

From Waveshare Wiki
Jump to: navigation, search


How to use

Hardware configuration

1.SIM card connection
2.Hardware connection
3.Devices Manager
4.Power on

This module comes with power adapter, micro USB cable, GSM antenna, GPS antenna and Bluetooth antenna. Besides these you should prepare two more things:

  • A SIM card, the card should be usable and GPRS access (for testing the GPRS)
  • An earphone with a microphone on it (For testing Call function)
  1. Insert the SIM card to the card slot, plug the earphone and connect the GSM antenna
  2. Install CP2102 driver, plug the jumper B, and connect the USB to UART interface of GSM/GPRS/GNSS HAT to PC with a micro USB cable. Then the PWR indicator will keep bright.
  3. Open Device Manager to get the corresponding COM port number of CP2102. For example, it is COM7 as below. Users need to choose the correct port according to the Manager.
  4. Press the PWRKEY button and hold for 1s, the NET indicator will blink as below. Generally, the NET indicator will fast flash firstly (1 time per second), which means that the module has not logged in the Network. After logging in, the indicator become to flash slowly (1 time every three seconds). Up to the local GSM network, this process that logging in will last several seconds to dozens of seconds.
    If you take too much time to log in and failed, please check that whether the GSM antenna is connected correctly, and whether the SIM card is usable and insert correctly.

GSM Debugging



General AT commands

Command Description Return
ATE ATE1 Echo mode on
ATE1 Echo mode off
OK
AT+COLP AT+COLP=1 Enable +COLP notification
AT_COLP=0 Disable +COLP notification
OK
AT+CLIP AT+CLIP=1 Enable +CLIP notification
AT+CLIP=0 Disable +CLIP notification
OK
ATD<phone_number>; Call a phone number, for example: ATD10086;
Must finished with Halfwidth semicolon
OK
ATA Answer the phone OK
ATH Hang up the phone OK
AT+CNMI AT+CNMI=2,1 Enable new SMS message indicator OK
AT+CMGF AT+CMGF=1 Set the format of messages to Text mode
AT+CMGF=0 Set the format of messages to PDU mode
OK
AT+CSCS Select TE character set
AT+CSCS="GSM" GSM 7 bit default alphabet
AT+CSCS="UCS2" 16-bit universal multiple-octet coded character set
OK
AT+CSMP AT+CSMP=17,168,2,25 Set SMS text mode parameters OK
AT+CMGR AT+CSMP=17,168,2,25 Set SMS text mode parameters OK
AT+CMGS AT+CMGS="phone_number"
Send SMS to the corresponding phone
>
0x1A End mark. Check the option ”Send As Hex” then send it

For more details of AT commands, please refer to:SIM800 Series_AT Command Manual_V1.10

Making calls

  1. Insert the SIM card, connect the GSM antenna and TLL serial wires correctly. Then power on the board;
  2. Check whether the indicators blink correctly (PWR’s and STA’s keep bright, NET’s flashes).
  3. Send “AT+CPOM?” and Enter to query the status of SIM card. Getting “+CPIN: READY” if the SIM card is OK
  4. Call number: for example, “ATD10086;” (10086 is the number of China Mobile Communications Corporation)
  5. Send “ATH” and Enter to hang up the call, as below:
Note:Check “发送新行” is equal to Enter

Answering calls

  1. Enable CLIP notification: AT+CLIP=1 then Enter
  2. Answering: ATA and Enter; Hang up: ATH then Enter
GSM-GPRS-GNSS-UM-6.jpg

Send English messages

  1. Plug the SIM card, connect the GSM antenna and TLL serial wire correctly. Then power on;
  2. Check whether the indicator blink correctly (PWR and STA keep bright, NET flashes).
  3. Set the local SMSC:AT+CSCA="+8613800755500" then Enter, get response “OK”. Note: The SMSC will be different on different area. In this part, it is Shenzhen China as examples.
  4. AT+CMGF=1: Set SMS to TEXT mode;
  5. AT+CMGS="xxxxxxxxxxx” then Enter, set the number of receiver, then you will get response: >, edit the content of message (needn’t Enter at the end). After editing, send 1A in HEX format to send the message (0x1A is key value of “CTRL+Z”, it will tell the module to send). If the message is send successfully, module will get the reply +CNGS: 174 as below figures.
GSM-GPRS-GNSS-UM-7.jpg

Receive English messages

  1. Send a message “this is a receive test” to the GSM/GPRS/GSNN HAT
  2. While receiving messages, module will report it through UART: “SM”, 3, it means that there are 3 messages in SM, and the message we received just now is the third message.
  3. Reading messages:AT+CMGR=3 to read the third message (AT+CMGL="ALL" to read all messages)
  4. Deleting message:AT+CMGD=3, to delete a message as below
GSM-GPRS-GNSS-UM-8.jpg

Send Chinese message

  1. AT+CSCS="UCS2", Set the characters set as UCS2
  2. AT+CSMP=17,128,2,25
  3. AT+CMGS="00310038003500360035003700300038003600340030", set the phone number of receiver with UCS2 set
  4. After getting the response >, edit the contents of message (has been converted) without Enter at the end. Then send 1A in HEX format as below
GSM-GPRS-GNSS-UM-9.jpg

Receive Chinese message

  1. Send AT+CMGF=1 to set Text mode
  2. Send AT+CSCS="GSM" to set characters set as GSM
  3. If receiving messages, module will report it through UART. Reading message: AT+CMGR=3, Then convert the message to Chinese characters with the software as below.
GSM-GPRS-GNSS-UM-10.jpg

GPS Debugging