alexmohr / usb-can

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

hlcand: ioctl TIOCSETD: Invalid argument #9

Closed Ciusss89 closed 4 years ago

Ciusss89 commented 4 years ago

1 2

[347925.671075] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[347925.671107] ch341 3-1.2:1.0: device disconnected
[347927.639172] usb 3-1.2: new full-speed USB device number 101 using xhci_hcd
[347927.717373] usb 3-1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63
[347927.717376] usb 3-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[347927.717377] usb 3-1.2: Product: USB2.0-Serial
[347927.724224] ch341 3-1.2:1.0: ch341-uart converter detected
[347927.724763] usb 3-1.2: ch341-uart converter now attached to ttyUSB0
[347933.762689] kauditd_printk_skb: 8 callbacks suppressed
sudo hlcand -m 2 -s 500000 /dev/ttyUSB0 -F
[6] starting on TTY device /dev/ttyUSB0
ioctl TIOCSETD: Invalid argument
alexmohr commented 4 years ago

Thats an actual show stopper for this implementation. The line discipline is checked at multiple parts of the ioctl call chain and must be a valid kernel value. I haven't checked before.

Options now are:

I'll probably look into the 2nd option because I think it is the most promising. Probably it will be necessary the read the mapping between device ID and name of the can device from a configuration.

alexmohr commented 4 years ago

Fixed in current implementation