How to connect 3DR GPS uBlox to Raspberry Pi

Here is my connection (You can check GPIO pinout here):

3689525957?profile=original

I used theFTDI GPS adapter cable, solder pads can be used also, just have in mind the TX pad = RX Ublox and RX pad = TX Ublox.

To get information from GPS in the Raspberry Pi (RPi), we will use gpsd.

Open a terminal

Install gpsd:

sudo apt-get install gpsd gpsd-clients python-gps

Setup RPi UART:

sudo nano /boot/cmdline.txt
delete the "ttyAMA0" parameter to have:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

sudo nano /etc/inittab
comment (add a hash #) the line below "#Spawn a getty on Raspberry Pi serial line" like this:
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Reboot the RPi to apply the configuration:
sudo reboot

At this moment gpsd program is installed. If any gpsd session is open, stop it by:

sudo killall gpsd

Due to 3DR GPS is configured at 38400 bauds, set the RPi to 38400 bauds will be needed:

stty -F /dev/ttyAMA0 38400

(when RPi reboot baud rate returns to default)

Start gpsd:

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

Display GPS data:

cgps -s

When 3DR GPS is fixed, the fix blue led will be blinking and you will get the data like this:

3689526008?profile=original

If the GPS is not fixing, try outdoors where you have a clear sky view.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Moderator

    I know its an old thread but I have just followed the instructions and it worked perfectly thank Rogelio

  • swap your Tx/Rx wires to see if this fix the problem

  • Hi,

    I've followed all the instructions but when I use the cgps command all I get is n/a for the values and NO FIX (0 secs) on status even though the blue fix light is flashing. Any ideas what could be causing this?

  • Yes indeed, I was going to fork vcc, gnd and tx pins from ublox, this if for the MyFlyDream automate antenna tracker. Apparently all it needs is GPS feed at any baud rate up to 112k baud.
  • As far as I know it should be possible, but no guarantees.  http://electronics.stackexchange.com/questions/49405/multiple-clien... could be helpful.  Make sure you have a common ground.  

  • basically  using Tx pin only? 

  • hey, a quick question on the 3dr GPS module  ->uart connectivity:

    Is it possible to use that GPS unit with another UART device which operates in receive mode only, while still keeping apm connection working at the same time? 

  • I see why it doesn't damage the pi now.  Most, if not all, of the GPSs available run on 3.3 volts.  They take a 5v input and regulate it.  They are 5v tolerant on the input but output at 3.3v.

  • No problem at all. I tested just to "know" and it all went very well and i have been using it for a long time ever since.

  • Do you have any problems with using the 5v UART on the 3.3v only Pi?  I know that the pi gpio pins are not 5v tolerant. 

This reply was deleted.