In compliance with high industry standards

Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

How to get GPS location on Panel PC

Using SIM7600E Module and TouchBerry Pi 10"

Odoo image and text block





The SIM800L module is the integrated module for the use of GPRS/GSM in Industrial Shields PLC.
The SIM7600E is multi-band LTE-TDD/LTE-FDD/HSPA + and GSM/GPRS/EDGE module solution for downlink data transfer. It has strong extension capability with rich interfaces including UART, USB2.0, I2C, GPIO, etc. The module provides much flexibility and ease of integration for customer's application.

So, let's see how to test our Touchberry Pi 10 with GPS and GPRS modules!


How to connect 
Raspberry PLC to Wi-Fi

Read >>


Basics about Raspberry Pi PLC
analog outputs

Read >>

How to find your
perfect industrial PLC

Read >>

How to program Raspberry PLC
interrupt inputs with Python

Read >>

Raspberry PLC
family products

Read >>

TouchBerry Pi
family products

Read >>


- TouchBerry PI 10'1" 

- SIM800L module

- SIM7600E 4G Hat module

- GPS Antenna

- 12V to 24V Power Supply


In this blog, we will learn how to get GPS location on our Raspberry Pi based Industrial Panel PC. By doing this, we will learn how to:

1. Communicate with our GPS and GPRS modules using AT commands.

2. Get location from GPS coordinates.

So, let's start!

First of all, ensure that the hardware is right connected like so:

1. Once the hardware is ready, let's check that we communicate to the GPS/GPRS modules through the Serial Port.

So, open up a terminal window in your TouchBerry Pi 10, and go to raspi-config:

sudo raspi-config

Then, go to the Interface Options > Serial port and disable the login shell and enable the serial interface.

2. Now, let's check that our device can recognize the USB ports. 
By running the following command:

ls /dev/ttyUSB*

you should see the following:

/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2  /dev/ttyUSB3  /dev/ttyUSB4  

3. Install the screen tool to be able to read the data through the Serial Port:

sudo apt-get update
sudo apt-get install screen

4. Now, open the /dev/ttyUSB2 at 115200 as baudrate, and let's start using the AT commands to communicate with our modules:

screen /dev/ttyUSB2 115200

5. Run the following commands:

AT               <--- Send to get module connection
OK               <--- Receive
AT+CGPS=1,1     <--- Send to enable GPS
OK               <---- Receive
AT+CGPSINFO: (Your GPS coordinates should appear here)

Click on the link below to know more about AT commands:

6. Open the /dev/ttyUSB1 port to get the GPS data:

screen /dev/ttyUSB1 115200


Another way of getting GPS data is by installing GPS Daemon.

1. So, let's install a GPS Daemon so that it understands the serial data that our GPS module is providing via Serial Port.

sudo apt-get update
sudo apt-get install gpsd gpsd-clients

2. Now, run gps data service in background:

sudo gpsd /dev/ttyUSB1 -F /var/run/gpsd.sock

3. Finally, run the command below to get GPS data through a monitor that watches packets and displays them along with diagnostic information.


If you got any error, try the following:

1. Kill the gpsd processes:

sudo killall gpsd

2. Restart the gpsd socket and service

sudo systemctl restart gpsd.socket gpsd.service

3.  Run gpsd data service in background.

sudo gpsd /dev/ttyUSB1 -F /var/run/gpsd.sock

So, if you did it right, you should see all GPS data coming to the Serial Port of our Industrial Panel PC! :)

Check out the following link to learn how to get GPS coordinates with a Google Maps Widget, using Node-RED:

Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.

Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!