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 21:17:38 +0100

Just been playing more.

I send :

'\x06\x04\x04\x00\xFF\x87\x00\x00'

I.e removing the B562 header, and the checksum trailer

gpsctl:IO: => GPS: UBX class: 06, id: 04, len: 6, crc: 9a39
▒b▒▒▒9gpsctl:IO: => GPS: b562060406000400ff8700009a39

so it should be sending b56206040400ff87000094f5 it seems to be sticking some extra stuff in there.

Anthony




On Tue, Sep 3, 2013 at 8:39 PM, Anthony Stirk <address@hidden> wrote:
Hi Beat thanks for the reply.

I tried again :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -e /dev/ttyAMA0 -x  '\xB5\x62\x06\x04\x04\x00\xFF\x87\x00\x00\x94\xF5'
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: b5, id: 62, len: 10, crc: 3e92
▒b▒b
▒▒▒▒>▒gpsctl:IO: => GPS: b562b5620a0006040400ff87000094f53e92

This is the cold boot. Didn't see to have any effect.

Again CRC is wrong. 

Removing the CRC from above :

address@hidden ~ $ sudo gpsctl -b -D 5 -t "uBlox UBX binary" -e /dev/ttyAMA0 -x  '\xB5\x62\x06\x04\x04\x00\xFF\x87\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: b5, id: 62, len: 8, crc: b3f7
▒b▒▒▒▒▒gpsctl:IO: => GPS: b562b562080006040400ff870000b3f7

Still wrong :)

I'm sure I'm doing something wrong here. Its getting the message class correct but failing to calculate the checksum correctly.

Anthony





On Tue, Sep 3, 2013 at 8:25 PM, Beat Bolli <address@hidden> wrote:
On 03.09.13 21:13, Anthony Stirk wrote:
> 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
...

> 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

Are you sure you don't have a shell quoting problem? The backslashes
should be part of the argument, so you have to use single quotes around
the -x argument.

Beat
--
mail: echo '<address@hidden>' | tr -d '[A-S]'
pgp: 0x506A903A; 49D5 794A EA77 F907 764F  D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E

"It takes love over gold, and mind over matter" -- Dire Straits




reply via email to

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