0

members

Easy Basics: Project 101a Ai Thinker A9G GPRS GPS development board

of Acoptex.com (Not selected)

Basics: Project 101a

Project name: Ai Thinker A9G GPRS GPS development board

Tags: A9G, A9G GPRS GPS, A9G GPRS GPS development board, ai thinker, Ai Thinker, pudding board, A9G pudding board

Attachments: none

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1. A9G GPRS GPS development board with GSM/GPRS antenna and GPS antenna 1 pc

2. Micro USB cable 1 pc.

3. Micro SIM card 1 pc


4. Micro SD card with SD card adapter 1 pc

5. USB to TTL/Serial adaptor/converter 1 pc

General

We will learn about the A9G GPS GPRS development board and how to upload firmware to it.

Understanding the USB to TTL converter

You can read more about them here.

Understanding the A9 and A9G GSM GPRS development boards


A9

The A9 is a complete quad-band GSM / GPRS module in a compact design SMD package. Its stable performance, the appearance of compact, cost-effective, could meet the diverse needs of customers.

The A9 can be used in a wide range of IoT applications and is ideal for IoT applications for home automation, industrial wireless control, wearable electronics, wireless location sensing devices, wireless location system signals and other IoT applications. A9 SMD package, through the standard SMT equipment to achieve rapid production of products, especially for automation, large-scale, low-cost modern production methods for the convenience of a variety of Internet of Things hardware terminal applications. 

Features:

  • Complete quad-band GSM / GPRS module, 800/900/ 1800/1900MHz
  • SMD package for easy MP & testing
  • Low power mode, average current 2mA or less
  • Supports digital audio and analog audio, supports HR, FR, EFR, AMR voice coding
  • Support voice calls and SMS messages
  • Embedded network service protocol stack
  • Support standard GSM07.07,07.05AT command and Anxin expandable command set
  • Support PBCCH
  • Supports firmware upgrade via serial port

Main specifications:

  • A9/A9G size: 19.2*18.8*2.7mm (±0.2mm)
  • Working temperature -30 ° C +80 ° C;
  • Working voltage is 3.5V-4.2V, 4V power supply is recommended;
  • Boot voltage > 3.5V;
  • Low power average current is below 2ma;
  • Support GSM/GPRS four frequency bands, including 850, 900, 1800, 1900MHZ;
  • GPRS Class 10;
  • Sensitivity <-105;
  • Support voice calls;
  • Support SMS SMS;
  • GPIO level is 2.8V;
  • Support GPRS data service, maximum data rate, download 85.6Kbps, upload 42.8Kbps;
  • Support standard GSM07.07, 07.05 AT commands and Ai-Thinker extension commands;
  • A9 supports 3 serial ports, one download serial port and one AT command port;
  • A9G supports 3 serial ports, one download serial port and one GPS serial port;
  • AT command supports standard AT and TCP/IP command ports;
  • Support digital audio and analog audio, support HR, FR, EFR, AMR voice coding;

You can find the A9 product specification here and A9G -here.

A9Tracker related functions

(A9Tracker related functions, A9 module uses base station positioning function, A9G module can choose to set base station positioning function or GPS positioning function, upload current position information to WeChat or app regularly, when indoor positioning, because GPS signal is too weak, it is recommended Set to base station positioning function. Refer to the following documents for details:

WeChat: Anxin can use the public number guide

App: A9Tracker app guide

A9/A9G ten-minute docking machine Zhiyun created a tutorial of its own products.

Note: The prototype that Anxin can initially send to the customer (not purchased by Taobao) cannot use the above functions. The customer can send the IMEI value of the module to the sales. We solve this problem remotely.

A9G

The A9G is a complete quad-band GSM/GPRS+GPRS/GPS module. Compared with A7, A9G has higher integration and lower cost of core chip, which makes the whole solution more cost-effective. Convenient for a variety of IoT hardware terminal applications.

Other manuals and information links

Handling GPS Data

Once the GPS receiver has transmitted the NMEA sentences to the Arduino, and they have been properly read and stored in nice and "simple format", then what follows?

There are several options to convert the "simple format" data into more general format (GPX, KMZ, etc.). For instance:

  1. GPS Visualizer is a free online utility "that creates maps and profiles from geographic data". You can input a CSV or tabbed file, a spreadsheet, or drag and drop the data. The appearance of the page is a bit odd but the content is good.
  2. GPS Prune is intended to view, edit and convert GPS data. It allows to load text files as well as NMEA files, among quite a number of other options.
  3. GPS Babel seems to be the most known GPS data converter. It reads text files with NMEA sentences.

U‑center GNSS evaluation software for Windows

The u‑center GNSS evaluation software for automotive, mobile terminal and infrastructure applications provides a powerful tool for evaluation, performance analysis and configuration of u‑blox GNSS receivers. Its unique flexibility makes the u‑center GNSS evaluation software an invaluable tool for evaluation, analysis and configuration of u‑blox GNSS receivers. u‑blox GNSS receivers can be configured using the u‑center evaluation software.

  • Highly interactive and easy to use
  • Full support of all u‑blox GNSS receivers
  • Extensive configuration and control features 
  • Real‑time display from a GNSS receiver via RS232 and USB interface

See more details here. On request from our visitors we will publish the link to previous version of u-center which we used for this project - you can download it here.

Signals and connections of the USB to TTL converter

 You can read more about them here.

Signals and connections of the A9G GPS GPRS Development board

A9 chip pinout:

A9G chip pinout:

 

I2C2_SCL - I2C2 clock pin
I2C2_SDA - I2C2 data pin
SD_D3 - SD serial data pin
SD_D2 - SD serial data pin
SD_D1 - SD serial data pin
SD_D0 - SD serial data pin
SD_CMD - SD command pin
SD_CLK - SD clock pin
PWRKEY - the power button gives the pin a Low signal on
VBAT - Connect external power supply to this pin 3.5V-4.2V, the max supply current should be not less than 2A
SPK_P - Speaker positive (+) pin
SPK_N - Speaker negative (-) pin
ADC0 - ADC 0 pin (max. input 1.8V)
ADC1 - ADC 1 pin (max. input 1.8V)
VUSB - USB power supply pin (external power supply)
RESET - Module hardware reset pin. When this pin used the LOW level is <0.05V and the current is around 70 mA. Must use NMOS tube control and ground can not have leakage when it is working normally, otherwise it will cause the module to be unstable and difficult to register to the network.
LCD_CS -LCD  CS pin
LCD_RST - LCD reset pin
LCD-DIO - LCD DIO pin
LCD_SDC - LCD SDC pin
LCD_SCK  - LCD SCK pin
IO29 - special function pin

I2C2_SCL - I2C2 clock pin

I2C2_SDA - I2C2 data pin

SD_D3 - SD serial data pin

SD_D2 - SD serial data pin

SD_D1 - SD serial data pin

SD_D0 - SD serial data pin

SD_CMD - SD command pin

SD_CLK - SD clock pin

PWRKEY - the power button gives the pin a Low signal on

VBAT - lithium battery pin, connect external power supply to this pin 3.5V-4.2V, the max supply current should be not less than 2A

SPK_P - Speaker positive (+) pin

SPK_N - Speaker negative (-) pin

ADC0 - ADC 0 pin (max. input 1.8V)

ADC1 - ADC 1 pin (max. input 1.8V)

VUSB - USB power supply pin (external power supply)

RESET - Module hardware reset pin. When this pin used the LOW level is <0.05V and the current is around 70 mA. Must use NMOS tube control and ground can not have leakage when it is working normally, otherwise it will cause the module to be unstable and difficult to register to the network.

LCD_CS -LCD  CS pin

LCD_RST - LCD reset pin

LCD-DIO - LCD DIO pin

LCD_SDC - LCD SDC pin

LCD_SCK  - LCD SCK pin

IO29 - special function pin. After the module is working normally with the AT command, pull the pin LOW to enter the shutdown mode.

IO26 - General purpose IO pin. Do not add a pull-up resistor, the level can not be HIGH at power-on. Remark: it is low-power indicator pin - if there is data, SMS, or wake-up call it will be a 50 ms pulse.

IO27 - General purpose IO pin. Do not add a pull-up resistor, the level can not be HIGH at power-on. Remark: the default is 0 as the network status indicator.

GPS_RF - The GPS antena pin can be connected to antenna. If the circuit is connected to the PCB please pay attention to the 50 Ohm trace on the PCB (valid for A9G only)

GND - ground pin

IO28 -General purpose IO pin. Do not add a pull-up resistor, the level can not be HIGH at power-on. Remark: default as GPS status indicator IO pin.

IO30 -General purpose IO pin.

IO25 - General purpose IO pin. Low-power pin and when LOW signal enters to low-power mode.

MIC_N - Microphone negative (-) pin

MIC_P - Microphone positive (+) pin

USB_N - USB D- pin

USB_P - USB D+ pin

HST_TXD - firmware upload pin (transmit pin). pin level 2.8V, compatible with 3V3 (5V not compatible)

HST_RXD - firmware upload pin (receive pin). pin level 2.8V, compatible with 3V3 (5V not compatible)

SM0_DIO - SIM card data pin

VSIM0 - SIM card power supply pin

SM0_CLK - SIM card clock pin

SM0_RST - SIM card reset pin

VIO - Output 3V. Remarks: If it's not in use will be left floating, The load drive current does not exceed 10 mA.

GPRS_RF - the antenna pin can be connected to the antenna. If the circuit is connected to the PCB pay attentian to the 50 Ohm trace on the PCB.

(A9) UART2_RTS - UART2 serial port RTS pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

(A9G) GPS_RTS - GPS serial port RTS pin

(A9) UART2_CTS - UART2 serial port CTS pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

(A9G) GPS_CTS - GPS serial port CTS pin

(A9) UART2_RXD - UART2 serial port RXD (receive) pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

(A9G) GPS_TXD - GPS serial port TXD (transmit) pin

(A9) UART2_TXD - UART2 serial port TXD (transmit) pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

(A9G) GPS_RXD - GPS serial port RXD (receive) pin

Notes on pins 47, 48, 49, 50:

For A9 pin 47,48,49,50 - UART2

For A9 pin 49 is UART2_RXD, pin 50 is UART2_TXD

For A9G pin 47,48,49,50 - GPS 

For A9G pin 49 is GPS_TXD, pin50 is GPS_RXD

The float control functions of A9 and A9G are temporary not supported.

UART1_RTS - AT serial port RTS pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

UART1_CTS - AT serial port CTS pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

UART1_RXD - AT commands serial port RXD (receive) pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

UART1_TXD - AT commands serial port TXD (transmit) pin. pin level 2.8V, compatible with 3V3 (5V not compatible)

Wiring

1. AT communication


2. Unploading firmware


Step by Step instruction

1. Configuring the A9G development board with USB to TTL converter


For using this USB to UART Converter you need a software tool. Most of the development tools like MikroC Pro, Arduino has a UART Tool along with it. You can use different software tools: TerminalUSR-TCP232-Test V1.4AiThinker_Serial_Tool_V1.2.3cooltermsscom3.2 , KiTTYputty,tera termAccess port and so on. We recommend you to use AiThinker_Serial_Tool_V1.2.3 or sscom3.2, as you can save your AT commands and it's very easy to use.

  1. Do wiring.
  2. Attach GSM/GPRS antenna to A9G GPS GPRS development board.
  3. Attach GPS antenna to A9G GPS GPRS development board.
  4. Insert a valid unlocked Micro SIM card to SIM card slot of A9 GPS GPRS development board.
  5. Insert the Micro CD card to Micro SD card slot.
  6. Plug your USB to TTL converter into your PC USB port.
  7. You can power up A9G GPS GPRS development board Lithium Ion battery V_BAT (3.5-4.2VDC) or use power supply from USB to TTL converter. 
  8. Press  PWR button for 2 seconds. Status indication (blue LED) will be ON. 
  9. Open AiThinker Serial Tool V1.2.3 program. Set the baud rate 115200, data bits 8, parity bits none, stop bits one. Click on Open Serial button.
  10. First you need to check if AT commands are working - enter "AT" and click on Send button.This would print "OK" which signifies of working connection and operation of the module.
  11. Requests TA serial number identification. Enter "AT+GSN" and press Send button. Returns "867959034205087 OK" . IMEI 867959034205087
  12. Checks fixed local rate. Enter "AT+IPR?" and press Send button. Returns "+IPR: 115200 OK" /115200 bps/
  13. Requests TA model identification. Enter "AT+GMM" and press Send button. Returns "A9/A9G OK".
  14. Requests TA revision identification. Enter "AT+GMR" and press Send button. Returns "V02.02.20180825R OK". This is the firmware version.
  15. Requests TA manufacturer identification. Enter "AT+GMI" and press Send button. Returns "Ai_Thinker_Co._Ltd. OK".
  16. Requests manufacturer specific information about the TA. Enter "ATI" and press Send button. Returns "Ai_Thinker_Co._Ltd. A9/A9G V02.02.20180825R OK".
  17. Reboots the module. Enter "AT+RST=1" and press Send button.
  18. Call Control Commands. If you call the cell number of Micro Sim Card then message RING will be shown. 1) Answer a call. Enter "ATA" and press Send button. Returns "+CIEV: "CALL",1 CONNECT"; 2) Make a call. Enter number to call "ATD+37163055289" and press Send button. Returns "ATD+37163055289 OK +CIEV: "CALL",1 +CIEV: "SOUNDER",1 "; 3) Disconnect existing call. Enter "ATH" and press Send button. Returns "+CIEV: "CALL",0 OK";4) Insert the headset into the headphone/earphone jack, enter "AT+SNFS=0" and press Send button to enable them. Returns "OK" ("AT+SNFS=1" used for loudspeaker selection).
  19. SMS Commands. If you send SMS, for example, with Test word to A7 GPS GSM GPRS module you will get this info "+CIEV: "MESSAGE",1 +CMT: "+3712345678",,"2018/03/18,15:33:08+02",145,17,0,0,"+37068499190",145,4 Test". 1) Select SMS message format Enter "AT+CMGF=1" and press Send button. Returns "OK". This is to read and write SMS messages as strings instead of hexadecimal characters. 2) Send SMS message. Enter "AT+CMGS=”+37163058092”"  and press Enter button. Replace the above phone number with your own cell phone number. The modem will respond with: > You can now type the message text and send the message using the - key combination: TEST After some seconds the modem will respond with the message ID of the message, indicating that the message was sent correctly:  "+CMGS: 62". The message will arrive on the mobile phone shortly.
  20. GPS commands. By default this mode is OFF. You need to enable GPS every time (if you power off the module GPS will switch off too). 1) Sets GPS on. Enter "AT+GPS=1" and press Send button. Returns "OK"; 2) Get GPS information. Enter "AT+GPSRD=1" and press Send button. Returns "OK" and sends GPS NMEA data to serial port. If you want to stop sending data to serial port enter "AT+GPSRD=0" and press Send button. Returns "OK" .
  21. Check the list of all AT GPRS commands here and GPS commands here and here.

2. Uploading the firmware


VERY IMPORTANT NOTE:

Before doing firmware update:

  • Follow the steps as described above. Check your module firmware version. Enter “AT+GMR” and press Send button.  
  • Always make sure that you have your firmware version on hands so you can restore previous version if next firmware version is bad.
  • Read all information about firmware update available on Web.
  • Just think if you realy need to do it as it is a risk to damage the module!!!
  • If you decided to do it make sure that the next firmware version which you are planing to upload is not older than existing.
  • Firmware download links: GPRS firmware release, GPS firmware release.

GPRS firmware releases:

Note: A9 and A9G are different modules, but the same version of firmware is used.

A9 and A9G Factory default version updated on 25 August 2018 - ai-thinker_a9g_at_v02.02.20180825r.7z

A9 and A9G Development version updated on 11 October 2018 - ai-thinker_a9_a9g_at_v02.02.20181011r.7z

GPS firmware releases:

Note: A9 and A9G are different modules.

A9G Factory default version updated on 28 April 2018 - gk9501_release_gb_1.4_20180224.zip

  1. Do wiring for firmware update. Use the USB-TTL converter to connect the download serial port of the GPRS series module to your PC USB port. GPRS series modules generally have two serial ports, one AT serial port and one download serial port. We will use the HST_TXD, HST_RXD pin to upload the firmware.
  2. Attach GSM/GPRS antenna to A9 GPS GPRS development board.
  3. Attach GPS antenna to A9 GPS GPRS development board.
  4. Insert a valid unlocked Micro SIM card to SIM card slot of A9 GPS GPRS development board.
  5. Insert the Micro CD card to Micro SD card slot.
  6. Plug your USB to TTL converter into your PC USB port.
  7. You can power up A9 GPS GPRS development board Lithium Ion battery V_BAT (3.5-4.2VDC) or use power supply from USB to TTL converter. 
  8. Press  PWR button for 2 seconds. Status indication (blue LED) will be ON. 
  9. Download the GPS and GPRS firmwares - ai-thinker_a9_a9g_at_v02.02.20181011r.7z and gk9501_release_gb_1.4_20180224.zip , firmware burning tool here. The link to download website instructions is here.
  10. Unzip the firmwares' and firmware burning tool ZIP packages and double-click on fpupgrade.exe file.
  11. Click on the button to select the FWH - GPRS firmware and GPS - GPS firmware to be uploaded. Click on Open buttons. 
  12. Click on Start button. The software will automatically detect the serial port for download.
  13. Click on Exit button. Congrats!!!You did it. Let's check the version of firmware in your A9 GPS GPRS development board now.
  14. Unplug the USB to TTL converter from your PC USB port and do wiring for AT communication.
  15. Attach GSM/GPRS antenna to A9 GPS GPRS development board.
  16. Attach GPS antenna to A9 GPS GPRS development board.
  17. Insert a valid unlocked Micro SIM card to SIM card slot of A9 GPS GPRS development board.
  18. Insert the Micro CD card to Micro SD card slot.
  19. Plug your USB to TTL converter into your PC USB port.
  20. You can power up A9 GPS GPRS development board Lithium Ion battery V_BAT (3.5-4.2VDC) or use power supply from USB to TTL converter. 
  21. Press  PWR button for 2 seconds. Status indication (blue LED) will be ON. 
  22. Open AiThinker Serial Tool V1.2.3 program. Set the baud rate 115200, data bits 8, parity bits none, stop bits one. Click on Open Serial button.
  23. First you need to check if AT commands are working - enter "AT" and click on Send button.This would print "OK" which signifies of working connection and operation of the module.
  24. Requests TA revision identification. Enter "AT+GMR" and press Send button. Returns "V02.02.20181011R OK". This is the firmware version.
  25. Sets GPS on. Enter "AT+GPS=1" and press Send button. Returns "OK".
  26. Get GPS information. Enter "AT+GPSRD=1" and press Send button. Returns "OK" and sends GPS NMEA data to serial port. 
  27. If you want to stop sending data to serial port enter "AT+GPSRD=0" and press Send button. Returns "OK" .

 

Summary

We have learnt about the A9G GPS GPRS development board and how to upload firmware to it.

Notes:

  • It takes for about half a minute or one to read the data by the GPS module initially when you run it, so do not panic for this it’s very usual.
  • It happens in some case that it is unable to detect the data that might be the issue with antenna, so unplug the antenna( if it is detachable) and attach it again.
  • If, code says “Check Connection”, then you should definitely check it twice, before giving up. Also, sometimes interchanging the TX and RX pins is preferable and surprisingly works.

GPS Visualizer: Do-It-Yourself Mapping

You can check the GPS data logged with GPS Visualizer, an online utility that creates maps and profiles from geographic data. It is free and easy to use, yet powerful and extremely customizable. Input can be in the form of GPS data (tracks and waypoints), driving routes, street addresses, or simple coordinates. Use it to see where you've been, plan where you're going, or quickly visualize geographic data (scientific observations, events, business locations, customers, real estate, geotagged photos, etc.).

GPS Visualizer can read data files from many different sources, including but not limited to: GPX (a standard format used with many devices and programs, including Garmin's eTrex, GPSMAP, Oregon, Dakota, Colorado, & Nüvi series), Google Earth (.kml/.kmz), Google Maps routes (URLs), FAI/IGC glider logs, Fugawi (.trk/.wpt), Furuno, Garmin Fitness (.fit), Garmin Forerunner (.xml/.hst/.tcx), Garmin MapSource/BaseCamp/HomePort (.gdb), Geocaching.com (.loc), Google Spreadsheets, IGN Rando (.rdn), iGO (.trk), Lowrance (.usr), Microsoft Excel, NMEA 0183 data, OziExplorer (.plt/.wpt), Suunto X9/X9i (.sdf), Timex Trainer, TomTom (.pgl), U-blox (.ubx), XML feeds, and of course tab-delimited or comma-separated text.

Libraries

  • None

Script

  • None


Other projects of Acoptex.com
Easy Basics: Project 105a SIM900A GSM GPRS mini module of Acoptex.com in NANO 28-11-2019

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 23-11-2019
Viewed: 215 times