This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I "spoof" a PGN to display data from a non-supported PGN?
#1
Hi,

I have a RasPi4 w/ PICAN-M HAT in my boat, and I want to use SignalK to translate the VHF channel number from my Lowrance Link-9 VHF (PGN 129799) to something that can be displayed on my Raymarine Axiom MFD by the helm.

I was thinking of "spoofing" Tank data from a nonexistent tank using PGN 127505 (?), which can be displayed by the Axiom, and just label it "VHF Chan" at the display side. 

Can I use the "signalk-derived-data" plugin to accomplish this? If yes, an example would come in handy.. I have searched for documentation to no avail.

My coding skills are rusty and out of date, so I hope to accomplish this using existing plugins and tools, avoiding the steep learning curve involved in mastering a new coding language, environment and tool set.

Any help will be much appreciated, sorry for my ignorance.
Reply
#2
you could at least test it using derived data and just map the signalk message for the VHF channel to a false message for a tank or something else that is supported by the Axiom, sounds like it should work and should be relatively easy to set up. Your false tank message may show up as a % as it is meant to be a tank level, so you may want to think about a variable that has no units - I cant think what at the moment!
Reply
#3
I had a look in  the data browser, and found the PGN129799 as an unknown PGN under Lowrance Link-9.  
It seems that the SignalK translation of PGN129799 is wrong, in that it takes Channel Number as an 8 Bit integer and displays it as 57 regardless of what channel is selected, when it should be interpreted as a 6 digit ASCII field.
   
I found the "signalk-generic-pgn-parser" plugin, installed it, and set up a rule for assigning PGN129799 to sensor.vhf, and they are displayed in the data browser, but with ChannelNumber as 57.
   
I hooked up my Actisense NGT-1 and it reads the PGN129799 fine, showing the ChannelNumber correctly.
   

What to do?
Reply
#4
SignaK uses Canboat.js and Canbot.js directs you to

https://github.com/canboat/canboat/blob/...yzer/pgn.h

in pgn.h it looks like it is defined as 'UINT8' which would be limited, I think
Reply
#5
(2024-04-15, 08:12 PM)Techstyle Wrote: SignaK uses Canboat.js and Canbot.js directs you to

https://github.com/canboat/canboat/blob/...yzer/pgn.h

in pgn.h it looks like it is defined as 'UINT8' which would be limited, I think

Looks like the Channel Number should be 6 ASCII chars. I have logged an Issue with canboat.

(2024-04-15, 09:02 PM)BaktusBror Wrote:
(2024-04-15, 08:12 PM)Techstyle Wrote: SignaK uses Canboat.js and Canbot.js directs you to

https://github.com/canboat/canboat/blob/...yzer/pgn.h

in pgn.h it looks like it is defined as 'UINT8' which would be limited, I think

Looks like the Channel Number should be 6 ASCII chars. I have logged an Issue with canboat.

.....aaand Kees has already committed a fix. That was quick!
How long do you think it will take for this fix to trickle through to SignalK?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)