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

View: New views
5 Messages — Rating Filter:   Alert me  

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

by Mark Easton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using GPSD 2.3.4. I am on a Ubuntu6.10  laptop and using an ATEN RS232 to USB cabel to talk to my Gamin GPS 17 receiver.

Problem 1
-------------

With GPSCAT I can run it as follows and it produces a lovely flow for NMEA sentences from my Garmin GPS 17.

gpscat -s4800N1 /dev/ttyUSB0

So all good so far.

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??


Problem 2
--------------

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?


Problem 3
------------

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?


Thanks in advance for your help.

Mark



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

by Mark Easton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

With respect to problem 2 - I have ensured that GPSD is not also running. i.e. I have even rebooted my laptop to ensure this is the case.


Mark Easton wrote:
...
Problem 2
--------------

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?

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

by Andy-68 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Mark Easton wrote:

> With respect to problem 2 - I have ensured that GPSD is not also running.
> i.e. I have even rebooted my laptop to ensure this is the case.
>
>
>
> Mark Easton wrote:
>> ...
>> Problem 2
>> --------------
>>
>> 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?

Hello there,
Whilst no expert on the subject, just have been using GPSD for a while
now and recently had success getting more help getting another setup to
work!

Anyway, for your C++ I may be mis-understanding your program, but surely
you should be opening localhost, 2946
As that is the port GPSD listens on for connections. Therefore:
GPSD is started at bootup and binds to the physical GPS
Your clients/applications then connect to GPSD on the tcp port 2946.

Your other query:

> ...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??

from what I understand means GPSD doesn't have the right info do decode
this line from your GPS. See the docs on the site about how most
manufacturers have slight differences in their interpretations of the
GPS protocols, etc.
Also, make sure you have the latest GPSD. This one tripped me up until
Chris kindly pointed me into the right direction.
Get the source and compile to make sure.


Hope that helps in some way, good luck!

--
Andy
e: andy @ thebmwz3.co.uk
e: andy @ broadcast-tech.co.uk

w: http://www.thebmwz3.co.uk
w: http://www.broadcast-tech.co.uk
_______________________________________________
Gpsd-users mailing list
Gpsd-users@...
https://lists.berlios.de/mailman/listinfo/gpsd-users

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

by Chris Kuethe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

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

by Mark Easton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ahhh, I completely misunderstood that! I has assumed that libgps actually starts up GPSD, ie does not open a connection to an already running GPSD.  Thank-you Andy and Chris! I will work on it today and see what progress I can make. For the record, these GPSD apps are amazing - good work!

Andy-68 wrote:
Anyway, for your C++ I may be mis-understanding your program, but surely
you should be opening localhost, 2946
As that is the port GPSD listens on for connections. Therefore:
GPSD is started at bootup and binds to the physical GPS
Your clients/applications then connect to GPSD on the tcp port 2946.