Go to file
Sven Bohner e12e719ec6 README.md aktualisiert 2024-02-08 21:55:00 +00:00
LICENSE Initial commit 2024-02-08 21:05:03 +00:00
README.md README.md aktualisiert 2024-02-08 21:55:00 +00:00
build.sh convenience helper. build script will copy wrapper to /usr/bin path 2024-02-08 22:21:20 +01:00
icsbaudset.c Fast and Ugly solution; First commit; Tested and working. 2024-02-08 22:14:00 +01:00
setbaud.sh Fast and Ugly solution; First commit; Tested and working. 2024-02-08 22:14:00 +01:00

README.md

libicsneo-setbaud

Since the ICS SocketCAN driver doesn't yet support options for bitrate setting, this should temporarily provide a "quick and dirty" workaround.

Install

Clone this repository to your home directory. The simple build script will compile the source and and will place the binary and a wrapper script into /usr/bin and /usr/sbin.

Ensure you already have build and installed libicsneo. Having build and installed the ICS SocketCAN drivers is beneficial, but not necessarily requred if only the binary will be used.

How to use

note: This is build for the neoVIPI but could also be used for any other VCAN4-1 or VCAN4-2.

There are two ways available to utilize this tool. By either the native binary, or the wrapper script.

The native binary

The native binary expects exactly 4 parameters in a certain order. Since this is a quick solution, please be carefull, there are currently not really checks implemented.

$ sudo libicsneo-setbaud Vxxxxx hscan 250000 2000000
  • the first parameter is the Device Serial number
  • the secont parameter is the targeted channel to operate on. In this version it is hscan or hscan2
  • the third and fourth will be the baud rates. the first rate is the CAN baud rate, the second is the FD baud rate. This FD setting is required, even if FD is not used in the application, for this case simply type in the first baud rate again, or any other valid value.

Note the requirement to execute the command as root, else no HW changes would be possible.

The Wrapper script

Since the whole thing was meant as work around. the script allows the baud rate setting using the SocketCAN network names. E.g.: can0, can1, etc..

$ setbaud.sh vcan0 250000 2000000

The script will parse the system information for the Device SN and channel which got assigned to the abstract network name. SocketCAN requires to be up for this. To check the available network names, please consult:

$ ip link