Open fxt-7 opened 10 months ago
Hey @fxt-7,
first of all, but unrelated to this issue, you should be using a proper mainline kernel with the mainline driver (mcp251xfd
) for your mcp2518fd
CAN controller. You're using the mcp25xxfd
, which is a old version.
I think canfdtest
doesn't properly work in loopback mode, it's not a problem on your side. Better setup a proper CAN bus and start canfdtest -v can0
on one side and canfdtest -vg can0
on the other side. If you have 2 CAN controllers on the same system, you can also use can0
and can1
.
Hi @marckleinebudde,
Thank you for your quick and professional answer! ! I will update the driver version to the latest. So if I want to test the loopback function in one can device, I should use the other tools, just like cangen? Is there a tool similar to canfdtest for testing the loopback function?
Hope your answer~
Consider updating your kernel, not just the CAN driver.
I've just updates the canfdtest
in the https://github.com/linux-can/can-utils repo. It should now work on CAN devices in loopback mode, use -xx
to filter out other and locally generated CAN traffic.
In one terminal:
canfdtest -xx -v can0
In another:
canfdtest -xx -vg can0
Hi @marckleinebudde
I can't update this product's kernel version, I must work on this kernel for the other work, so shall I update the driver to mcp251xfd base on the 5.4.254 kernel ?
On the other hand,thanks for your upadtes! ! I had tried the latest canfdtest to test loopback function, but how to determine if there is a frame drop, judge by these dot “.” ? Or just like the before, the err logs like Databyte %x mismatch? send
receive
Another question, after you updating,the usage like ./canfdtest -xx -vg - f 100 can0 is right ? Or just can't assign the frame counts which I want to send ?
Looking forward to your answer, thanks~
Dear all,
When I tried to run
./canfdtest -f 2 -g can0
to test the loopback funtion, I met the below problem ,could you please help to tell me how to debug it? When I using cansend and candump, it is normal.send receive