G’day All, I ran into something in the last couple of days that doesn’t seem to be well documented - CanBus on 64 Bit Pi OS’s, eg Bullseye, is highly error-prone.
My HW: SKR v2 → Pi 3B+ → U2C → EBB36
Context: I was running an old version of MainSali OS and needed to start a fresh OS build to update to the latest versions of Crowsnest and a couple of other extensions. So I thought I’d try starting with the 64 Bit version of MainSail OS 1.3.2.
Anyway, after 2 days of constant “Communication timeout” errors when running a BedMesh etc, I found more reports of ppl having these issues on 64 Bit Pi OS’s than any other config. I also noticed that the “bytes_invalid” counter was consistently increasing no matter what I tried, and that had never been an issue previously. However, there was no consistent advice that the OS version was the root cause.
So I decided to throw the 32 Bit version of MainSail OS 1.3.2 onto an SD card, and after putting my config (same config as used on 64 Bit) back on I started testing. Low and behold, all the errors have gone away, and I’m 2 hours into a print with Zero “bytes_invalid” on my EBBCan MCU.
Recommendation: Do NOT use 64 Bit versions of Pi Operating Systems and CanBus - you will have issues with errors and timeouts.
@koconnor perhaps it’s worth creating an article in the KB warning ppl off running 64 Bit OS’s? I’ve found folk running Pi 5’s + 64 Bit Bullseye blaming Crowsnest’s USB WebCam handling for these errors, but I strongly suspect their issues are actually CANBus (Katapult) not working well with a 64 Bit OS.
PS. This is the Guide I recommend for configuring CanBus on Klipper, it works perfectly on every 32 Bit Pi OS I’ve tried.
I’ve had a few problems with running the rPi’s Mainsail OS.
Before you start writing up a ticket, could I suggest that you repeat the experiment with the basic rPi 32bit OS Lite and rPi 64bit OS lite with Klipper/Moonraker/Mainsail/Katapult (if used) installed using KIAUH?
Howdy, yes I can definitely do that. It’ll likely take me a week or so before I’ll have the time. Now that I’ve got my little printer working, I need to finish configuring and tuning a Magneto X for my son’s school.
These things are very cool, and so darn big I have to keep it in my garage!
The reason I raised the issue here, is I couldn’t find a single location that mentioned it via Google, including on this forum.
Admittedly Google search has devolved significantly in recent years, but if someone like myself, who finds this out the hard way, and is intentionally searching to see if others have too, can’t find the information, someone deep in troubleshooting hell has almost no chance of figuring it out.
I do not think it is a general problem, but it might be a problem. Such a pointer would be suited for CANBUS Troubleshooting - Klipper documentation (it briefly already mentions Kernel woes).
Feel free to raise a pull request to amend the documentation
At least here on the forum, this has been mentioned multiple times already.
@dJOS_500, I see you call out using an RPI 3B+. Have you tried an RPI 4 or 5 to ensure it is not an issue of overtasking 3B+ with the 64-bit RPIOS?
We need more information before we point to the OS or RPI processing speed, memory, USB, etc… debugging requires removing components in the setup to drill down to the problem.
You are also missing information on the equipment you are using, U2C (V1.x [STMF072] or V2.x [STMG0B1]) these MPUs have different processing speeds.
EBB36 (V1.0 [STMF072], V1.1 or V1.2 [STMG0B1]) these MPUs have different processing speeds.
The CPU utilisation was never above 25%, and everything looked pretty normal, aside from the errors in data transmission on the CanBus to the EBB36 MCU.
I don’t have any of the more powerful Pi’s on hand to try, but consorting @Sineos has pointed out that this is a known issue, I’m not sure it’s worth chasing down i on my system. Especially as it’s working flawlessly on Bullseye 32 Bit.
If it helps, I have the U2C 1.x and the EBB36 v1.2.
Considering Klipper and all of the extensions I use appear to be native 32 Bit code, and most Pi’s have less than 4GB of ram, there’s really no good reason to use a 64 bit OS.
The only reason I went with 64Bit Mainsail OS, was the Pi imager hiding the 32 Bit options when I selected my Pi model. I discovered later that if you don’t select a model, Mainsail OS 32 Bit version is visible and has “(recommended)” alongside it.
It does, think about it, the v1.x works perfectly fine connected to a Pi running a 32 Bit OS, so what reason do I have to spend money on a hardware solution, when there is no real reason to use a 64 bit OS?
I have just re-setup a couple of my machines, and forgot all about this 64bit issue, I have non stop timeout’s, I get tmcuart timeout, and heaters shutting down randomly on several machines, its like a little gremlin is running around inside the dam things.
One is an RPI5 + MKS-SKIPR + MKS-THR36 all on CAN, the other is an RPI4 + MKS-SKIPR + MKS-THR36 all on CAN, no U2C style boards involved.
I’m about to switch the RPI4 over to 32bit and see if the issue persists.