<html>
<p>I have been working on a wardriving project and decided to share the whole project on Steemit network. This is the first part which will show how to use Neo 6M GPS module over UART connection.</p>
<p><img src="https://s8.postimg.cc/b9q0bg6bp/IMG_20180831_220755.jpg" width="600" height="800"/></p>
<p>(Photos are my own)</p>
<p>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.</p>
<h2>Connecting the module</h2>
<p><br>
The module has 5 pin connectors that needed to be soldered in my case. You can find data on the pinout in their official <a href="https://www.u-blox.com/sites/default/files/products/documents/NEO-6_DataSheet_%28GPS.G6-HW-09005%29.pdf">data sheet.</a></p>
<p><img src="https://s8.postimg.cc/e533iod05/pinout.png" width="1043" height="800"/></p>
<p>Connect it as following</p>
<p>VCC (Power supply pin) -> 3.3V / 5V on RPI (GPIO 01/02) / USB module</p>
<p>GND (Ground) -> GND on RPI (GPIO 06) / USB module</p>
<p>TXD (Data out) -> RXD on RPI (GPIO 10) / USB module</p>
<p>RXD (Data in) -> TXD on RPI (GPIO 08) / USB module</p>
<p>PPS (Pulse per second) is being used for having an accurate clock which is not needed in this case.</p>
<p>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.<br>
To test out is connection working properly I have ran the following command</p>
<blockquote>sudo cat /dev/ttyUSB0</blockquote>
<p>"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.</p>
<p><br></p>
<h3>Installing the software</h3>
<p><br></p>
<p>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.</p>
<blockquote>sudo apt install gpsd gpsd-client</blockquote>
<p>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.</p>
<blockquote>stty -F /dev/ttyUSB0 9600</blockquote>
<p>Now to start GPS daemon and link the module</p>
<blockquote>sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock</blockquote>
<p>That's about all. Quick 'n easy! Before usage with airodump/kismet, I wanted to check is location assigned properly. After quick googling the best solution was cgps (gps client). </p>
<blockquote>cgps -s</blockquote>
<p>It took 5 seconds to have fixed position outside while doing the same in doors was almost IMPOSIBLE!</p>
<p><img src="https://s8.postimg.cc/x2nrt351h/IMG_20180831_171134.jpg" width="1067" height="800"/></p>
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>
</html>