Using a Cellular/Mobile Phone Network to Send Data with Arduino/Embedded

Today I used an Arduino reprogrammable electronics board and a GSM/GPRS modem to send data to the Internet. This will be useful for the sensors I intend to build.

You can see a video of it operating below. One window shows the output from the serial interface as it makes a request to my web server and outputs the response, and the other window displays the access logs on my web server.

I used a software UART (parallel and serial data converter), as using the Arduino’s built-in serial interface caused conflicts. Learning to use a software UART is going to be very useful for the next step in the project.

I did consider making a Cat Facts for Arduino, but I resisted the distraction.

I didn’t have any issues with power spikes causing a reset (the GSM board uses a lot of power) as this is a version 2 board with soft start circuitry:

Soft Start Circuitry
Soft Start Circuitry (Source)

I also used AT codes to send SMS text messages. A full list of AT codes are available here, and I used these:

Send a text

Set to human readable text mode:

Set phone number:

Enter the message

Send hex 1A to escape message.

List texts


Read a text

AT+CMGR=<index> (indexes start at 1)

Delete a text



The only stumbling point I had was when the GSM modem was set to a different baud rate than my software serial interface. To change this, I sent the AT command AT+IPR=9600 to reconfigure the modem.

I learnt that AT commands are also used to send and receive via TCP/UDP. This made it much more straightforward than some kind of low level system I had imagined. All that is required from the Arduino is to send AT commands (e.g. AT+CIPSEND=) and listen for incoming responses.

Explanation for non-techies:

I made an electronic circuit that can send information to the Internet. This will be useful for making a sensor e.g. a temperature sensor for an office that is accessible on any computer/smartphone.