Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-11-2018, 22:11   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,837
Twocan - a new Plugin


Twocan
Plugin for Nmea2000 integration

Authored by Steven [Stevead]

Inspired by Canboat and Openskipper, frustrated by those who claim “OpenCPN is not a hardware experimenter's platform”, and desiring to give back something to the OpenCPN community.

TwoCan
An OpenCPN Plugin for integrating OpenCPN with NMEA2000® networks. It enables some NMEA2000® data to be directly integrated with OpenCPN by converting some NMEA2000® messages to NMEA 183 sentences and inserting them into the OpenCPN data stream.

It uses a “plug-in” driver model to support different CAN bus hardware adapters on Windows. Three hardware adapters are currently supported

The documentation is found in the Dev Manual > Beta Plugins until beta testing is completed. Please try it out.
__________________

rgleason is offline   Reply With Quote
Old 07-11-2018, 13:13   #2
Registered User

Join Date: Mar 2013
Location: Santa Cruz
Boat: 1975 Isander 28
Posts: 66
Re: Twocan - a new Plugin

Kudos for you doing this. I am currently making a specialized USB keyboard/mouse for opencpn and I just added v-serial to it, and put a bunch of nmea parsing into it, so it can parse nmea183. It can also send nmea sentences or any other usb serial data to opencpn. I think if you integrate your nmea2000 to nmea183 conversion code into my firmware we can have an nmea2000 to nmae183 bridge for just a few $$$. Just a thought anyway. While you are working on this you should think about keeping the actual bridging logic as clean as possible because it might have uses outside opencpn plugins.
__________________

skkeith is offline   Reply With Quote
Old 09-11-2018, 05:50   #3
Registered User

Join Date: Mar 2011
Posts: 61
Re: Twocan - a new Plugin

Thanks very much Rick for announcing this plug-in.

I'm currently adding conversion of NMEA 2000 AIS & DSC PGN's to the plug-in, so that should complete most of the important navigation data. I then hope to fork the code (once I learn the semantics of Git & Github) and add the Linux/Socket CAN support.

I appreciate that few OpenCPN users possess the PC hardware adapters to connect to their NMEA2000 networks so I expect that there is little if any test coverage.

However if any OpenCPN users with other NMEA 2000 gateways (such as Actisense, Yacht Devices) or modern Multi Function Displays from Garmin or Navionics (Simrad, B & G) can capture NMEA2000 logs and forward those to twocanplugin@hotmail.com then that will provide more data with which to validate the conversions. This is especially important for AIS & DSC as I personally have yet to see live AIS & DSC data on a NMEA2000 network !

Thanks very much,

Steve
stevead is offline   Reply With Quote
Old 23-03-2019, 05:23   #4
Registered User

Join Date: Mar 2011
Posts: 61
Re: Twocan - a new Plugin

Announcing TwoCan Version 1.3.

This new version introduces support for Linux and is now available for download from github. Documentation has also been updated on the developer wiki

For Linux any CAN bus adapter that supports the SocketCAN interface "should" work. It has been tested with native interfaces (eg. can0), serial interfaces (eg. slcan0) and virtual interfaces (eg. vcan0).

Two hardware adapters have been successfully tested under Linux (Raspbian):
1. Canable Cantact
2. Waveshare CAN Hat for Raspberry PI

Please note that this version has undergone very limited testing on a Rapberry Pi. (OK, it compiles with a few warnings & seems to work !)
stevead is offline   Reply With Quote
Old 18-05-2019, 13:19   #5
Registered User

Join Date: Mar 2011
Posts: 61
Re: Twocan - a new Plugin

Announcing TwoCan Version 1.4,

This new version introduces support for Active Mode, meaning that the TwoCan plugin now participates on the NMEA 2000 network, claiming an address, sending and receiving product information, sending heartbeats and responding to a few NMEA 2000 requests.

Active Mode is supported on both Windows & Linux (including Raspberry Pi), Under Linux, as with the previous version, 1.3, any CAN bus adapter that supports the SocketCAN interface "should" work.

However under Windows, updated plugin drivers are required to support Active Mode and to date, only the Kvaser Leaflight plugin driver has been updated.

This new version is available for download from github. Documentation has also been updated on the developer wiki.
Attached Thumbnails
Click image for larger version

Name:	2019-04-29-133758_538x538_scrot.png
Views:	57
Size:	36.0 KB
ID:	192282   Click image for larger version

Name:	simrad-02.jpg
Views:	56
Size:	97.6 KB
ID:	192283  

stevead is offline   Reply With Quote
Old 19-05-2019, 08:00   #6
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 558
Re: Twocan - a new Plugin

Quote:
Originally Posted by stevead View Post
Announcing TwoCan Version 1.3.

This new version introduces support for Linux and is now available for download from github. Documentation has also been updated on the developer wiki

For Linux any CAN bus adapter that supports the SocketCAN interface "should" work. It has been tested with native interfaces (eg. can0), serial interfaces (eg. slcan0) and virtual interfaces (eg. vcan0).

Two hardware adapters have been successfully tested under Linux (Raspbian):
1. Canable Cantact
2. Waveshare CAN Hat for Raspberry PI

Please note that this version has undergone very limited testing on a Rapberry Pi. (OK, it compiles with a few warnings & seems to work !)
Hi Steveaid,


it allready works very well on a Raspberry Pi3B+, but on another way then with the Twocan.

Using a canable board with candlelight software. Using SignalK via Canboat. Then you can convert, with SignalK, NK2 to NMEA183 for use in OpenCPN via Kplex multipexer. You can combine several Talkers.

And also the reverse way of 183 to NK2.

And you can use the SignalK instrument sets.

Perhaps interesting for you to see how to combine this solution.

Regards,


Bram
verkerkbr is offline   Reply With Quote
Old 19-05-2019, 14:59   #7
Registered User

Join Date: Mar 2011
Posts: 61
Re: Twocan - a new Plugin

TwoCan is designed to be a simple plugin that enables NMEA2000 data to be directly integrated with OpenCPN.
TwoCan has a relatively simple installation procedure and supports both Windows & Linux (including Raspberry Pi).
Unlike Signal K, TwoCan has no other software dependencies such as Java, NodeJS, mdns/Bonjour or canboat.
While Signal K supports any Socket CAN interface under Linux, on Windows, Signal K only supports the Actisence NGT-1 USB gateway.
TwoCan similarly supports any Socket CAN interface under Linux and for Windows uses a plugin driver model that today supports three different CAN bus adapters including the inexpensive Canable adapter.
If you require Signal K support, then perhaps Signal K is the solution for you.
If you just want a simple solution for integrating NMEA2000 data into OpenCPN, then perhaps TwoCan is a better alternative.
This release of TwoCan provides the foundation for bi-directional NMEA 0183 and NMEA 2000 communication. In addition to my own personal requirements, I would be interested in gathering feedback to identify what conversions are of interest to other sailors to be considered for the next release.
stevead is offline   Reply With Quote
Old 23-05-2019, 11:13   #8
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 558
Re: Twocan - a new Plugin

Quote:
Originally Posted by stevead View Post
TwoCan is designed to be a simple plugin that enables NMEA2000 data to be directly integrated with OpenCPN.
TwoCan has a relatively simple installation procedure and supports both Windows & Linux (including Raspberry Pi).
Unlike Signal K, TwoCan has no other software dependencies such as Java, NodeJS, mdns/Bonjour or canboat.
While Signal K supports any Socket CAN interface under Linux, on Windows, Signal K only supports the Actisence NGT-1 USB gateway.
TwoCan similarly supports any Socket CAN interface under Linux and for Windows uses a plugin driver model that today supports three different CAN bus adapters including the inexpensive Canable adapter.
If you require Signal K support, then perhaps Signal K is the solution for you.
If you just want a simple solution for integrating NMEA2000 data into OpenCPN, then perhaps TwoCan is a better alternative.
This release of TwoCan provides the foundation for bi-directional NMEA 0183 and NMEA 2000 communication. In addition to my own personal requirements, I would be interested in gathering feedback to identify what conversions are of interest to other sailors to be considered for the next release.

SignalK supports:


Actisense NTG-1 (canboat)
Actisense NTG-1 (canboatjs)
Canbus (canboat)
Canbus (canboatjs)


Regards,


Bram
verkerkbr is offline   Reply With Quote
Old 24-05-2019, 03:45   #9
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 58
Re: Twocan - a new Plugin

I've installed TwoCan using Linux 16.04 LTS and the USBtin CAN interface board and all you need to know is well described on that manufacturers page (https://www.fischl.de/usbtin/). Sure it works on Windows as well.

Apart from a small configuration problem (my bad probably, 'RTFM' style) I now have NMEA2000-info OpenCPN.
Simple, easy, low cost and fully supported., no need to complicate things further.
/LennartG
LennartG is offline   Reply With Quote
Old 24-05-2019, 04:53   #10
Registered User

Join Date: May 2016
Location: Gothenburg, Sweden
Boat: Aphrodite 34
Posts: 12
Re: Twocan - a new Plugin

Does this or could it support NMEA 2000 RAW protocol?

Exampel below:

Messages sent from Device to PC have the following form:
hh:mm:ss.ddd D msgid b0 b1 b2 b3 b4 b5 b6 b7<CR><LF>

where:

• hh:mm:sss.ddd — time of message transmission or reception, ddd are milliseconds;
• D — direction of the message (‘R’ — from NMEA 2000 to application, ‘T’ — from application to NMEA 2000);
• msgid — 29-bit message identifier in hexadecimal format (contains NMEA 2000 PGN and other fields);
• b0..b7 — message data bytes (from 1 to 8) in hexadecimal format;
• <CR><LF> — end of line symbols (carriage return and line feed, decimal 13 and 10).

Example:

Code:
17:33:21.107 R 19F51323 01 2F 30 70 00 2F 30 70
17:33:21.108 R 19F51323 02 00 
17:33:21.141 R 09F80115 A0 7D A0 7D E6 18 C0 FB D5 
17:33:21.179 R 09FD0205 64 1E 64 1E 01 C8 F1 FA FF FFF
Used by Digital Yacht for example and is open source.
SYSkidbladner is offline   Reply With Quote
Old 24-05-2019, 06:07   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,837
Re: Twocan - a new Plugin

I'd like to understand how TwoCan_pi relates to
and have a schematic for these with respect to Opencpn. I don't think the average user understands what TwoCan actually does (or the other programs listed for that matter)...


This is a pretty interesting announcement Post #5
rgleason is offline   Reply With Quote
Old 24-05-2019, 10:51   #12
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 3,388
Re: Twocan - a new Plugin

Is there a Windows Installer for the TwoCAN plug-in available?
bcn is online now   Reply With Quote
Old 24-05-2019, 17:33   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,837
Re: Twocan - a new Plugin

Quote:
Originally Posted by bcn View Post
Is there a Windows Installer for the TwoCAN plug-in available?

Good question. I thought I had made one for ov42-48, but can't find it.
I will try to make one for ov50.
rgleason is offline   Reply With Quote
Old 24-05-2019, 18:37   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,837
Re: Twocan - a new Plugin

When compiling the drivers I get this error.
Stevead?


Quote:
Build FAILED.

"C:\Users\Rick\Documents\GitHub\TwoCanPluginDriver s\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Rick\Documents\GitHub\TwoCanPluginDriver s\build\Kvaser\kvaser.vcxproj" (default target) (9) ->
(ClCompile target) ->
C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \Kvaser\src\Kvaser.c(121): warning C4047: 'function' : 'LPCWSTR' differs
in levels of indirection from 'int' [C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \build\Kvaser\kvaser.vcxproj]
C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \Kvaser\src\Kvaser.c(121): warning C4024: 'CreateEventW' : different type
s for formal and actual parameter 4 [C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \build\Kvaser\kvaser.vcxproj]


"C:\Users\Rick\Documents\GitHub\TwoCanPluginDriver s\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\Rick\Documents\GitHub\TwoCanPluginDriver s\build\Kvaser\kvaser.vcxproj" (default target) (9) ->
(ClCompile target) ->
C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \Kvaser\src\Kvaser.c(121): error C2065: 'CONST_DATARX_EVENT' : undeclared
identifier [C:\Users\Rick\Documents\GitHub\TwoCanPluginDrivers \build\Kvaser\kvaser.vcxproj]

2 Warning(s)
1 Error(s)
rgleason is offline   Reply With Quote
Old 24-05-2019, 18:52   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,837
Re: Twocan - a new Plugin

I have compiled twocandrivers, but it failed,



I did find some dll's and placed them in the subdirectory directed.


Still get


Quote:
9:46:25 PM: TwoCan Settings, Driver Path: C:\Program Files (x86)\OpenCPN 4.8.8\plugins\twocan_pi\drivers\
9:46:25 PM: TwoCan Settings, driver folder not found
9:46:36 PM: TwoCan Plugin, Settings Saved
9:46:37 PM: Error: TwoCan Plugin, No driver selected. Device not startedd
__________________

rgleason is offline   Reply With Quote
Reply

Tags
plug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 05:40
Plugin development... How to receive chart objects in my plugin? dmartinez OpenCPN 6 04-08-2017 00:56
New History Plugin for OpenCPN boat_alexandra OpenCPN 11 04-10-2010 14:11



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 00:14.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.