gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Earthmate and the Zodiac Driver


From: Derrick Brashear
Subject: Re: [gpsd-users] Earthmate and the Zodiac Driver
Date: Tue, 10 Jan 2012 14:14:40 -0500

On Tue, Jan 10, 2012 at 1:24 PM, Scott Nolde <address@hidden> wrote:
> Here's the grep output for the strace command below:
> $ grep EARTHA gpsd.strace.out

not exactly. my command involved a grep write\(, and the output
captured by strace's -o (for output) switch.
the output here isn't strace's output, it's gpsd's. if strace had
collected it, you'd see write(1, "gpsd:IO: <= GPS: EARTHA",
or somesuch, not gpsd:IO: <= GPS: EARTHA

example strace output (from /bin/true for this example) looks like e.g.
execve("/bin/true", ["/bin/true"], [/* 26 vars */]) = 0
uname({sys="Linux", node="meredith.dementix.org", ...}) = 0
brk(0)                                  = 0x990a000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34366, ...}) = 0


> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
> gpsd:IO: <= GPS: EARTHA
> gpsd:WARN: unknown sentence: "EARTHA"
> gpsd:PROG: found trigger string EARTHA.
>
>
> Nothing you didn't already expect.
>
> I haven't modded unit, but I did open it up one time to peek inside.
>
> -Scott
>
>
> On Mon, Jan 9, 2012 at 10:57 PM, Derrick Brashear <address@hidden>
> wrote:
>>
>> On Mon, Jan 9, 2012 at 10:19 PM, Scott Nolde <address@hidden>
>> wrote:
>> > Did the Earthmates require you send back EARTHA prior to getting the
>> > binary
>> > data?  If so I'm not seeing it sent back.
>>
>> Yes. Until you echo "EARTHA" back to them, they don't switch to Zodiac,
>> unless
>> 1) you have a modded unit. there was a hack going around to solder the
>> unit's TX to its RX so it would tell itself "EARTHA" and just activate
>> or
>> 2) a late rev of the hardware changed it. I never found one if so.
>>
>> Here's the thing: the IO: logs are on gpsd_write. If there is a direct
>> call to write() to the fd that bypasses that, gpsd's logging won't log
>> it.
>> strace would be the only sure way of seeing if it's written back. (
>> sudo strace -o /tmp/out /path/to/gpsd -Nn -D6 -F /var/run/gpsd.pid
>> /dev/cuau0; grep EARTHA /tmp/out|grep write\( )
>> You should see it exactly as many times as you get a selecting Zodiac
>> *after* a selecting Earthmate (which here is none).
>>
>> None of the things I see should be direct write() calls that matter.
>>
>> > Here's some -D6 output since I've not yet finished the new world stuff:
>> > -bash-2.05b$ sudo gpsd -Nn -D6 -F /var/run/gpsd.pid /dev/cuau0
>> > gpsd:SPIN: control socket /var/run/gpsd.pid is fd 3
>> >
>> > gpsd:PROG: control socket opened at /var/run/gpsd.pid
>> > gpsd:INFO: launching (Version 3.3)
>> > gpsd:IO: opening IPv4 socket
>> > gpsd:SPIN: passivesock_af() -> 4
>> > gpsd:IO: opening IPv6 socket
>> > gpsd:SPIN: passivesock_af() -> 5
>> >
>> > gpsd:INFO: listening on port 2947
>> > gpsd:PROG: NTPD shmat(65536,0,0) succeeded, segment 0
>> > gpsd:PROG: NTPD shmat(65537,0,0) succeeded, segment 1
>> > gpsd:PROG: NTPD shmat(65538,0,0) succeeded, segment 2
>> > gpsd:PROG: NTPD shmat(65539,0,0) succeeded, segment 3
>> > gpsd:PROG: shmat() succeeded, segment 65540
>> > gpsd:PROG: shared-segment creation succeeded,
>> > gpsd:INFO: NTPD ntpd_link_activate: 1
>> > gpsd:INFO: stashing device /dev/cuau0 at slot 0
>> >
>> > gpsd:PROG: no /etc/gpsd/device-hook present, skipped running ACTIVATE
>> > hook
>> > gpsd:INFO: opening GPS data source type 2 at '/dev/cuau0'
>> >
>> > gpsd:INFO: speed 9600, 8N1
>> > gpsd:IO: => GPS: $PASHQ,RID*28\x0d\x0a
>> > gpsd:IO: => GPS: @F0.3=1*67\x0d\x0a
>> > gpsd:IO: => GPS: @F2.2=1*64\x0d\x0a
>> > gpsd:IO: writing oncore control type Cj
>> > gpsd:IO: => GPS: @@Cj)\x0d\x0aRID*28\x0d\x0a
>> > gpsd:SPIN: open(/dev/cuau0) -> 6 in gpsd_serial_open()
>> >
>> > gpsd:PROG: Probing "Garmin USB binary" driver...
>> > gpsd:PROG: Probe not found "Garmin USB binary" driver...
>> > gpsd:PROG: Probing "GeoStar binary" driver...
>> > gpsd:IO: Sent GeoStar packet id 0xc1
>> > gpsd:IO: => GPS: 5053474700c100010000000050924746
>> >
>> > gpsd:PROG: Probe not found "GeoStar binary" driver...
>> > gpsd:PROG: Probing "Trimble TSIP" driver...
>> > gpsd:INFO: speed 9600, 8O1
>> > gpsd:IO: => GPS: $PASHQ,RID*28\x0d\x0a
>> > gpsd:IO: => GPS: @F0.3=1*67\x0d\x0a
>> > gpsd:IO: => GPS: @F2.2=1*64\x0d\x0a
>> > gpsd:IO: writing oncore control type Cj
>> > gpsd:IO: => GPS: @@Cj)\x0d\x0aRID*28\x0d\x0a
>> >
>> > gpsd:INFO: speed 9600, 8N1
>> > gpsd:IO: => GPS: $PASHQ,RID*28\x0d\x0a
>> > gpsd:IO: => GPS: @F0.3=1*67\x0d\x0a
>> > gpsd:IO: => GPS: @F2.2=1*64\x0d\x0a
>> > gpsd:IO: writing oncore control type Cj
>> > gpsd:IO: => GPS: @@Cj)\x0d\x0aRID*28\x0d\x0a
>> > gpsd:PROG: Probe not found "Trimble TSIP" driver...
>> >
>> > gpsd:PROG: no probe matched...
>> > gpsd:INFO: gpsd_activate(): activated GPS (fd 6)
>> > gpsd:INFO: device /dev/cuau0 activated
>> >
>> > gpsd:PROG: changing to group 68
>> > gpsd:INFO: running with effective group ID 68
>> > gpsd:INFO: running with effective user ID 65534
>> > gpsd:INFO: startup at 2012-01-10T03:14:26.000Z (1326165266)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.284671 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.293019 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.301378 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.309732 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.318090 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.326452 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.334811 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.343166 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.351524 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.359886 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.368244 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.376600 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.384957 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.393321 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.402094 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> >
>> > gpsd:PROG: switch_driver(Zodiac binary) called...
>> > gpsd:PROG: selecting Zodiac binary driver...
>> > gpsd:INFO: /dev/cuau0 identified as type Zodiac binary (0.744743 sec @
>> > 9600bps)
>> >
>> > gpsd:DATA: 1011: subtype=01.98 mask={DEVICEID}
>> > gpsd:DATA: packet from /dev/cuau0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> > gpsd:SPIN: packet_get() fd 6 -> 0 (35)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.410458 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.418817 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.427171 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.435528 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.443891 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.452248 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.460609 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.468964 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.477323 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.485684 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.494045 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.502396 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.510761 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.519117 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> >
>> > gpsd:DATA: 1000: time=867542386.00 lat=32.67 lon=-83.70 alt=136.46
>> > track=0.00 speed=0.00 climb=0.00 mode=1 status=0
>> > gpsd:DATA: packet from /dev/cuau0 with
>> >
>> > {ONLINE|TIME|LATLON|ALTITUDE|SPEED|TRACK|CLIMB|STATUS|MODE|PACKET|CLEAR|REPORT|PPSTIME}
>> > gpsd:SPIN: packet_get() fd 6 -> 0 (35)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165267.527447 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 4 (0)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165268.288004 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> >
>> > gpsd:PROG: switch_driver(Generic NMEA) called...
>> > gpsd:PROG: selecting Generic NMEA driver...
>> > gpsd:PROG: => Probing for FV-18
>> > gpsd:IO: => GPS: $PFEC,GPint*58\x0d\x0a
>> > gpsd:IO: <= GPS: EARTHA
>> >
>> > gpsd:WARN: unknown sentence: "EARTHA"
>> > gpsd:PROG: found trigger string EARTHA.
>> > gpsd:PROG: switch_driver(Delorme EarthMate (pre-2003, Zodiac chipset))
>> > called...
>> > gpsd:PROG: selecting Delorme EarthMate (pre-2003, Zodiac chipset)
>> > driver...
>> > gpsd:DATA: packet from /dev/cuau0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> > gpsd:SPIN: packet_get() fd 6 -> 0 (35)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165269.288005 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> >
>> > gpsd:PROG: switch_driver(Generic NMEA) called...
>> > gpsd:PROG: selecting Generic NMEA driver...
>> > gpsd:PROG: => Probing for Trimble Copernicus
>> > gpsd:IO: => GPS: $PTNLSNM,0139,01*5C\x0d\x0a
>> > gpsd:IO: <= GPS: EARTHA
>> >
>> > gpsd:WARN: unknown sentence: "EARTHA"
>> > gpsd:PROG: found trigger string EARTHA.
>> > gpsd:PROG: switch_driver(Delorme EarthMate (pre-2003, Zodiac chipset))
>> > called...
>> > gpsd:PROG: selecting Delorme EarthMate (pre-2003, Zodiac chipset)
>> > driver...
>> > gpsd:DATA: packet from /dev/cuau0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> > gpsd:SPIN: packet_get() fd 6 -> 0 (35)
>> > gpsd:SPIN: select() {3 4 5 6} -> { 6 } at 1326165270.282566 (errno 0)
>> > gpsd:SPIN: packet_get() fd 6 -> 8 (0)
>> >
>> > gpsd:PROG: switch_driver(Generic NMEA) called...
>> > gpsd:PROG: selecting Generic NMEA driver...
>> > gpsd:PROG: => Probing for Evermore
>> > gpsd:IO: => GPS: 1002128e7f0101000101010001000000000000131003
>> > gpsd:IO: <= GPS: EARTHA
>> >
>> > gpsd:WARN: unknown sentence: "EARTHA"
>> > gpsd:PROG: found trigger string EARTHA.
>> > gpsd:PROG: selecting Delorme EarthMate (pre-2003, Zodiac chipset)
>> > driver...
>> > gpsd:DATA: packet from /dev/cuau0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> > gpsd:SPIN: packet_get() fd 6 -> 0 (35)
>> > ^Cgpsd:WARN: received terminating signal 2.
>> > gpsd:INFO: closing GPS=/dev/cuau0 (6)
>> > gpsd:SPIN: close(6) in gpsd_close(/dev/cuau0)
>> > gpsd:PROG: no /etc/gpsd/device-hook present, skipped running DEACTIVATE
>> > hook
>> > gpsd:WARN: exiting.
>> >
>> > -Scott
>> >
>> >
>> > On Mon, Jan 9, 2012 at 8:43 PM, Derrick Brashear <address@hidden>
>> > wrote:
>> >>
>> >> On Mon, Jan 9, 2012 at 7:25 PM, Eric S. Raymond <address@hidden>
>> >> wrote:
>> >> > Scott Nolde <address@hidden>:
>> >> >> gpsd:PROG: selecting Generic NMEA driver...
>> >> >> gpsd:PROG: => Probing for FV-18
>> >> >> gpsd:WARN: unknown sentence: "EARTHA"
>> >> >> gpsd:PROG: found trigger string EARTHA.
>> >> >> gpsd:PROG: switch_driver(Delorme EarthMate (pre-2003, Zodiac
>> >> >> chipset))
>> >> >> called...
>> >> >> The Earthmate reliably worked before the 3.x change.
>> >> >
>> >> > Yeah.  It's switching drivers all right, so the recognizer is
>> >> > working...
>> >> > but it's not staying locked on. I can't tell why from the output.
>> >> >
>> >> > Unfortunately, the old Earthmate is one of a handful of devices we
>> >> > support that cannot be simulated with a canned test load (that's due
>> >> > to the EARTHA handshake).
>> >>
>> >> so your "test load" file is a pipe which has at the other end a perl
>> >> script. But I'm getting ahead of myself.
>> >>
>> >> > If it were simulable, the change that broke it would not have gotten
>> >> > past our regression tests.  As it is, the only way to isolate the
>> >> > fault is to test with live hardware.
>> >>
>> >> I doubt it. Sadly my Earthmate is dead. It could probably be
>> >> recovered, but again, I'm ahead of myself.
>> >>
>> >>
>> >> gpsd:PROG: found trigger string EARTHA.
>> >> gpsd:PROG: switch_driver(Delorme EarthMate (pre-2003, Zodiac chipset))
>> >> called...
>> >>
>> >> gpsd:PROG: selecting Delorme EarthMate (pre-2003, Zodiac chipset)
>> >> driver...
>> >>
>> >> gpsd:DATA: packet from /dev/cuad0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> >> gpsd:PROG: device 0 (fd=7, path /dev/cuad0) already active.
>> >> gpsd:PROG: Changed mask: {ONLINE|DEVICEID|PACKET|DRIVER} with reliable
>> >> cycle detection
>> >>
>> >>
>> >> gpsd:PROG: switch_driver(Generic NMEA) called..
>> >>
>> >> so when you get "selecting Delorme EarthMate", the loss would seem to
>> >> be immediate.
>> >>
>> >> static void earthmate_event_hook(struct gps_device_t *session, event_t
>> >> event)
>> >> contains:
>> >>    if (event == event_identified) {
>> >>        (void)gpsd_write(session, "EARTHA\r\n", 8);
>> >>        (void)usleep(10000);
>> >>        (void)gpsd_switch_driver(session, "Zodiac Binary");
>> >>    }
>> >>
>> >> which would tell you something interesting:
>> >>    gpsd_report(LOG_PROG, "switch_driver(%s) called...\n", type_name);
>> >>
>> >> But we never see a switch to Zodiac.
>> >>
>> >> So you don't need him. You don't even need a perl script. Your test
>> >> input is a file containing a bunch of
>> >> EARTHA
>> >> strings. Until you see "selecting Zodiac Binary", he's not going to be
>> >> happy regardless.
>> >>
>> >>
>> >> Given in order to get there you would have had to have seen an
>> >> accepted packet first:
>> >>        gpsd_report(LOG_RAW + 3, "Accepted packet on %s.\n",
>> >>                    session->gpsdata.dev.path);
>> >> which is gpsd_poll which is at the start of gpsd's event loop, but the
>> >> gpsd:DATA: packet from /dev/cuad0 with {ONLINE|DEVICEID|PACKET|DRIVER}
>> >> call is further down in that loop, something between that and the
>> >> completion of that loop is the presumably the problem.
>> >>
>> >>
>> >> --
>> >> Derrick
>> >> the guy that wrote the Zodiac support
>> >
>> >
>>
>>
>>
>> --
>> Derrick
>
>



-- 
Derrick



reply via email to

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