This SDK provides a wrapper over the most used functionalities for the Ai-Thinker GPRS SoC modules A9/A9G making for simpler setup and faster deployability.
The A9/A9G can be used in a wide variety of IoT applications. This low-cost, effective module can be the go-to product for quick development and deployment of IoT solutions around the world. Okay okay, I'm going to stop bragging about stuff you already know and get to the point of all this conversation.
What are we doing here? This is an effort to share the knowledge and experience we gained in our process of using this module with the open-source community hoping it saves time and effort for as many IoTers out there as possible.
This brings me to talk about the drawbacks about trying to use the A9/A9G modules:
What does this SDK do to solve these?
Please do keep reading to know more. And since we rely on your inputs and feedback to grow and improve this project and hence the open-source community in general, please feel free to [give us feedback](## Feedback)[create issues, suggest edits and add functionalities](## Participate in the development). Dont forget to Star us on the top right corner of this project if you like what we are trying to achieve!
With increasing traffic, we will come up with rigid procedures to maintain process in the same. Until then, HAVE FUN AND KEEP IoTing!
(http://www.ai-thinker.com/pro_view-9.html)
Datasheet of the A9 module here
Features:
(http://www.ai-thinker.com/pro_view-28.html)
Datasheet of the A9G module here
Features:
(http://www.ai-thinker.com/pro_view-78.html)/
A9G GPRS (+GPS+BDS) Development Board( pudding)
(http://www.ai-thinker.com/pro_view-77.html)
A9/A9G development board for easy development and debugging
Schematics of the pudding development boards here: A9 | A9G
Features:
HST_TX
,HST_RX
)Or you can use other RDA8955 chip modules or board
It should be noted that the USB interface on the development board does not implement a USB serial port, but is a standard USB1.1 interface,
Therefore, in order to download or debug, you need at least one USB to serial port translator module to connect to the board's HST_TX
andHST_RX
pins
Power can be supplied by a lithium battery or a fixed external supply (3.8v ~ 4.2v) to the VBAT
pin. Alternatively, it can also be powered by 5v power connected to the 5v input pin or USB input. However, it should be noted that if using alithium battery as power supply POWER KEY needs to be pressed for about 3 seconds to power on the module. This is not required when powered through USB.
The download interface to the device is the HST interface. Depending upon how the power is being supplied to the board(pudding), the following connections are required at the minimum to provision firmware download into the device or to debug the logs.
USB to TTL module | Dev Board(pudding) |
---|---|
TX | HST_RX |
RX | HST_TX |
GND | GND |
git
).
git clone https://github.com/Ai-Thinker-Open/GPRS_C_SDK.git --recursive
This repo has been tested on this version
config_env_admin.bat
file in CSDTK to set environment variables required.Navigate into the CSDK folder,right click your mouse in the blank space in the folder with shift key pressed, then Open PowerShell window here
.
Then you can use the ./build.bat
script to build the project.
./build.bat demo $PROJ
: compile demo project $PROJ
e.g.: ./build.bat demo gpio
./build.bat clean $PROJ
: clear the build files of $PROJ
e.g.: ./build.bat clean gpio
./build.bat clean all
: clear all build files./build.bat demo $PROJ release
: build a release version. e.g.: ./build.bat demo gpio release
If the last parameter is not release
, the build default is to generate the debug version. The GDB can be used to debug errors after system crashes in the debug version The release version can not be used with GDB, crashes will result in the watch dog timer activating and it will auto restart the system when the system crashes!
A build
folder and a hex
folder will be generated after compilation containing the build files.
In the hex
folder, two *.lod files will be generated. These *.lod files are the target file that are to be flashed into the dev board.
The two *.lod files will be significantly different in their sizes. The larger file should be flashed when:
projects
mkdir ~/projects
git
)
git clone https://github.com/Ai-Thinker-Open/GPRS_C_SDK.git --recursive
This repo has been tested on this version
sudo apt install build-essential gcc-multilib g++-multilib libzip-dev zlib1g lib32z1 libpng12-0 libusb-0.1-4
cd ~/software
tar -xzvf CSDTK42_Linux.tar.gz
cd CSDTK
./setup.sh ./ ~/projects
Open PowerShell window here
.Then you can use ./build.sh
script to build project.
./build.sh demo $PROJ
: compile demo project $PROJ
e.g.: ./build.sh demo gpio
./build.sh clean $PROJ
: clear the build files of $PROJ
e.g.: ./build.sh clean gpio
./build.sh clean all
: clear all build files./build.sh demo $PROJ release
: e.g.: ./build.sh demo gpio release
If the last parameter is not release
, the build default is to generate the debug version. The GDB can be used to debug errors after system crashes in the debug version The release version can not be used with GDB, crashes will result in the watch dog timer activating and it will auto restart the system when the system crashes!
e.g.: ./build.sh demo gpio release
build
folder and a hex
folder will be generated after compilation containing the build files.hex
folder, two *.lod files will be generated. These *.lod files are the target file that are to be flashed into the dev board.Additional Steps for Linux: (not required for Windows)
Install dependencies
sudo apt install build-essential libqt4-qt3support itcl3 itk3 iwidgets4
Create a link file for serial port as follows, and later you can fill in the coolwatcher's chart with 1. The COM1
must upper-case.
sudo ln -s /dev/ttyUSB0 comport/COM1
Then double click coolwatcher to run software
Follow further steps as given in Ai-Thinker GPRS SDK documentation.
Each folder contains the C library and corresponding header files. To use the library files follow the steps below:
Further Detailed Doumentation here: GPRS C SDK DOC
Including environment installation, burn & debug, api docs etc.
This SDK comes with a convenient, browsable set of documentation. The documentation is available in HTML format in the doc/doxy/html
directory of the repository.
You can update this documentation by running the command doxygen Doxyfile
in the base directory of the repository. You will need to have previously installed the Doxygen package.
Click ★ Star on the top right corner of this page if this repo helps you
Fork -> Modify -> Submit PR