usb-can
usb-can copied to clipboard
Error when running install
Seeing this error when running: "./build.sh install". I'm runnng Debian:
- you're missing the kernel headers. To install them run
sudo apt install linux-headers-$(uname -r)
- The module was not working on kernel 5.10, pull master again before building.
I have the same problem running "sudo make install" on /usb-can-master/src/module:
mkdir -p /usr/lib/modules/6.1.28-v8+/kernel/drivers/net/can cp hlcan.ko /usr/lib/modules/6.1.28-v8+/kernel/drivers/net/can cp: no se puede efectuar `stat' sobre 'hlcan.ko': No existe el fichero o el directorio make: *** [Makefile:16: install] Error 1
(raspberry pi OS)
Have you installed the kernel headers as described above? (Also please post error messages in English only)
do you need further support?
Hello, thanks you and sorry for the delay,
Finally, I managed to install it, but it seems that it is not working properly. I can't configure the bitrate. When I execute "hlcand -m 0 -s 1000000 /dev/ttyUSB0," CAN 0 appears, but when I run "ip -details link show can0," the bitrate is set to 800000, and in dmesg, I receive the following message: [ 706.516716] tty_tiocsserial: 'hlcand' is using deprecated serial flags (with no effect): 00008000.
Thank you for your attention, and I apologize for the initial error message in Spanish.
there were several changes to the serial interface of the linux kernel since I originally wrote this. It seems like they finally deprecated the old APIs. It requires that this project adopts the new changes of the serial interface or even better it should be rewritten, so it does not hijack slcan anymore. I started writing a native kernel driver a while ago but never followed through with it. This means that in the current state it's impossible to use this with a recent kernel.
Do you know what is the latest version of the Linux kernel in which it works?
If I remember correctly the last version I successfully tested was 5.15 but possibly some early ones from 6.xx work too. You could try to find out which version deprecated the serial API calls.
It's a bit weird because now I'm running kernel version 5.4.0-1084-raspi on Ubuntu 20.04, and I have this issue. I'll try to test it with something like version 4.5. thanks you again.
I never tried to run in on arm. Shouldn't make any difference though