Toggle Nav

Using GSM with Arduino as an alternative for GPS



Table of Contents


In this tutorial, you will learn how to create a navigation system by GSM module and Arduino instead of using GPS. At the end

What you will learn

  • You will learn more about GSM modules and how to use it with Arduino.
  • You can make a navigation system by GSM.

About Navigation

In navigation system, a radio station regularly sends signals around. These signals include the exact coordinates of that station. It does not matter whether the station is fixed, such as the Airport Control Tower, or movable, such as a satellite. The important thing is that the coordinates of the station itself should be known at any moment.

In this project, we want to make a navigation system without GPS module. Using GSM signals from your phone or other mobile devices is one way of finding location or tracking devices. When a GSM system is connected to a network, you will receive some information about the location of your device. We choose one of the GSM/GPRS SIMCOM modules to connect them to the network and an Arduino board to receive data and monitor the location of the device. Let’s do it.

Required Materials

Hardware Components

Arduino UNO R3 × 1
SIM900 GSM GPRS Quad-Band Development Module × 1

Software Apps

Arduino IDE



First, you must add the library. Download the Zip file, and add the file to Arduino IDE. Go to Sketch tab, Include library and Add ZIP Library. If it is the first time you are using an Arduino board, just follow these steps:

  • Go to and download the Arduino software compatible to your OS. Install the IDE software as instructed.
  • Run the Arduino IDE and clear the text editor and copy the following code in the text editor.
  • Choose the board in tools and boards, select your Arduino Board.
  • Connect the Arduino to your PC and set the COM port in tools and port.
  • Press the Upload (Arrow sign) button.
  • You are all set!
  • Necessary Files and Downloads:
#include "SIM900.h"
#include "SoftwareSerial.h"
//#include "inetGSM.h"
//#include "sms.h"
//#include "call.h"

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//this code is based on the example of Arduino Labs.

//Simple sketch to communicate with SIM900 through AT commands.

//InetGSM inet;
//CallGSM call;
//SMSGSM sms;

int numdata;
char inSerial[40];
int i=0;

void setup()
     //Serial connection.
     Serial.println("GSM Shield testing.");
     //Start configuration of shield with baudrate.
     //For http uses is raccomanded to use 4800 or slower.
     if (gsm.begin(9600))
     else Serial.println("\nstatus=IDLE");

void loop()
     //Read for new byte on serial hardware,
     //and write them on NewSoftSerial.
     //Read for new byte on NewSoftSerial.

void serialhwread()
     if (Serial.available() > 0) {
          while (Serial.available() > 0) {

          if(!strcmp(inSerial,"/END")) {
          //Send a saved AT command using serial port.
          if(!strcmp(inSerial,"TEST")) {
               Serial.println("SIGNAL QUALITY");
          } else {

void serialswread()

It’s simple to communicate with SIM900 through AT commands.

AT commands are commands for controlling modems. AT commands are actually derived from Hayes Command. All commands AT commands start with AT.

Be careful that AT is a prefix that receives a syntax and is not a command name. For example, one of the CMC + CMCAM commands is called AT + CMGS. There is another command called D that is sent to the modem as ATD.

Many GSM, GPRS, Bluetooth, and some other modules use AT commands for communication with computers and microcontrollers.

You can download all AT commands from Here.

Necessary Files and Downloads:

Now, to receive information about location, we need to use some special AT commands in order. After connecting to network, use these commands to prepare your modem to get the location data.


It’s for attaching GPRS. Probably, it’s on 1 by default.


It’s bearer setting for applications based on IP


Finally, this command gets location, time and date. Note that for searching the location in google map, you must change (x,y) coordinates order to (y,x).

Look at the GIF for more details.

What’s Next?

  • Try to use other modules with Arduino instead of GPS

Liked What you see?

Get updates and learn from the best

More To Explore

Leave a Reply

Your email address will not be published. Required fields are marked *