alexmohr / usb-can

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

Rewrite to kernel module #6

Closed alexmohr closed 4 years ago

alexmohr commented 4 years ago

Rewrite this project to a proper kernel module. After the rewrite this project will share most of its code with the slcan utils. The kernel module will be adjusted for the serial protocol and the slcand util will be ported to support this device.

Todo:

Ciusss89 commented 4 years ago

I'm working with the Standard frame and I can test it.

alexmohr commented 4 years ago
Ciusss89 commented 4 years ago

I'm working with the Standard frame and I can test it.

Hi Alex,

I'm testing the standard frame, seems to be a little a bug (receive side), could you confirm:

The snippet is the output of candump:

  1  can0  000   [8]  02 03 04 05 06 07 08 55
  2  can0  000   [3]  02 03 55
  3  can0  000   [1]  55
  4  can0  000   [2]  22 33 55
  1. I sent this: 01 02 03 04 05 06 07 08
  2. I sent this: 01 02 03
  3. I sent this: 77
  4. I sent this: 11 22 33

I'm testing 9a683882d704

alexmohr commented 4 years ago

Which device mode do you use and what where the dlc of the messages?

Ciusss89 commented 4 years ago

Which device mode do you use and what where the dlc of the messages?

I'm running it in mode 0.

Try to run this: https://pastebin.com/04euSQ8M

  1. sudo ./env_simulator.sh It creates a vcan0 and run candump, cangen.
  2. close the previous run and do this sudo ./env_simulator.sh slcan0. it runs candump and cangen on slcan0 (slcan0 is the iface made by your app)

if you compare the two outputs you can see that first and last byte are wrong you're using 2.

alexmohr commented 4 years ago

Your script is working for me. VCAN and HLCAN produce the same output. Could you post the output of the script from your machine?

Ciusss89 commented 4 years ago

Your script is working for me. VCAN and HLCAN produce the same output. Could you post the output of the script from your machine?

Screenshot from 2020-04-13 15-51-32

  1. It's like the problem is visible only if we use real case. As u told me it is not reproducible by my script