Seems like to USB2CAN buffer overflow and firmware crashing.
Gediminas
On 2019-12-13 18:27, Michal Sojka wrote:
On Fri, Dec 13 2019, Michal Sojka wrote:
Hi Oliver,
On Fri, Dec 13 2019, Oliver Hartkopp wrote:
Did you do anything weird (e.g. pulling the USB plug on the run) to get
this problem?
No, I just connected it to an ECU and started sending messages on the
bus. The behaviour was like if the messages were not acknowledged, i.e.,
initially, candump on my laptop showed the messages sent, but after some
time (perhaps after TX buffers were full), candump stopped. I was also
not able to see any messages sent by the ECU (both before and after I
sent my messages).
When I used the same ECU and all the wiring with peak_usb, communication
with the ECU was without any problems.
I did more investigation - I was able to fix the problem by adding a
terminator resistor to the bus.
However, the problem can be easily reproduced by the following sequence
of commands, when the USB2CAN is not connected to any bus:
ip link set can0 up txqueuelen 1000 type can bitrate 500000
candump can0
cangen -v -g 50 can0
when candump stops printing the messages, run:
ip link set down dev can0
and the warnings appear in dmesg. I was also trying this with latest
mainline kernel, which includes the fix for use-after-free, and the
warnings are still there.
-Michal