GSM/GPRS/GNSS HAT User Manual GSM/GPRS/GNSS

4m ago
39 Views
0 Downloads
1.48 MB
32 Pages
Transcription

GSM/GPRS/GNSS HAT User ManualGSM/GPRS/GNSS HATUser ManualOVERVIEWThis is a handy, low power Raspberry Pi HAT which features multi communicationfunctionalities: GSM, GPRS, GNSS and Bluetooth.It allows your Pi to easily make a telephone call, send messages, connect to wirelessInternet, global position, transfer data via Bluetooth, and so on.FEATURESGENERAL Raspberry Pi connectivity, compatible with Raspberry Pi 2B/3B/3B /Zero/Zero W Supports SMS, phone call, GPRS, DTMF, HTTP, FTP, MMS, email, etc. Support GPS, COMPASS, Glonass, LBS base station positioning, omni-positioning Bluetooth 3.0, supports data transferring through Bluetooth Onboard USB TO UART converter CP2102 for UART debugging 6x LEDs for indicating the module working status SIM card slot for 1.8V/3V SIM card RTC with backup battery holder Baudrate auto detection (1200bps 115200bps)1 / 32

GSM/GPRS/GNSS HAT User Manual Control via AT commands (3GPP TS 27.007, 27.005, and SIMCOM enhanced ATCommands) Supports SIM application toolkit: GSM 11.14 Release 99 Comes with development resources and manual (examples for RaspberryPi/Arduino/STM32)GSM/GPRS BandoGSM 850/EGSM 900/DCS 1800/PCS 1900 MHzoQuad-band auto searchoCompliant to GSM phase 2/2 Emitting poweroClass 4 (2W @ GSM 850/EGSM 900 MHz)oClass 1 (1W @ DCS 1800/PCS 1900 MHz)GPRS connectivityoGPRS multi-slot class 12 (default)oGPRS multi-slot class 1 12 (configurable)GPRS data featureoDownlink speed: max 85.6kbpsoUplink speed: max 85.6kbpsoCoding schemes: CS-1\CS-2\CS-3\CS-42 / 32

GSM/GPRS/GNSS HAT User Manual oSupports PAP (Password Authentication Protocol) for PPP connectionoSupports PBCCHoSupports USSDSMSoSupports: MT/MO/CB/Text/PDU modeoSMS storage: SIM cardAudiooVoice encode/decode mode: Half Rate\Full Rate\Enhanced FullRate\Adaptive muti rateoSupports echo cancellationoSupports noise reductionGNSS Receiver typeo33 tracking channelso99 acquisition channelsoGPS L1 C/A codeSensitivityoTracking: -165 dBmoCold starts : -148 dBm3 / 32

GSM/GPRS/GNSS HAT User Manual Time-To-First-FixoCold starts : 28s (typ.)oHot starts : 1soWarm starts: 26sAccuracyoHorizontal position : 2.5m CEPBLUETOOTH1. Integrates AT commands2. Compliant to Bluetooth specification3.0 EDR3. Supports SPP, OPP, HFP/HSP, etc.MISC Operating voltage: 5V Operating temperature: -40 C 85 C Storage temperature: -45 C 90 C Dimensions: 30.2mm x 65mm4 / 32

GSM/GPRS/GNSS HAT User ManualWHAT’ S ON BOARD1. SIM868 module2. ZMM5V1: regulator diode3. SMF05C: TVS diode4. CP2102: USB TO UART converter5. MP1482: power chip6. NDC7002N: voltage level translator7. GPS status indicator5 / 32

GSM/GPRS/GNSS HAT User Manual8. NET indicator: flashes fast when the module starts up flashes slowly after GSM register succeed9. STA module working status indicator10. SIM868 UART Tx/Rx indicator11. Power indicator12. SIM868 control button: press the button and hold for 1s, to startup/shutdownthe SIM86813. Raspberry Pi GPIO connector14. SIM card slot15. USB TO UART interface16. 3.5mm earphone/mic jack17. GNSS antenna connector18. Bluetooth antenna connector19. GSM antenna connector20. CR1220 battery holder: for RTC backup battery21. UART selection switch A: control the SIM868 through USB TO UART B: control the SIM868 through Raspberry Pi C: access Raspberry Pi through USB TO UART6 / 32

GSM/GPRS/GNSS HAT User ManualCONTENTOverview. 1Features . 1General . 1GSM/GPRS . 2GNSS . 3Bluetooth . 4Misc . 4What’s on Board . 5Test on PC . 9Hardware configuration . 9GSM Testing . 11Common AT Commands . 11Take calls . 13Answer calls . 14SMS. 14Receive SMS . 15GNSS Testing . 16Common AT commands . 16Configuration . 177 / 32

GSM/GPRS/GNSS HAT User ManualGPRS Testing . 19Common AT Commands . 19Setting local virtual server . 20Searching WAN IP . 20Testing . 21Sending data . 22Receiving Data . 22Deactivate Connection . 23Bluetooth Testing . 24Common AT Commands . 24Setting . 25Connecting. 26Demo code (Raspberry Pi) . 29Hardware Configuration . 29UART Setting (Raspberry Pi) . 30Testing with minicom . 31Demo codes . 318 / 32

GSM/GPRS/GNSS HAT User ManualTEST ON PCHARDWARE CONFIGURATIO NThis module comes with a power adapter, micro USB cable, GSM antenna, GPSantenna 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 GSMantenna9 / 32

GSM/GPRS/GNSS HAT User Manual2.Install CP2102 driver, plug the jumper B, and connect the USB to UART interfaceof GSM/GPRS/GNSS HAT to PC with a micro USB cable. Then the PWR indicatorwill keep bright.3.Open Device Manager to get the corresponding COM port number of CP2102. Forexample, it is COM7 as below. Users need to choose the correct port according tothe 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 meansthat the module has not logged in the Network. After logging in, the indicatorbecome 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 GSMantenna is connected correctly, and whether the SIM card is usable and insertedcorrectly.10 / 32

GSM/GPRS/GNSS HAT User ManualGSM TESTINGCOMMON AT COMMANDSCommandDescriptionATInquiry states of SIM module0x1AEnd mark. Check the option ”Send As Hex” then sendReturnOKitTaking call CPIN:AT CPIN?Inquiry states of SIM cardREADYAT CLIPAT CLIP 1 Enable CLIP notificationOKATD phone numb Call a phone number, for example: ATD10086;OKer ;Must finished with Halfwidth semicolonATAAnswer the phoneOKATHHang up the phoneOKSMSAT CSCA ”xxxx” Set local SMS service centerOKAT CMGF 1 Set the format of messages to Text modeAT CMGFOKAT CMGF 0 Set the format of messages to PDU mode11 / 32

GSM/GPRS/GNSS HAT User ManualSelect TE character setAT CSCS "GSM" GSM 7 bit default alphabetAT CSCSOKAT CSCS "UCS2" 16-bit universal multiple-octet codedcharacter setAT CSMPAT CSMP 17,168,2,25 Set SMS text mode parametersOKAT CMGF 1 Read the message which is saved at placeAT CMGR1AT CMGS "phone number"AT CMGS Send SMS to the corresponding phone其他指令ATE1 Echo mode onATEOKATE1 Echo mode offAT COLPAT COLP 1 Enable COLP notificationAT COLPAT CNMIAT CNMI 2,1 Enable new SMS message indicatorOKFor more details of AT commands, please refer to:SIM800 Series AT CommandManual V1.0912 / 32

GSM/GPRS/GNSS HAT User ManualTAKE CALLS1. Insert the SIM card, connect the GSM antenna and TLL serial wires correctly. Thenpower on the board;2. Check whether the indicators blink correctly (PWR and STA keep bright, NETflashes every three seconds).3. Send “AT CPIN?” and Enter to query the status of SIM card. Getting “ CPIN:READY” if the SIM card is ready4. Call number: for example, “ATD10086;” (10086 is the number of China MobileCommunications Corporation)5. Send “ATH” and Enter to hang up the call, as below:13 / 32

GSM/GPRS/GNSS HAT User ManualANSWER CALLS1. Enable CLIP notification: AT CLIP 1 then Enter2. Answering: ATA and Enter;3. Hang up: ATH then EnterSMS1. Set the local SMSC:AT CSCA " 8613800755500" then Enter, get response“OK”. Note: The SMSC will be different on different area. Here, it is ShenzhenChina as examples.2. AT CMGF 1: Set SMS to TEXT mode;3. AT CMGS "xxxxxxxxxxx” then Enter, set the number of receiver, then you will getresponse: , edit the content of message (needn’t Enter at the end). After editing,14 / 32

GSM/GPRS/GNSS HAT User Manualsend 1A in HEX format to send the message (0x1A is key value of “CTRL Z”, itwill tell the module to send). If the message is send successfully, module will getthe reply CNGS: 174 as below figures.RECEIVE SMS1. Send a message “this is a receive test” to the GSM/GPRS/GSNN HAT from yourphone2. While receiving messages, module will report it to UART: “SM”, 3, it means thatthere are 3 messages in SM, and the message we receive just now is the thirdmessage.3. Reading messages:AT CMGR 3 to read the third message (AT CMGL "ALL" toread all messages)4. Deleting message:AT CMGD 3, to delete the message as below15 / 32

GSM/GPRS/GNSS HAT User ManualGNSS TESTINGCOMMON AT COMMANDSCommandDescriptionReturnAT CGNSPWR 1 Turn on the power of GPSAT CGNSPWROKAT CGNSPWR 0 Turn off the power of GPSThe currentAT CGNSIPR? Enquiry the baud rate of GPSAT CGNSIPRbaud rateAT CGNSIPR Baudrate Set the baud rate of GPSOKAT CGNSTST 1 Send data received to UARTAT CGNSTSTOKAT CGNSTST 0 Stop sending data received to UART16 / 32

GSM/GPRS/GNSS HAT User ManualGNSS navigation information parsed from NMEAPrint GPSsentencesinformationAT CGNSINFAT CGPSSTATUSCheck GPS statusFor more details of AT commands, please refer to:SIM868 Series GNSS ApplicationNote V1.00CONFIGURATION1. Connecting the GPS antenna, and place the receiver on open area to receive GPSsignal2. Turn on power of GNSS: AT CGNSPWR 13. Check the baud rate: AT CGNSIPR?4. Start to sending data received to UART: AT CGNSTST 1:17 / 32

GSM/GPRS/GNSS HAT User Manual5. Close the Com Assistant software SSCOM. Open u-center and set the Port andBaudrate. The Port is the port number recognized by PC. Set Baudrate as the valuewe got before (You can configure in Receiver option or click icons on tool bardirectly):6. Choose Player , then the GNSS information will be printed as