question

kurtinge avatar image
kurtinge asked

NMEA 2000-out - Venus os running on Raspberry Pi

Hi guys!

As this feature now have been improved in the later versions I was wondered how this can be accomplished when using the Raspberry Pi. As far as I understand this is supported in devices with VE.Can port together with the VE.Can -> NMEA2000 cable. Is there any easy way to configure this port on the Raspeberry? Can the ethernet port be used for this purpose?

NMEA 2000 - N2K
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

6 Answers
Stefanie (Victron Energy Staff) avatar image
Stefanie (Victron Energy Staff) answered ·

Hi @kurtinge,

you'll need a CAN interface for that, either as a HAT or as a CAN-USB interface. Google is your good friend in looking up all the different devices. They are too many to be listed here.

Together with Venus OS large (incl. Signal K and Node-RED) they are more or less plug'n play.

The PI's ethernet port cannot be used for that.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kurtinge avatar image
kurtinge answered ·

In my understanding I guess the easiest way is to buy a CAN-USB to RJ45 together with Venus OS large with Signal K and Node-RED. Just plug the ethernet into the LAN where the MFD is hocked up?
I am correct?

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

I'm sorry, but I'm not sure what exactly you're trying to achieve.

Why do you want a CAN-USB to RJ45? The CAN-USB interface usually comes with a data cable or you need to make one yourself. One end goes to the Data-H and Data-L pins from your CAN-USB interface, the other end goes to a Micro-C M12 (or STNG in case you have a Raymarine STNG network) male or female connector, wires connecting to Data-L and Data-H pins, and will then connect directly to your N2K network. No RJ45 involved unless you need something specific.

1 Like 1 ·
kurtinge avatar image kurtinge Stefanie (Victron Energy Staff) ♦♦ commented ·
My MFD (B&G) can receive NMEA over Ethernet as far as I can understand. I want to see battery status on the MFD. The MFD is hooked up to my boat’s LAN and I was wondering if I can make the Rpi to send NMEA to the LAN
0 Likes 0 ·
Show more comments
vassilis-bourdakis avatar image
vassilis-bourdakis answered ·

kurtinge,


have a look at this wiki:

https://github.com/victronenergy/venus/wiki/RaspberryPi-CAN-Interfaces

has all the supported hats and a couple of usb solutions.

Then you install kwindrem excellent set of tools SetupHelper, GuiMods, VeCanSetup and you're done.

I'm using Waveshare (the cheapest hat I could find) as well as PEAK CAN usb.

Waveshare do a dual CAN HAT as well if you plan to expand with BMS etc.

V.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

octafish avatar image
octafish answered ·

Hi,

I’m also trying to get my GX device on the NMEA2000 network.

I tried installing a TouCAN Marine (by Rusoku) CAN-to-USB adapter but it did not work “plug ‘n play” on my Raspberry Pi 3b+ running Venus OS 3.50~13

I contacted the developers and they suggested building a new Venus OS (Large?) image with the suggested drivers, then running a command to operate the CAN interface at the 250kbits rate necessary for NMEA2000.

Has anybody else successfully linked a TouCAN to the Venus system? Is Signal K going to be necessary?


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Gediminas Simanskis avatar image
Gediminas Simanskis answered ·

I recompiled 3.50 version with TouCAN kernel driver support."can0" interface appears now.

can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


The problem is that it seems that all eth, wifi, bluetooth interfaces are disabled. How to enable them through the console?

I got "A security profile has not been selected..." when trying to connect via an ethernet.
External HDMI monitor doesn't show GUI after headless file removing.


5 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

octafish avatar image octafish commented ·

Thanks for following up on this Gedi!

Does it connect to USB?

0 Likes 0 ·
Gediminas Simanskis avatar image Gediminas Simanskis octafish commented ·

Yes.

I added TouCAN ipk driver to Rusoku web download page.
For RaspberryPi4:
https://www.rusoku.com/storage/app/media/drivers/Linux/kernel-module-toucan-5.10.110-rpi-venus-4_5.10.110-rpi-venus-4-r0_raspberrypi4.ipk.tar


0 Likes 0 ·
octafish avatar image octafish Gediminas Simanskis commented ·

Can’t wait to get that Raspberry 3b+ driver… thank you ;)

0 Likes 0 ·
Gediminas Simanskis avatar image Gediminas Simanskis octafish commented ·

Done.
For Raspberrypi2 and Raspberrypi3:

https://www.rusoku.com/storage/app/media/drivers/Linux/kernel-module-toucan-5.10.110-rpi-venus-4_5.10.110-rpi-venus-4-r0_raspberrypi2.ipk.tar

0 Likes 0 ·
Gediminas Simanskis avatar image Gediminas Simanskis Gediminas Simanskis commented ·
0 Likes 0 ·
Gediminas Simanskis avatar image
Gediminas Simanskis answered ·

I prepared the kernel module Venus OS ipk package for a Rusoku TouCAN can bus module.
https://www.rusoku.com/downloads/kernel-module-toucan-5.10.110-rpi-venus-4_5.10.110-rpi-venus-4-r0_raspberrypi4.ipk

Kernel driver source code:
https://github.com/rusoku/TouCAN-SocketCAN

Tested with Raspberrypi4 B and Venus OS v3.41, v4.50
SignalK finds the kernel driver and can0 interface and can work with it.

Installation from a console:

  1. /opt/swupdate-scripts/resize2fs.sh
  2. opkg install https://www.rusoku.com/downloads/kernel-module-toucan-5.10.110-rpi-venus-4_5.10.110-rpi-venus-4-r0_raspberrypi4.ipk
  3. ifconfig -a

A can0 interface should appear.

can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic