openems icon indicating copy to clipboard operation
openems copied to clipboard

Add CAN bridge using Linux SocketCAN for Kunbus Connect S, Connect+

Open clehne opened this issue 2 years ago • 12 comments

Add a CAN bridge with a JNI implementation for Linux Kernels V4 and V5. The implementation should work on every Linux system with enabled CAN Socket API. IT is tested and well used on

  • Kunbus Connect+ (Linux Kernel V4)
  • Kunbus Connect S (Linux Kernel V5)

You can easily map CAN data from single CAN frames to OpenEMS channel. It is used almost like the Modbus Bridge. Unfortunately now, I can not provide any driver bundle which uses the CAN interface.

clehne avatar Jul 31 '23 12:07 clehne

Code Coverage

github-actions[bot] avatar Jul 31 '23 13:07 github-actions[bot]

Please see my additional comments here: https://community.openems.io/t/new-openems-can-bridge/1815

clehne avatar Aug 01 '23 06:08 clehne

Let's discuss it on the community!

hydroid7 avatar Aug 06 '23 17:08 hydroid7

@clehne do you have any idea why the CI build does not pass?

hydroid7 avatar Nov 27 '23 08:11 hydroid7

At the moment the binary is compiled for x86_64. I think we also should include the compiled binary for ARM.

hydroid7 avatar Nov 27 '23 13:11 hydroid7

Code Coverage

github-actions[bot] avatar Nov 27 '23 14:11 github-actions[bot]

@clehne do you have any idea why the CI build does not pass?

Hi @hydroid7, thanks for your hard work on this! I have rebased the PR on the latest development version. It turns out that the MetaTaskManager was still missing. This was a component needed for Modbus TCP Bridge and I am unsure if we should check it in again (as a common file). Therefore I made it part of the edge.bridge.can.common bundle. Unfortunately right now we do not support customers with a need for CAN. Will see if we can find a way to test it and to provide an ARM binary.

clehne avatar Nov 27 '23 14:11 clehne

You're welcome and thank you for the fix. 👍

I think will do the change, compile for ARM and approve this PR. The library is already usable for x86_64 and SocketCAN should be the same on the RPI too.

hydroid7 avatar Nov 27 '23 15:11 hydroid7

Code Coverage

github-actions[bot] avatar Jan 04 '24 13:01 github-actions[bot]

I'll test this on our device, @clehne can you also do a short test to ensure that this works as expected?

hydroid7 avatar Jan 04 '24 13:01 hydroid7

Tested on real device.

hydroid7 avatar Jan 24 '24 14:01 hydroid7

Code Coverage

github-actions[bot] avatar Jan 24 '24 14:01 github-actions[bot]

This PR has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar Sep 19 '25 20:09 github-actions[bot]

Closing this PR due to inactivity.

github-actions[bot] avatar Oct 05 '25 02:10 github-actions[bot]