Not only does it have a cool name, this little dev board has a ton of functions :
GPS, SMS, Calls, Internet, Flash card reader, loads of I/Os, and much more…
The module responds to AT commands just like the A6 and A7 chips but I focused on using the build-in micro controller in C!!! No need for a seperate arduino, lowering cost, size and power requirements.
Getting set up and running under windows takes a bit of work but once it’s done, it works great!
Wiring:
setup your FTDI programmer module like this:
FTDI | A9G |
RX | HST_TX |
TX | HST_RX |
GND | GND |
VCC | Don’t connect |
The board will be powered by an external phone charger pluged into the micro usb port.
Toolchain
The toolchain contains all the tools you’ll need to compile and run your code on the chip. You can download it here :
http://test.ai-thinker.com/csdk/CSDTK42.7z (the documentation is here : https://ai-thinker-open.github.io/GPRS_C_SDK_DOC/en/c-sdk/installation.html)
Open PowerShell in admin mode and go to the CSDTK directory (or CSDTK42 in my case), and execute the config_env_admin.bat script. It will add all the environment variables you’ll need:
./config_env_admin.bat
SDK:
Download the SDK :https://github.com/Ai-Thinker-Open/GPRS_C_SDK/releases/tag/V2.112 (the file GPRS_C_SDK_V2112.7z)
Open PowerShell again in admin mode and cd to the
GPRS_C_SDK directory. You will find a demo directory containg loads of examples!
To test our setup, we’re going to compile the “first” example :
./build.bat demo first

If all goes well, you should see the compiled version in the hex/first directory.
Getting our code on to the chip :
In the CSDTK42\cooltools directory, the coolwatcher.exe tool will allow us to send code to our dev board. When coolwatcher starts up, select profil 8955 and specify the lastcomport field (my FTDI is on port COM4) :


The first thing to do is select the programmer in the
« Flash > Choose Flash Programmer… » menu and choose the
CSDTK42\cooltools\chipgen\Modem2G\toolpool\plugins\fastpf\flash_programmershost_8955_flsh_spi32m_ramrun.lod file
Then we need to choose the compiled project in
« Flash > Choose LOD file… » and select the largest if the files we generated earlier : GPRS_C_SDK\hex\trackerfirst_B2112_debug.lod
To start uploading the code to the module, go to
« Flash > Launch fastpf with current LOD file and flash programmer ».
If all goes well you should have something like this :

This step didn’t work on the first go for me, check the connections and especially that the GND pins are connected. If that doesn’t work, click on the
« Restart Chip » button in coolwatcher and try again…
Once the upload has completed, go to the « Plugins > Activate Tracer » menu to see the debug info. You should see the « Hello GRPS » trace :

Voilà! We have programmed our module! now all we need to do is dig deeper into the examples to start having fun! 🙂
Michael says:
Very nice to see someone else playing with this module.
Fyi: the tls certificate for your website is invalid!
David Twigger says:
Hi Michael! thanks a lot! I’m getting on pretty well with it! I’ll be posting a new article soon! What have you done with it?
I’ve been having trouble the last few days with my webhosting.. it should be up and runing properly really soon!
MH says:
I haven’t done a lot already. The plan is to receive an alert if the power goes out. Additionally, I will add dome temperature sensors and stream out the data over Mqtt. The use case basically is monitoring of wine fermentation 🙂
Looking forward to your new post!
David Twigger says:
mmmmh wine… XD Awesome!
Chaka Hamilton says:
I purchased this board specifically because the seller on AMAZON said it could be programmed using the arduino ide. I have not found that to be the case, I am not a programmmer. To your knowledge is this even possible with the a9g pudding board?
David Twigger says:
Hi, as far as I know it is not possible to use the Arduino IDE for uploading your code to the pudding dev boards.. sorry… I think there are ATmega32U4 + A9G boards that probably can but if you bought a pudding I’m afraid you can’t… I’ll keep an eye out though and I’d love to know if you find something!
deepak says:
i purchased A9G Pudding device. i upload the example code but code is not working . only gpio code is working . give me any idea how sms ,gps, or etc code work or any tutorial.
Thank You!!
David Twigger says:
Hi! Thanks for reaching out 🙂 If it works with the gpio demo everything must be wired up properly, can you tell me what errors you are getting?
David Twigger says:
I’ve got a tutorial in the works for both SMS and Gps! going as fast as I can but it’s taking a while to finish…
Inyang Kpongette says:
Hello guys, I am a novice using this chip i wired it up to usb and was able program it but after that i have been unable to get anything working not even the lights flash. Please Help
David Twigger says:
Hi! I had a D’oh moment when I realised i had mixed the Rx and Tx wires up, maby that could be the problem?
INYANG KPONGETTE says:
Well, urhmm, I believe I correctly wired the communications cables correctly. Because I can see events when I use the coolwatcher tracer .
But…. What I am trying to do is actually send GPS data to a website.
Maybe I am powering it wrongly how do you power yours??
David Twigger says:
If you can see events then you’re right, you probably got the wiring right.. I use a 5V 2A phone charger I had lying around. When you upload your code does it go all the way to 100%? Are you trying it with the examples or some of your own code? I managed to get my first module stuck in an infinate loop and I couldn’t even upload anything afterwards.. I had to get a new board…
KPONGETTE INYANG says:
Wow, the infinite loop bricking sounds scary. I’m currently using the examples.
I will try using a 2A charger I’ve actually been using my laptop’s USB interface for power, Although of seemed to work just fine put of the box.
Thanks though let me try using the 2A
Inyang Kpongette says:
The infinite loop sounds scary… but i think its wired right though like im running into runtime errors. Please do you have a gps code you have used and are sure works. I would really appreciate
Leonardo Serri says:
HI,
I have purchased the pudding A9G. Unfortunately, I am not able to download any files on that due to the timeout error. I have connected the device following your suggestions but it doesn’t work. I have also tried to press the reset button but the timeout error occur again.
Have you got any suggestion at my issue?
Regards,
Leonardo
David Twigger says:
Hi Leonardo! do you get the timeout error when you open coolwatcher or when you click the upload button?
Leonardo says:
Ho David,
I receive the timeout error when I try to upload the file. The USB to TTL seems works fine ( tested with putty short cutting the tx and rx together).
David Twigger says:
Hi! I got that before connecting grounds (the FTDI ground pin to the module grounds pin), how are you powering it, do you have a seperate power supply?
Leonardo says:
Hi David,
I have followed your suggestion, so RX to HST_TX, TX to HST_RX, both the two pins of FTDI GND connected to the GND of the board. I am using an external supply (about 1A of current output). At the begins the two blue leds flash for one time. If could helps for understand the two leds flash also if I press the RST button. On Coolwatcher I have also tried to press the “restart chip” button, but due the timeout error, nothing happens (only the error message appear).
What do you think about that? Any helps?
David Twigger says:
Hi Leonardo! Have you tried using the active tracer plugin in coolwatcher ? (in the plugin menu) It might give you more insight as to what is going on.
Leonardo says:
Hi David, after the activation of active tracer the output is the follow
0x00000000
0x00000008
0x00000010
0x00000018
43 6F 6F 6C 48 6F 73 74
54 69 6D 65 6F 75 74 45
72 72 6F 72 00 00 00 00
00 00 00 00 00 00 00 00
CoolHost
TimeoutE
rror….
……..
I have tried to connect the FTDI TX and RX to the Uart1 TX and RX. At start, by using putty the system answer with “init” and “+CREF :2”
So, seems that is “on”……What do you think? Is there any way to reinitialize the system from the UART?
Michael says:
I am also back to playing with the pudding board.
Some random notes:
1) You will need an event loop or the board will appear mostly dead. For example, I was unable to flash except with some lucky timing (hitting the button at the right time) If I was not using the `OS_WaitEvent` method, but instead just printing some debug lines.
2) Using `Trace` outside of the event loop does not seem to work.
With the following code:
void EventDispatch(API_Event_t* pEvent)
{
Trace(1, “BAR”);
switch(pEvent->id)
{
default:
break;
}
}
void AppMainTask(VOID *pData)
{
Trace(1, “FOO”);
API_Event_t* event=NULL;
while(1)
{
if(OS_WaitEvent(mainTaskHandle, (void**)&event, OS_TIME_OUT_WAIT_FOREVER))
{
EventDispatch(event);
OS_Free(event->pParam1);
OS_Free(event->pParam2);
OS_Free(event);
}
}
}
I can never see `FOO` in the tracer output, but `BAR` will show up. So, if your module seems dead, also make sure you are using `Trace` in the correct place.
If in doubt, go back to one of the demos, e.g. the `first` demo.. Oddly enough, I flashed the demo a couple of times before it seemed to start properly. That might have been correlated to me hitting the « Turn off the chip » or « Turn off the lights » buttons.
Anyways, after some hours of a mostly unresponsive board, I happy to finally have it back, even if I do not exactly understand what the problem was and why it came back.
David Twigger says:
Wow! thanks for all the details! I’ll have to just keep bashing the burn button on my dead board and hope I manage to catch it at the right time!