alexmohr / usb-can

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

kmod: open_candev fails #15

Closed Ciusss89 closed 4 years ago

Ciusss89 commented 4 years ago

Current master

[37049.561650] hlcan: Unknown symbol open_candev (err -2)
[37049.561699] hlcan: Unknown symbol unregister_candev (err -2)
[37049.561739] hlcan: Unknown symbol can_change_mtu (err -2)
[37049.561776] hlcan: Unknown symbol alloc_candev_mqs (err -2)
[37049.561815] hlcan: Unknown symbol close_candev (err -2)
[37049.561860] hlcan: Unknown symbol register_candev (err -2)
alexmohr commented 4 years ago

Please follow the readme and load the can_dev module first

modprobe can-dev

The dependency can be specified in the makefile but I havn't had time to do so.

Ciusss89 commented 4 years ago

Please follow the readme and load the can_dev module first

modprobe can-dev

The dependency can be specified in the makefile but I havn't had time to do so.

thanks, I messed it.

Anyway

[41899.533656] hlcan: QinHeng serial line CAN interface driver
[41899.533658] hlcan: 10 dynamic interface channels.
.
.
[42218.779841] can_dev: unknown parameter 'hlcan' ignored
[42218.779938] CAN device driver interface
[42221.460262] usb 3-1.2: new full-speed USB device number 24 using xhci_hcd
[42221.539925] usb 3-1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63
[42221.539930] usb 3-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[42221.539933] usb 3-1.2: Product: USB2.0-Serial
[42221.546832] ch341 3-1.2:1.0: ch341-uart converter detected
[42221.547454] usb 3-1.2: ch341-uart converter now attached to ttyUSB0

The net device should be created automatically when it detects a new device right?

alexmohr commented 4 years ago

No the device is only created when the userspace tool is started. A kernel module which does require a userspace tool is currently being developed but it'll take some time. Please pull the repository again as I forgot to remove the renaming of the interface from the userspace tool aswell.

Ciusss89 commented 4 years ago

No the device is only created when the userspace tool is started. A kernel module which does require a userspace tool is currently being developed but it'll take some time. Please pull the repository again as I forgot to remove the renaming of the interface from the userspace tool aswell.

ok, now it works but we other issues:

  1. When u use the cansend command to send a frame, EG: cansend slcan0 023#ff the frame is received by subsystem (virtual) can (candump slcan0 show what is sent by cansend) but the led red TX doesn't blink. it's like if the received frame isn't forwarded by MCU's CAN
  2. When a CAN frame is received by the device (green led blinks when that happens) it doesn't forward the incoming frame to host.
alexmohr commented 4 years ago

I cannot reproduce your issue. Please post the following:

Also please note that this tool is a replacement for slcan and cannot be loaded with slcan at the same time.

alexmohr commented 4 years ago

Issue has been resolved by setting up the module again. Closing this issue.