« Return to Thread: GPSCAT vs. GPSD vs. LIBGPS (LIBGPSMM) (Problems)

Re: GPSCAT vs. GPSD vs. LIBGPS (LIBGPSMM) (Problems)

by Chris Kuethe :: Rate this Message:

Reply to Author | View in Thread

On 4/5/07, Mark Easton <mark.easton@...> wrote:
> But, wiith GPSD I run it as follows:
>
> gpsd -N -n -D 2 /dev/ttyUSB0
>
> but it keeps producing the line :
>
> ...unknown sentence: "$PGRMM, WGS 84*06\x0d\x0a" and none of the nice stuff
> that GPSCat produces. So, why is GPSCAT working fine and not GPSD? Or is
> this correct operation??

Understand what the "-D2" option does ... it turns on an elevated
level of debugging. With it, gpsd becomes much more willing to
disclose its internal state. Second, have a look at where that unknown
sentence message comes from. You'll see there are about a half dozen
NMEA sentences that we actually care about and $PGRMM is not one of
them. Generally these are silently ignored, unless you run with
elevated debugging. Then we print a message that this sentence was
ignored.

Once gpsd is processing your device, you can connect to it with cgps,
xgps or gpspipe to see the processed results.

> Ok so this is the main issue as I want to write an application in C++. In my
> app I am using lbgpsmm/libgps. There I do an open("localhost",
> "/dev/ttyUSB0") ... but it just keeps returning "Error opening gpsd". So,
> what can possibly be wrong there?

Port is TCP port, not serial port... magic number 2947. Once connected
to the daemon, you can select a specific device with the F command, if
you have multiple devices connected.

> I tried to use the set_callback function but that just hangs and seems to do
> nothing. I dont get past that line in the code. Any ideas?

Possibly fallout from the previous. I've not used the C++ stuff ...
here's a simple test program someone else wrote:

http://marc.info/?l=gpsd-users&m=117483583018926&w=2

CK

--
GDB has a 'break' feature; why doesn't it have 'fix' too?
_______________________________________________
Gpsd-users mailing list
Gpsd-users@...
https://lists.berlios.de/mailman/listinfo/gpsd-users

 « Return to Thread: GPSCAT vs. GPSD vs. LIBGPS (LIBGPSMM) (Problems)