gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] Binary protocol using


From: Anthony Stirk
Subject: Re: [gpsd-users] Binary protocol using
Date: Tue, 3 Sep 2013 20:13:10 +0100

Hi Gary,

They are always in binary mode you can issue UBX commands to a Ublox module without issuing any preceding commands. By default a Ublox module will output NMEA as expect but you can issue commands either via the proprietary binary UBX protocol or the PUBX protocol. The "clever stuff" like switching dynamic model is done via UBX.  

We do it all the time for our high altitude balloon trackers as we have to put them in dynamic model 6 to permit the use above 18km however there is a stationary "timing" mode which is what I would like to enable in this instance.

The binary command for this (obtained via uCenter) is :

B5 62 06 24 24 00 FF FF 02 03 00 00 00 00 10 27 00 00 05 00 FA 00 FA 00 64 00 2C 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 54

Or 

\xB5\x62\x06\x24\x24\x00\xFF\xFF\x02\x03\x00\x00\x00\x00\x10\x27\x00\x00\x05\x00\xFA\x00\xFA\x00\x64\x00\x2C\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x54

The GPS is confirmed working and gpsd is running as :

1961 ?        S<sl 524:28 /usr/sbin/gpsd -n -F /var/run/gpsd.sock -P /var/run/gpsd.pid /dev/ttyAMA0

If I do :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -x  \xB5\x62\x06\x24\x24\x00\xFF\xFF\x02\x03\x00\x00\x00\x00\x10\x27\x00\x00\x05\x00\xFA\x00\xFA\x00\x64\x00\x2C\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x54
gpsctl:PROG: uBlox UBX binary driver selected.
gpsctl:ERROR: device must be specified for low-level access.

So I do :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -e /dev/ttyAMA0 -x \xB5\x62\x06\x24\x24\x00\xFF\xFF\x02\x03\x00\x00\x00\x00\x10\x27\x00\x00\x05\x00\xFA\x00\xFA\x00\x64\x00\x2C\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x54
gpsctl:PROG: uBlox UBX binary driver selected.
gpsctl:PROG: switch_driver(uBlox UBX binary) called...
gpsctl:PROG: selecting uBlox UBX binary driver...
gpsctl:SHOUT: switching to mode BINARY.
gpsctl:IO: => GPS: UBX class: 78, id: 42, len: 130, crc: b967
▒bxB▒5x62x06x24x24x00xFFxFFx02x03x00x00x00x00x10x27x00x00x05x00xFAx00xFAx00x64x00x2Cx01x00x00x00x00x00x00x00x00x00x00x00x00x00x00x12x54▒ggpsctl:IO: => GPS: b5627842820035783632783036783234783234783030784646784646783032783033783030783030783030783030783130783237783030783030783035783030784641783030784641783030783634783030783243783031783030783030783030783030783030783030783030783030783030783030783030783030783030783030783132783534b967

Which all looks good. However I'm not convinced its taking effect as the following should disable all NMEA messages (example given as you can ascertain if its working very quickly)  :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -e /dev/ttyAMA0 -x  \xB5\x62\x06\x00\x14\x00\x01\x00\x00\x00\xD0\x08\x00\x00\x80\x25\x00\x00\x07\x00\x01\x00\x00\x00\x00\x00\xA0\xA9
gpsctl:PROG: uBlox UBX binary driver selected.
gpsctl:PROG: switch_driver(uBlox UBX binary) called...
gpsctl:PROG: selecting uBlox UBX binary driver...
gpsctl:SHOUT: switching to mode BINARY.
gpsctl:IO: => GPS: UBX class: 78, id: 42, len: 82, crc: 7bf4
▒bxBR5x62x06x00x14x00x01x00x00x00xD0x08x00x00x80x25x00x00x07x00x01x00x00x00x00x00xA0xA9{▒gpsctl:IO: => GPS: b56278425200357836327830367830307831347830307830317830307830307830307844307830387830307830307838307832357830307830307830377830307830317830307830307830307830307830307841307841397bf4

and I see it doesn't by running gpsmon on another session.

I note the CRC gpsctl is giving is 7bf4 but the CRC for that string calculated by Ucenter is actually A0A9 on that command I have tried issuing it without the checksum, also doesn't work :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -e /dev/ttyAMA0 -x  \xB5\x62\x06\x00\x14\x00\x01\x00\x00\x00\xD0\x08\x00\x00\x80\x25\x00\x00\x07\x00\x01\x00\x00\x00\x00\x00
gpsctl:PROG: uBlox UBX binary driver selected.
gpsctl:PROG: switch_driver(uBlox UBX binary) called...
gpsctl:PROG: selecting uBlox UBX binary driver...
gpsctl:SHOUT: switching to mode BINARY.
gpsctl:IO: => GPS: UBX class: 78, id: 42, len: 76, crc: 9a68
▒bxBL5x62x06x00x14x00x01x00x00x00xD0x08x00x00x80x25x00x00x07x00x01x00x00x00x00x00▒hgpsctl:IO: => GPS: b56278424c00357836327830367830307831347830307830317830307830307830307844307830387830307830307838307832357830307830307830377830307830317830307830307830307830307830309a68

So basically I'm a little confused. If I plug the module into a machine with ucenter on it and issue the commands or if I issue them via an Arduino for example they work. Working code from Arduino that sets and verifies here : http://pastebin.com/1mH1bQt2

Regards,

Anthony


On Tue, Sep 3, 2013 at 6:45 PM, Gary E. Miller <address@hidden> wrote:
Yo Anthony!

On Tue, 3 Sep 2013 15:03:42 +0100
Anthony Stirk <address@hidden> wrote:

> You can use gpsctl i.e :
> sudo gpsctl -b -D 5 -t "uBlox UBX binary" -x
> \xB5\x62\x06\x04\x04\x00\xFF\x87\x00\x00\x94\xF5

Are you sure the uBlox was in binary mode first?


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588


reply via email to

[Prev in Thread] Current Thread [Next in Thread]