PixieBoard + GPS Antenna = lat, lng and time

Roberto Himmelbauer
PixieBoard
Published in
4 min readJul 19, 2018

In this tutorial I will show you how you can obtain your location with a PixieBoard and a GPS antenna. PixieBoard comes with a Cellular Modem that supports GPS, GLONASS, 3G and 4G with the PRO and PRO+.

We worked hard in providing the necessary configurations, so you do not loose time in seeing how to enable and configure the Modem. As you will soon find out it only takes 1 installation and 3 commands to get your Latitude and Longitude.

Requirements

  • Have a configured PixieBoard. If you are new please follow this guide before you continue: Getting started with PixieBoard. If you do not have a PixieBoard you can get one at GroupGets.com.
  • Have a GPS antenna with ULF connector for the PixieBoard. Get one here and do not forget to buy the ULF adapter.
  • Power supply for the PixieBoard.

Connecting the Antenna to the PixieBoard

PixieBoard + GPS Antenna

As shown in the picture above, the GPS antenna goes between the “main” antenna connector and the “div” antenna connector. If you have any doubts you will see next to the connector the “gps” silk screen.

Power UP the PixieBoard

Once you have connected the GPS antenna you can power up your PixieBoard and connect through it by SSH or serial port through the USB OTG connector.

Once logged in you should install socat:

sudo pacman -S socat

Then enable the cellular modem with:

sudo enablePixieModem

Once executed the enablePixieModem package will enable the modem and set up a network interface called wwan0. It will take approx. 30 to 80 seconds to bring up the wwan0 interface. Type the following command to verify the interface is up:

sudo ip link

You should see the following output:

You can also verify if the modem has been enabled with:

sudo mmcli -L

Output:

Modem 0 Enabled

Now that we have all the necessary components ready let go into super user to be able to execute the required commands to enable GPS tracking:

sudo su

Now lets enable the AT commands to communicate with the Modem. Type:

echo "ATE1" | socat - /dev/ttyUSB2,cr

You should expect an OK as an output. Lets enable GPS tracking and configure it with:

echo "AT+QGPS=1,30,50,0,1" | socat - /dev/ttyUSB2,cr

Expect the following output:

Let’s get our location:

echo "AT+QGPSLOC? " | socat - /dev/ttyUSB2,cr

Output:

If you receive an error code, it means that is still finding your locations. Try it again in a few seconds until you see your location.

Or we can choose another output format:

echo "AT+QGPSLOC=2" | socat - /dev/ttyUSB2,cr

Output:

You can see that Latitude and Longitude are given without the N/S or W/E ending.

You can test your location here

Here are the output parameters provided by Quectel:

Final Notes

You have seen how easy it is to get your location with the PixieBoard:

  • Enable the Modem
  • Enable AT commands
  • Enable GPS
  • Get Location

I strongly recommend you looking at Quectels’ documentation here for more information on the module.

--

--

Roberto Himmelbauer
PixieBoard

Engaged and interested in tackling problems related to IoT and Edge Solutions, Device Security and Software Provisioning