mtgtopdeck
Posts: 22
Joined: Tue Dec 22, 2015 4:27 am

GPSD + Jessie lite + rpi0 + ublox Neo-6m gps - [SOLVED]

Wed Dec 23, 2015 7:20 am

I am attempting to get GPS set up.

I have a Raspberry Pi Zero running Jessie Lite
I have a UBLOX Neo-6M GPS

Image


I have installed GPSD

Code: Select all

sudo apt-get install gpsd
then edited cmdline.txt

Code: Select all

sudo nano /boot/cmdline.txt
and removed

Code: Select all

console=ttyAMA0,115200
then edited

Code: Select all

sudo nano /etc/default/gpsd
and added

Code: Select all

GPSD_OPTIONS="/dev/ttyAMA0"
then pointed gpsd at ttyAMA0

Code: Select all

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
if I screen ttyAMA0 i get some gps data

Code: Select all

sudo screen /dev/ttyAMA0
gives me lots of this ( replaced most data here with "..." )

Code: Select all

$GPGGA,064...
$GPGSA,A,3,...
$GPGSV,3,1,...
$GPGSV,3,2,12...
$GPGSV,3,3,12,...
$GPGLL,371...
$GPTXT,01,01...
$GPRMC,064...
$GPVTG,86.7...
$GPGGA,064...
$GPGSA,A,3,3...
$GPGSV,3,1,...
$GPGSV,3,2,...
$GPGSV,3,3,...
$GPGLL,371...
$GPRMC,064...
if i do

Code: Select all

gpsmon
i get

Code: Select all

tcp://localhost:2947          JSON slave driver>
(115) {"class":"VERSION","release":"3.11","rev":"3.11-3","proto_major":3,"proto_minor":9,"remote":"tcp://localhost:2947"}
(125) {"class":"DEVICES","devices":[{"class":"DEVICE","path":"tcp://localhost:2947#/dev/ttyAMA0"}],"remote":"tcp://localhost:2947"}
(154) {"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":false,"timing":false,"split24":false,"pps":true,"remote":"tcp://localhost:2947"}
if I do

Code: Select all

cgps -s
I always get

Code: Select all

lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x    Time:       n/a                        xxPRN:   Elev:  Azim:  SNR:  Used: x
x    Latitude:   n/a                        xx                                 x
x    Longitude:  n/a                        xx                                 x
x    Altitude:   n/a                        xx                                 x
x    Speed:      n/a                        xx                                 x
x    Heading:    n/a                        xx                                 x
x    Climb:      n/a                        xx                                 x
x    Status:     NO FIX (0 secs)            xx                                 x
x    Longitude Err:   n/a                   xx                                 x
x    Latitude Err:    n/a                   xx                                 x
x    Altitude Err:    n/a                   xx                                 x
x    Course Err:      n/a                   xx                                 x
x    Speed Err:       n/a                   xx                                 x
x    Time offset:     n/a                   xx                                 x
x    Grid Square:     n/a                   xx                                 x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
I've been piecing together many tutorials so most of this is a shot in the dark.
What do I need to do to get gpsd to see my gps?
Last edited by mtgtopdeck on Thu Dec 24, 2015 8:24 am, edited 3 times in total.

User avatar
hansotten
Posts: 324
Joined: Fri Jul 13, 2012 6:01 am
Contact: Website

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Wed Dec 23, 2015 7:32 am

There may be more involved to get the tty free.

The convenient way is to use the raspi-config option to free the tty.
Last edited by hansotten on Wed Dec 23, 2015 10:23 am, edited 1 time in total.
http://duinorasp.hansotten.com for Raspberry Pi and Arduino and ESP8266
http://retro.hansotten.nl for retrocomputing with the 6502 cpu

User avatar
DougieLawson
Posts: 36540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Wed Dec 23, 2015 10:12 am

Have you disabled the serial console using sudo raspi-config?

Code: Select all

9 Advanced Options               Configure advanced settings   
A8 Serial                        Enable/Disable shell and kernel m  
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

lemmiwinks81
Posts: 1
Joined: Wed Dec 23, 2015 5:03 pm

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Wed Dec 23, 2015 5:16 pm

i have trouble in precise locating my position with the neo 6m and raspberry.
the module is connected via gpio ports, without enabling the serial console in raspi-config.
when i enable the serial console, the green led on the module is almost instantly blinking, but i dont get any output via xgps/gpsmon.
disabling the communication works but something seems off, as i said earlier, its inaccurate.
thanks for help in advance

mtgtopdeck
Posts: 22
Joined: Tue Dec 22, 2015 4:27 am

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Wed Dec 23, 2015 8:38 pm

I have disabled the serial console

sudo raspi-config
9 Advanced Options
A8 Serial
would you like to enable serial? <no>
<finish>
reboot <yes>

There is no change to any results

mtgtopdeck
Posts: 22
Joined: Tue Dec 22, 2015 4:27 am

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Wed Dec 23, 2015 10:53 pm

I removed the current symlink to ttyAMA0 and rebooted

Code: Select all

sudo systemctl stop [email protected]
sudo systemctl disable [email protected]
I found this solution here

now

Code: Select all

gpsmon /dev/ttyAMA0
is giving me (replaced lat/lon with "X"s)

Code: Select all

[email protected]:~ $ sudo gpsmon /dev/ttyAMA0
/dev/ttyAMA0 9600 8N1         NMEA0183>
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
xTime: 2015-12-23T22:47:06.000Z Lat:  XX XX' XX.459" N Lon: XXX XX' XX.610" W  x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Cooked PVT qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x GPTXT GPRMC GPVTG GPGGA GPGSA GPGSV GPGLL                                    x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Sentences qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
lqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
xCh PRN  Az El S/N xxTime:      224706.00        xxTime:      224706.00        x
x 0   1 257 55  39 xxLatitude:   XXXX.79099 N   xxLatitude:  XXXX.79099       x
x 1   3 314 45  34 xxLongitude:  XXXX.42684 W   xxLongitude: XXXX.42684      x
x 2  10 118  6  24 xxSpeed:     0.039            xxAltitude:  XX.2             x
x 3  11 234 34  34 xxCourse:                     xxQuality:   1   Sats: 12     x
x 4  14  59 19  34 xxStatus:    A       FAA: A   xxHDOP:      0.79             x
x 5  17 310  1  10 xxMagVar:                     xxGeoid:     -30.0            x
x 6  19 291  6  30 xmqqqqqqqqqqq RMC qqqqqqqqqqqqjmqqqqqqqqqqq GGA qqqqqqqqqqqqj
x 7  22 117 22  42 xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqklqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x 8  23 263 23  33 xxMode: A 3                   xxUTC:           RMS:         x
x 9  25  47  9  27 xxSats: 32 31 1 11 2...0 3 14 xxMAJ:           MIN:         x
x10  26 134 13  39 xxDOP: H=0.79  V=1.01  P=1.28 xxORI:           LAT:         x
x11  31  71 61  40 xxPPS offset:                 xxLON:           ALT:         x
mqqqqqq GSV qqqqqqqjmqqqqqqqq GSA + PPS qqqqqqqqqjmqqqqqqqqqqq GST qqqqqqqqqqqqj

but

Code: Select all

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
sudo cgps -s
still gives me nothing

mtgtopdeck
Posts: 22
Joined: Tue Dec 22, 2015 4:27 am

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps

Thu Dec 24, 2015 7:56 am

Things are working!

I opened

Code: Select all

sudo nano /etc/default/gpsd
and changed

Code: Select all

DEVICES=""
to

Code: Select all

DEVICES="/dev/ttyAMA0"
and now when I

Code: Select all

cgps -s
I successfully get a reading

Code: Select all

┌───────────────────────────────────────────┐┌─────────────────────────────────┐
│    Time:       2015-12-24T07:53:49.000Z   ││PRN:   Elev:  Azim:  SNR:  Used: │
│    Latitude:    XX.XXXXXX N               ││   1    20    054    08      Y   │
│    Longitude:  XXX.XXXXXX W               ││   6    14    164    15      Y   │
│    Altitude:   66.3 m                     ││   7    07    132    20      Y   │
│    Speed:      0.1 kph                    ││  11    12    043    14      Y   │
│    Heading:    0.0 deg (true)             ││  13    45    238    37      Y   │
│    Climb:      0.0 m/min                  ││  15    30    284    20      Y   │
│    Status:     3D FIX (11 secs)           ││  17    85    120    30      Y   │
│    Longitude Err:   +/- 2 m               ││  19    68    059    31      Y   │
│    Latitude Err:    +/- 5 m               ││  24    12    313    14      Y   │
│    Altitude Err:    +/- 11 m              ││  28    54    043    32      N   │
│    Course Err:      n/a                   ││  30    38    127    32      N   │
│    Speed Err:       +/- 57 kph            ││ 138    44    156    33      N   │
│    Time offset:     0.712                 ││                                 │
│    Grid Square:     CM87xh                ││                                 │
└───────────────────────────────────────────┘└─────────────────────────────────┘

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps - [SOLVED]

Thu Feb 04, 2016 2:59 pm

Been having the exact same problems for a while and have been going round and round. Gpsmon was always fine, but cgps etc never worked.

I'll try that very last bit.

(Only tried on A+/B+/B2 since Jessie was released)

alphanumeric
Posts: 2155
Joined: Tue Jan 19, 2016 2:17 pm
Location: Sydney, Nova Scotia, Canada

Re: GPSD + Jessie lite + rpi0 + ublox Neo-6m gps - [SOLVED]

Fri Feb 05, 2016 10:10 pm

bensimmo wrote:Been having the exact same problems for a while and have been going round and round. Gpsmon was always fine, but cgps etc never worked.

I'll try that very last bit.

(Only tried on A+/B+/B2 since Jessie was released)
Ditto to the above. After doing the DEVICES="/dev/ttyAMA0" edit cgps -s now works for me in Jessie. :D

Return to “Troubleshooting”