1

I have this GPS module and an arduino shield for the raspberry pi from Cooking Hacks.

See link: https://www.cooking-hacks.com/gps-shield-for-raspberry-pi

My raspberry pi B+ is fully updated i have a mouse, keyboard and a monitor attached to it right now. I am following this tutorial to test out the GPS module if i can receive NMEA messages. See guide here: https://www.cooking-hacks.com/documentation/tutorials/gps-module-arduino-raspberry-pi-tutorial/

When i ran the cutecom software. (photo from the guide)

enter image description here

I received an error "could not open /dev/ttyUSB0."

I have tried to find more tutorials regarding this setup but it always leads me back to their website, which lacks details on how to troubleshoot their own setup. Has anyone tried using these?

1 Answer 1

2

Depending on how the gps is connected to the Raspberry Pi you have to use the correct output. I.e. if it is connected via a USB port then /dev/ttyUSB0 might be correct, but as far as I understand after reading the tutorial the gps is not connected to a USB port but rather the GPIO pins.

If you can ssh/use the terminal you could look for the output by typing cat /etc/default/gpsd. The output should show something like this

START_DAEMON="true"
GPSD_OPTIONS="-n"
DEVICES="/dev/ttyAMA0"
USBAUTO="true"
GPSD_SOCKET="/var/run/gpsd.sock"

In my case the gps is connected to /dev/ttyAMA0 (as a serial device and not USB). You could look for more information by typing dmesg | grep -i --color=yes tty (the --color=yes is just to add some color to the output and making it easier to find what you are looking for, and can be omitted).

ntp@ntp: ~ $ dmesg | grep -i tty
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x4f16bc52 smsc95xx.macaddr=B8:27:EB:16:BC:52 bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.001745] console [tty1] enabled
[    0.696723] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3
[   75.979273] pps pps1: new PPS source ttyAMA0
[   75.979640] pps pps1: source "/dev/ttyAMA0" added

You can see that my GPS gets registered at boot time as /dev/ttyAMA0 and thusly that is the input I use.

So, to make this a lot shorter: Try changing your device to /dev/ttyAMA0 or whatever you can find in /etc/default/gpsd.

1
  • Wow thank you for the detailed reply. The GPS is connected to an arduino shield and then the arduino shield is on the GPIO pins of the raspberry pi. I am still trying to figure out why my raspberry pi starts to fail booting up whenever i edit the cmdline.txt. I will try out what you suggested before i pick it as an answer. Again, thank you very much. Commented Jun 1, 2015 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.