...at least you're not on hold...

January 23, 2020

Neo 6M GPS to RPi3

Neo 6M GPS to RPi3

I have been working on a wardriving project and decided to share the whole project.

This is the first part which will show how to use Neo 6M GPS module over UART connection.

After testing the module both on raspberries UART and USB Serial Module (CP2102), USB module turned out to be more reliable with less signal losses for some reason?

Connecting the module

The module has 5 pin connectors that needed to be soldered in my case. You can find data on the pinout in their official data sheet.

Connect it as following

VCC (Power supply pin)  -> 3.3V / 5V on RPI (GPIO 01/02) / USB module

GND (Ground) -> GND  on RPI (GPIO 06) / USB module

TXD (Data out) -> RXD on RPI (GPIO 10) / USB module

RXD (Data in) -> TXD on RPI (GPIO 08) / USB module

PPS (Pulse per second) is being used for having an accurate clock which is not needed in this case.

After connecting GPS module, RPI can be turned on. Red LED on top of the GPS module will start flickering as a good proof that wiring worked well.

To test out the connection, I ran the following command:

sudo cat /dev/ttyUSB0

“ttyUSB0” is subjective, it was 0 in my case because I had no other USB devices connected to RPI. It should start outputting a lot of data which means the connection works flawlessly.

Software preparations

I will install gpsd and all of it’s depencies. GPSD is a GPS daemon that reads data from GPS module and makes it available to other software.

sudo apt install gpsd gpsd-client

Download and installation may take a few minutes depending on the SD card speed. Great for a quick coffee break!  Next thing to do was set the baud rate to 9600 which is best option for this serial module.

stty -F /dev/ttyUSB0 9600

Now to start GPS daemon and link the module

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

That’s about all. Quick ‘n easy!

Before any further usage with airodump/kismet, I wanted to check is location assigned properly. After quick googling the best solution was cgps (GPS client). 

cgps -s

It took 5 seconds to have fixed position outside while doing the same in doors was almost IMPOSSIBLE!

To be continued 🙂
Posted in Linux