usb-can icon indicating copy to clipboard operation
usb-can copied to clipboard

Error when running install

Open ghost opened this issue 2 years ago • 10 comments

Seeing this error when running: "./build.sh install". I'm runnng Debian: Screen Shot 2023-02-16 at 10 33 03 PM

ghost avatar Feb 17 '23 03:02 ghost

  1. you're missing the kernel headers. To install them run sudo apt install linux-headers-$(uname -r)
  2. The module was not working on kernel 5.10, pull master again before building.

alexmohr avatar Feb 18 '23 19:02 alexmohr

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)

Nztr0027 avatar May 19 '23 08:05 Nztr0027

Have you installed the kernel headers as described above? (Also please post error messages in English only)

alexmohr avatar May 19 '23 10:05 alexmohr

do you need further support?

alexmohr avatar May 22 '23 11:05 alexmohr

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.

Nztr0027 avatar May 22 '23 12:05 Nztr0027

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.

alexmohr avatar May 22 '23 12:05 alexmohr

Do you know what is the latest version of the Linux kernel in which it works?

Nztr0027 avatar May 22 '23 12:05 Nztr0027

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.

alexmohr avatar May 22 '23 18:05 alexmohr

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.

Nztr0027 avatar May 23 '23 12:05 Nztr0027

I never tried to run in on arm. Shouldn't make any difference though

alexmohr avatar May 23 '23 16:05 alexmohr