How to Send an SMS Text From a GSM Chip Using Putty




I want to be able to program the AI-Thinker A6 GSM module for one of my projects. As part of the learning curve, I set out to send a simple sms text message from the GSm module to my cell phone from a terminal emulator on MS Windows. I was aware that they ran on a 2G network which some may consider redundant, but it will be around in the UK for some time to come.

Step 1: Required Components

Here is what you need:

1. A6 - GSM/GPRS module - circa 4 dollars from Aliexpress.

2. FTDI basic from Sparkfun or equivalent.

3. Registered sim

4. Male- female Connectors

5. MS Windows Laptop or PC running Putty

Step 2: Connecting the Hardware

Firstly, fit the micro sim into the device. To do this lift the small hinged sim gate and slide in the sim and then lock. Note that the sim gate has two positions - open and locked and be careful, the sim gate can easily break. I also ensured, by using my smart phone, that the sim was registered and had sufficient credit. My UK Vodafone sim met these requirements.

Connect the following

FTDI TX <------> A6 UART_RXd

FTDI RX <------> A6 UART_TXd

FTDI GND <------> A6 GND


A6 PWR <-----------> A6 VCC 5.0

A6 RST <-------------> A6 GND (Do not connect to ground yet!!!!!)

Step 3: Power the FTDI Unit and the A6 GSM Unit

Firstly, connect the FTDI unit into a usb port on the laptop and then connect the GSM unit to the mains with a micro-usb charger (The official documentation states that 5V / 2A is required to power the GSM unit but I was able to power it with other micro-usb chargers). Next, open Windows Device Manager and find out which comms port the FTDI unit has been assigned.

Next, open up Putty and select the serial option and then type commX where X is the comms port that was shown in the Windows Device Manager. Change the speed to 115200. Click open keep this Putty window.

Step 4: Operation

Now you have the Putty window open, you shoudl see a blank screen. next, connect the cable connected to the RST pin on the A6 GSM unit and touch the GND pin beside the VCC pin. After a few seconds, you should see the following lines appear-

^CINIT: 2, 32, 41891

^STN: 37

^CINIT: 4, 8192, 37

^CINIT: 8, 2048, 1

^CINIT: 16, 0, 1638450

^CINIT: 32, 0, 0

+CREG: 0

After another 5-10 seconds, you should see the following lines appear,

^CINIT: 1, 0, 0

^CINIT: 2, 32, 41891

^STN: 37

^CINIT: 4, 8192, 37

^CINIT: 8, 2048, 1

^CINIT: 16, 0, 1638450

^CINIT: 32, 0, 0

+CREG: 0

+CIEV: service, 1 +CIEV: roam, 0

+CREG: 1

The last command is very important as +CREG: 1 means that the sim/ GSM unit has been registered on your Telecom carrier's network (e.g. Vodafone), and you are able to communicate with other devices.

You need two simple command sets to send your first sms text.



NEXT TYPE AT+CMGS="+XXXXXXXXXXXX" replacing the number enclosed in quotes with your number

You will be presented with a ">" prompt

Starting typing your message and then hit return. The cursor will move to the left of the line. Now type the "Ctrl" and "Z" keys and then wait.

You should then receive a successful message +CMGS: XX - where XX is a unique code


Good luck, you have sent your first sms message and are ready to start programming ur GMS/GPRS solution.



  • Make it Glow Contest 2018

    Make it Glow Contest 2018
  • Plastics Contest

    Plastics Contest
  • Optics Contest

    Optics Contest

4 Discussions


11 months ago

Is it possible to power it on VCC pin with 5V without microUSB port?

1 reply

Reply 11 months ago

Hi, my experience is that if you bypass the microUSb port then you will have to ensure that you address voltage peaks, dips, eg using a decoupling capacitor.


1 year ago

I'm not able to type something after "+CREG: 1".

Any idea why?

1 reply

Reply 1 year ago

Hi, if you see "+CREG: 1" that is positive because it means you are connected on your mobile network. There are a number of things which could go wrong after that. Firstly, I have found that the FTDI basic from Sparkfun has very poor connections and quite often one of the cables slips out or comes loose.The other is that, in my experience, the GSm unit has lost power which is less unlikely. How are you powering the Sparkfun and GSM unit.