Send SMS with an A6 GSM module

AI Thinker, the makers of my favorite micro controller, the ESP8266 have done it again with the A6 GSM module allowing us to connect to the GSM network and send sms, connect to the internet and even make phone calls!

What you’ll need:

  • A6 GSM moduleAn A6 module (This is an A6 mini bought you can find on ebay, aliexpress ect.. for 5 to 10€)
  • Sim card A Sim card with a valid subscription. Remember to remove the pin before starting by inserting it into a phone and deactivating the pin number.
  • Breadbord and jumper wires A breadboard and some jumper wires.
  • FDTI programer module An FTDI programer (2 to 5€ on Ebay ou aliexpress)
  • micro USB breakout board A micro usb breakout board get power to it all easily
  • Power supply A relatively powerful wall wart (here I recycled a 5V/2A power supply from a raspberry pi I had laying around ). Sending sms takes quite a lot of power for sending.
  • CoolTerm A computer with Windows and CoolTerm


A6 wiring diagram
Wiring scematic of the A6 module with an FTDI

As you can see, I used my awesome artistic skills to come up with this horrible diagram!!

We need to power the module with our phone charger, join the FTDI and A6 module neutrals and then connect the TX of the of the RX pin, of the A6 and vice versa.

The finished setup
The finished setup

To the code!

Once you have pluged the FTDI in, CoolTerm should find the COM port on it’s own. You can also find it in windows device manager :


In CoolTerm, set the baudrate to 115200 and click on Connect. It takes a few seconds but it should come up with something like this (if not, try unpluging and pluging the A6 module power back in again) :

Connecting to the GSM network

+CREG: 5 means the module was able to conect to the network and is ready to go!

If nothing comes up, check all the connections again, especially that the RX/TX pins.

Snding an SMS

To send an SMS, go to Connection -> Send String ou Ctrl-T. The AT command (for attention) followed by a new line will return the current state :

send AT commandAT serial response

 The module should answer “ok”, however in some cases I got CME 58 errors. I think it means that it temporarily lost the signal, just sending AT again should work.

Next, we need to set the module to SMS mode :


followed with a new line:

Setting SMS mode

And finaly, to send the message :


(replacing the phone number with your’s) It will ask you to enter your message :

Sending SMS

Wait a few seconds and you should have youself a new message on your phone!


I had a few problems due the poor quality of my chinese jumper wires… I was also using a faulty usb extender cable.

Here is a document that helped me with certain errors and AT commands : GSM Developer Guide – GSM AT Commands – Rev A


Once all the wiring was in done and checked and the module answers, you only need 3 lines to send an sms! In the next article, I’ll try and send one from an arduino/ESP8266 instead of the computer.