Hi Matthias,
can you please add some documentation to the GitHub's README.md file, e.g.
- what is the plan (mainly your description below)
- how to build and load the module
- how to configure the IP/Port with 1 or 2 examples
- e.g. example how to create a CAN-over-UDP bridge between two IP hosts
- protocol description how the CAN frames are embedded into UDP/IP
It is hard to get all these necessary information which is needed to get
behind your idea from the code.
Thanks and best regards,
Oliver
On 04.07.24 19:40, Matthias Unterrainer wrote:
Hi Linux-CAN Community,
my name is Matthias and I recently developed a kernel module during my Bachelor's thesis that allows for transferring CAN frames over IP networks, similar to userland tools like socketcand [0] or cannelloni [1].
I wrote the thesis at dissecto GmbH [2], a german Startup that specializes in security diagnostics and analytics for embedded systems, primarily within the automotive industry.
The idea behind the project is that dissecto has developed a hardware device that can be connected to a CAN bus and acts as an ethernet gateway to the bus. It is capable of capturing the CAN traffic along with the corresponding timestamps and send this data via UDP or it can receive CAN frames via UDP as well and pass them on to the CAN bus.
This allows for remote interaction with a CAN bus, as well as an accurate analyses of CAN traffic, as packets contain precise time stamps.
An architectural design decision was to develop it as kernel module because of lower latencies and high throughput.
For example, my measurements show that the average time it takes a CAN frame to get processed by the module is just about 1/4 of the time it takes applications like socketcand or cannelloni.
We have published the module on GitHub [3], and would appreciate your feedback and thoughts.
If anyone is interested in this functionality for the same or similar use cases, please don't hesitate to contact us.
Best regards
Matthias Unterrainer
[0] https://github.com/linux-can/socketcand
[1] https://github.com/mguentner/cannelloni
[2] https://dissec.to
[3] https://github.com/dissecto-GmbH/can2eth-kernel-module