CANBUS running and mcu overridden but serial is restored in ratos.cfg after reboot

I have RatOS 2.1 running on a Manta M8P 2.0 with CM4 and EBB42 via CAN connection (non usb). Everything is working when i comment out this section is ratos.cfg #[mcu] #serial: /dev/btt-manta-m8p-20 In my printer.cfg I override the mcu setup with this [mcu] canbus_uuid: 7bc14b904427 Everything is working as it should, but as soon as the OS is rebooted, the mcu line that I commented out is reintroduced, and I get an error saying that serial is invalid in section MCU. Does anyone know how I can disable that the mcu/serial section in ratos.cfg is restored after a reboot? Best regards Nicki
Solution:
Currently the only way to use CAN is to copy RatOS.cfg to a different file. It's a lot of micro management, i know, but we're focusing on UX via USB, so CAN is not really something i'm prioritizing.
Jump to solution
8 Replies
TheTik
TheTikβ€’3mo ago
Don't edit the ratos.cfg. Only override it in printer.cfg. As you've found out, the ratos.cfg is recreated every boot.
NickiDotDk
NickiDotDkOPβ€’3mo ago
Yes and that is my problem, as soon as I have a mcu section with canbus_uuid in printer.cfg then I get an error that serial is not allowed in mcu, since it is restored in ratos.cfg. I need to find a way to either not restore that part, or at least not get the error, like if just the serial part could be commented out when restored. Do you know if that would be possible?
TheTik
TheTikβ€’3mo ago
i'd look at klipper documentation, but maybe something like
[mcu]
serial: none
canbus_uuic: whatever you got
[mcu]
serial: none
canbus_uuic: whatever you got
I don't know what value should actually be used for none but maybe the docs can help
NickiDotDk
NickiDotDkOPβ€’3mo ago
Thanks, I will have a look. Hope that it is possible πŸ™‚ Unfortunately it is not possible to specify a β€œnone” or null value for serial, so at the moment I have no idea how to solve this issue 😦
TheTik
TheTikβ€’3mo ago
What else is in the mcu section in ratos.cfg for that toolboard? Without advice from one of the ratos maintainers, I'd try copying that to printer.cfg, Re-running the configurator and don't tell it you have a toolboard. Then ratos.cfg shouldn't have that section declared so you won't have the troublesom serial part.
Solution
miklschmidt
miklschmidtβ€’3mo ago
Currently the only way to use CAN is to copy RatOS.cfg to a different file. It's a lot of micro management, i know, but we're focusing on UX via USB, so CAN is not really something i'm prioritizing.
miklschmidt
miklschmidtβ€’3mo ago
I recommend just running USB. Klipper is super anal about unused options for some unknown reason, if the code isn't accessing the option (serial in this case), it'll just barf if that line appears in the config file, regardless of the value. DangerKlipper has an option to ignore that Seeing as you're already using RatOS in ways it's not intended, maybe switching to DangerKlipper is an option? They have a lot of cool stuff πŸ˜„ RatOS should still work... i think πŸ˜…
NickiDotDk
NickiDotDkOPβ€’3mo ago
Thank you @miklschmidt I will look into it πŸ™‚ @miklschmidt I am going the route where I copy RatOS.cfg to another file, that is clever, I did not think of that. When updating all I have to do is to copy the entire content and comment out serial: xxxxx, so easy fix. Thank you for your time, and great job with 2.1 - it is amazing.
Want results from more Discord servers?
Add your server