gpsd-users
[Top][All Lists]
Advanced

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

Re: Can't preserve the raw AIS message


From: Owen Mather
Subject: Re: Can't preserve the raw AIS message
Date: Thu, 1 Oct 2020 13:04:01 +0100

Hi Gary,

So the data before the !AIVDM is a TAG block as defined by NMEA 0183.
\s:A01-CS084,c:1600862415,t:LIVE*59\!AIVDM,1,1,,A,38;?cf10008aPTl8G3:P090L0P00,0*2F

(I’m not sure if you’ll be able to see the image below)
 
I ran the below so I so I can send data to Gpsd over 62209:
nc -l 62209 | gpsd -n -N /dev/stdin
 
Then I sent the following message:
echo '\s:A01-CS084,c:1600862415,t:LIVE*59\!AIVDM,1,1,,A,38;?cf10008aPTl8G3:P090L0P00,0*2F' | nc localhost 62209
 
whilst running:
gpspipe -D2 -R
 
Which gave me:
ubuntu@:~$ gpspipe -D2 -R
libgps: gps_sock_open(localhost, 2947)
libgps: netlib_connectsock() returns socket on fd 3
libgps: gps_stream() enable command: ?WATCH={"enable":true,"raw":2};
{"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_minor":12}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/stdin","activated":"2020-10-01T11:31:36.074Z","native":0,"bps":9600,"parity":"}]}
{"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":false,"timing":false,"split24":false,"pps":false}
!AIVDM,1,1,,A,38;?cf10008aPTl8G3:P090L0P00,0*2F
 
So I believe using -R is meant to give me the full raw, but this appears not the case.

When I say I want to preserve the part before AIVDM what I mean is that when the AIS message is decoded a json structure is created, and it would be useful to have that part before the AIVDM included in the JSON structure. It’s because \s:A01-CS084,c:1600862415,t:LIVE*59\ provides useful information such as source and time that I want to use with the decode message.

Thanks
Owen


On 24 Sep 2020, at 17:00, gpsd-users-request@nongnu.org wrote:

Send gpsd-users mailing list submissions to
gpsd-users@nongnu.org

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/gpsd-users
or, via email, send a message with subject or body 'help' to
gpsd-users-request@nongnu.org

You can reach the person managing the list at
gpsd-users-owner@nongnu.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gpsd-users digest..."


Today's Topics:

  1. Re: Can't preserve the raw AIS message (Gary E. Miller)
  2. Re: tcp device open error (Gary E. Miller)
  3. Re[2]: tcp device open error
     (Василий Пономаренко)


----------------------------------------------------------------------

Message: 1
Date: Wed, 23 Sep 2020 09:40:37 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-users@nongnu.org
Subject: Re: Can't preserve the raw AIS message
Message-ID: <20200923094037.090a682b@spidey.rellim.com>
Content-Type: text/plain; charset="utf-8"

Yo Owen!

On Wed, 23 Sep 2020 14:20:26 +0100
Owen Mather <opm24@btinternet.com> wrote:

I’m processing an AIS feed using Gpsd but I’m having trouble
preserving the raw data passed in.

OK.

I have an AIS messages as follows
\s:A01-SC084,c:1500862415,t:LIVE*59\!AIVDM,1,1,,A,38;?cf10008aPTl8G3:P090L0P00,0*2F

That does not look valid to me.

Using gpspipe I can correctly decode the message:
!AIVDM,1,1,,A,38;?cf10008aPTl8G3:P090L0P00,0*2F

Can you provide more details?  What version of gpsd?  What command line
for your gpsd?

But I want to preserve the data before the message:
\s:A01-SC084,c:1500862415,t:LIVE*59\

I'm unclear what you mean by "preserve".

When I run gpspipe -R which is meant to show the raw data, it only
shows the AIVDM messages and not the actual raw message that was sent
to gpsd.

That would be a bug.  Can you provide a sample of what you see?

Is there anyway to access the raw message alongside the decoded
version?

I don't know any way to easily get raw, and decoded, data from gpsd
right now.  People want the one or the other.  Might not be hard to add.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  Tel:+1 541 382 8588

   Veritas liberabit vos. -- Quid est veritas?
   "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200923/a4365847/attachment.sig>

------------------------------

Message: 2
Date: Wed, 23 Sep 2020 09:46:21 -0700
From: "Gary E. Miller" <gem@rellim.com>
To: gpsd-users@nongnu.org
Subject: Re: tcp device open error
Message-ID: <20200923094621.6ab1d2f3@spidey.rellim.com>
Content-Type: text/plain; charset="utf-8"

Yo Василий!

On Wed, 23 Sep 2020 15:36:55 +0300
Василий Пономаренко <basvas@mail.ru> wrote:

I am trying to enable gpsd auto start with the following parameters.

Looks like a systemd(umb) problem.  Someone that knows that will have
to help.

But it seems to me that the tcp URI is your "DEVICE".

However, I get this error message.

I can't read small dark red on black.  Text, not screen shots, are
preferred here.

If I do systemctl restart gpsd.service, the connection is successful. 

That sure makes it look like a systemd(umber) issue.

Hopefully someone that knows systemd(umbest) has an idea for you.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  Tel:+1 541 382 8588

   Veritas liberabit vos. -- Quid est veritas?
   "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200923/afb39f3c/attachment.sig>

------------------------------

Message: 3
Date: Thu, 24 Sep 2020 10:59:49 +0300
From: Василий Пономаренко  <basvas@mail.ru>
To: Gary E. Miller <gem@rellim.com>
Cc: gpsd-users@nongnu.org
Subject: Re[2]: tcp device open error
Message-ID: <1600934389.495120741@f572.i.mail.ru>
Content-Type: text/plain; charset="utf-8"


Hello again! Thank you for faster reply.
 
if config is:
/etc/default/gpsd
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="false"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="URI"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n -G tcp://192.168.178.61:10110"
 
 
Then erros is:
systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
   Loaded: loaded (/lib/systemd/system/gpsd.service; indirect; vendor preset: enabled)
   Active: active (running) since Thu 2020-09-24 09:06:32 MSK; 1min 28s ago
 Main PID: 614 (gpsd)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/gpsd.service
           └─614 /usr/sbin/gpsd -N -n -G tcp://192.168.178.61:10110 URI
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: device open of URI failed: No such file or directory - retrying read-only
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: read-only device open of URI failed: No such file or directory
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: initial GPS device URI open failed
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: TCP device open error can't connect to host/port pair.
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: tcp://192.168.178.61:10110: device activation failed.
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: tcp://192.168.178.61:10110: activation failed, freeing device
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: device open of URI failed: No such file or directory - retrying read-only
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: read-only device open of URI failed: No such file or directory
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: URI: device activation failed.
сен 24 09:06:33 arm4 gpsd[614]: gpsd:ERROR: URI: activation failed, freeing device
 
 
I think, that URI is not device.
 
Please tell me about:
*  Is there a way to make a forced reconnection to the tcp source (it is unstable and the network is half-dead)?
*  I need to call the gpkg reconfigure gpsd command every time I manually edit the /etc/default/gpsd file ?

 
 
Среда, 23 сентября 2020, 19:49 +03:00 от Gary E. Miller <gem@rellim.com>:
 
Yo Василий!

On Wed, 23 Sep 2020 15:36:55 +0300
Василий Пономаренко < basvas@mail.ru > wrote:

I am trying to enable gpsd auto start with the following parameters.

Looks like a systemd(umb) problem. Someone that knows that will have
to help.

But it seems to me that the tcp URI is your "DEVICE".

However, I get this error message.

I can't read small dark red on black. Text, not screen shots, are
preferred here.

If I do systemctl restart gpsd.service, the connection is successful. 

That sure makes it look like a systemd(umber) issue.

Hopefully someone that knows systemd(umbest) has an idea for you.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com Tel: +1 541 382 8588

Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
 
 
 
--
Василий Пономаренко
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nongnu.org/archive/html/gpsd-users/attachments/20200924/e69481e4/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
gpsd-users mailing list
gpsd-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/gpsd-users


------------------------------

End of gpsd-users Digest, Vol 104, Issue 21
*******************************************


reply via email to

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