Canbus bytes_invalid increase during Z move

There are two known causes of incrementing bytes_invalid on CANbus:

  • Old firmware on the “usb to canbus” adapter that is buggy. This could be the results of the firmware reordering CAN bus packets (known to occur on some old versions of candlelight_fw) or it could be lost packets on the USB interface (known to occur on old version of Klipper running in usb2can mode).
  • Buggy Linux kernel versions that are reordering CAN bus packets.

Unfortunately, it can be difficult to track down a solution for one of the above two issues, as it can be hard to determine which Linux versions are impacted, and it can be hard to update the firmware of the USB adapter.

It is important to note that “bytes_invalid” is not the result of:

  • not related to canbus wiring
  • not related to terminating resistors
  • not related to configured canbus speed
  • not related to txqueuelen

Those issues will typically result in a bus that does not function at all, or functions erratically with intermittent “Timer too close” errors.

-Kevin