1

i buy RPI GPS Add-on IM131227001 and when i connect it into RPI then GPS module start logging this:

May  8 13:57:53 raspi kernel: [  554.811792] SysRq : HELP : loglevel(0-9) reboot(b) crash(c) terminate-all-tasks(e) memory-full-oom-kill(f) debug(g) kill-all-tasks(i) thaw-filesystems(j) sak(k) show-memory-usage(m) nice-all-RT-tasks(n) poweroff(o) show-registers(p) show-all-timers(q) unraw(r) sync(s) show-task-states(t) unmount(u) show-blocked-tasks(w) 

and I can not do anything.

How I can turn off this logging?

1

The following works on my Raspberry Pi Model B with ITead Studio RPI GPS Add-on

enter image description here

Enable the UART

By default the UART is enabled to allow you to connect a terminal window and login. You need to disable this to free it up for the GPS Module.

cmdline

Edit the boot options to change the UART so it doesn't provide a terminal connection by default:

sudo nano /boot/cmdline.txt

Change:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

To:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

(you are removing this bit:)

console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

inittab

Change inittab so it doesn't spawn a login to the serial connection:

sudo nano /etc/inittab

Change:

#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

To:

#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Reboot

sudo shutdown -r now

Install GPSD

GPSD is an open source project which provides a daemon which streams GPS data via a TCP socket, allowing you to communicate with a whole host of different GPS devices (not only this one):

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

Run gpsd

GPSD needs to be started up, using the following command:

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

Test gpsd

There is a simple GPS client which you can run to test everything is working:

cgps -s

It may take a few seconds for the data to come through.

cgps

Troubleshooting

Baud rate

If cgps repeatedly times out try running debug mode in the foreground:

sudo gpsd -b -N -D 3 /dev/ttyAMA0 -n -F /var/run/gpsd.sock

My GPS's specifications has it's baud rate at 38400 and only starts working after gpsd attempts 4800, 9600, 19200 then finally 38400.

Set baud rate, based on your GPS specs

sudo stty -F /dev/ttyAMA0 38400

(after reboot, baud rate returns to default)

Don't wait

Some GPS models require you to use the -n option, which instructs gpsd not to wait for client connection to poll the GPS.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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