-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different behaviours with canboat and canboatjs and signalk-n2kais-to-nmea0183 #1709
Comments
I'm not sure why canboatjs stops for you. It is used by most sk installs, including mine, and it never stops working. In general, canboatjs is less active because it is stable and the pgn definitions come from canboat and the canboatjs repository does even get updated when those change. The n2kais plugin should work with canboat, I can look into that. I would be very interested in why canboatjs stops working for you. I have seen this before and it was resolved by the user, sadly I don't remember what fixed it and the record of that conversation is gone... |
Do you see anything notable, like errors, in server log when canboatjs stops? |
Apr 02 22:30:49 signalk-server running at 0.0.0.0:[object Object] That is all I can find that looks strange but I assume it has nothing todo with it. |
can you try this:
This will just dump everything from vecan0 using canboatjs. Hopefully we'll see an error there... |
On the n2kais plugin issue. Do you actually see any AIS data in the Data Browser when using canboat? |
Yes AIS and paths are fine but are not dumped out of the plugin (AIS). |
Runs flawlessly |
Found something Apr 02 23:00:50 TypeError: Cannot read properties of undefined (reading 'toString') at N2kMapper. (/usr/lib/node_modules/signalk-server/node_modules/@signalk/streams/n2k-signalk.js:57:26) at N2kMapper.emit (node:events:517:28) at N2kMapper.toDelta (/usr/lib/node_modules/signalk-server/node_modules/@signalk/n2k-signalk/n2kMapper.js:149:14) at ToSignalK._transform (/usr/lib/node_modules/signalk-server/node_modules/@signalk/streams/n2k-signalk.js:113:34) at Transform._write (node:internal/streams/transform:175:8) at writeOrBuffer (node:internal/streams/writable:392:12) at _write (node:internal/streams/writable:333:10) at Writable.write (node:internal/streams/writable:337:10) at N2KAnalyzer.ondata (node:internal/streams/readable:809:22) at N2KAnalyzer.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at Interface. (/usr/lib/node_modules/signalk-server/node_modules/@signalk/streams/n2kAnalyzer.js:52:12) at Interface.emit (node:events:517:28) at [_onLine] [as _onLine] (node:internal/readline/interface:423:12) canboat bin |
That's with canboatjs? That stack trace does not make sense to me... @tkurki ? |
No, as written beneath, canboat bin. |
At which point in the SK code you get the stream out of the canboat bin version into the parser? |
Not stdin but Node streams, see https://github.com/SignalK/signalk-server/tree/master/packages/streams |
Some more Info. If I select the canboat bin the N2KAnalyzerOut event disappears after restart. That is why the AIS plugin is never called. The event is not shown as a selectable option within the server log list either. So this rules out the AIS plugin to be faulty. |
Maybe it has to do with the raw n2k can messages? Found some more:
{"version":"5.0.3","units":"si","showLookupValues":false} is the part that throws the exception within the mentioned stacktrace I mentioned earlier. It is a message coming from the analyzer. As I have pulled the latest canboat bins it may be too new? |
My system is a RPI3 (Debian 12) with a vcan0 interface getting data via cannelloni and running Signal K Server version 2.6.2.
If I use canboatjs for a data connection the data comes in only for about one second and then stalls. During this first second AIS data is sent as NMEA0183 via port 10110 (signalk-n2kais-to-nmea0183).
If I switch the data connection to use canboat binaries all data comes in fine and continuously to SK but with the exception that no AIS data is sent via NMEA0813 then.
I cannot really distinguish if this is an issue with the plugin or the canboat implementation or SK. But as the plugin is capable of building NMEA0183 sentences I assume it is how SK uses the canboat(js) interfaces.
I am heading for canboat instead of canboatjs because according to github canboat seems to be more active.
The text was updated successfully, but these errors were encountered: