alexmohr / usb-can

USB-CAN Analyzer Linux Support
GNU General Public License v2.0
36 stars 13 forks source link

Error when running install #44

Open ghost opened 1 year ago

ghost commented 1 year ago

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

alexmohr commented 1 year ago
  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.
Nztr0027 commented 1 year ago

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)

alexmohr commented 1 year ago

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

alexmohr commented 1 year ago

do you need further support?

Nztr0027 commented 1 year ago

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.

alexmohr commented 1 year ago

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.

Nztr0027 commented 1 year ago

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

alexmohr commented 1 year ago

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.

Nztr0027 commented 1 year ago

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.

alexmohr commented 1 year ago

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