Skip to content

Conversation

@theogayar
Copy link
Contributor

After working for a bit on this, I can say it wasn't as easy as I first thought it would be. I focused on #439, but I've tried to use methods and an implementation to think of #480.

I figured I'd post this draft as of now, in order to allow others to test what I couldn't and gather feedback.

@dw-0, I've tried to keep using the helpers and wrappers from KIAUH as much as possible, but I might have missed some. For instance, I couldn't find one to look for a specific running "pythonExampleScrypt.py", so I made my own, but I might have missed it. If I did not miss it, I think it should live with the other core utils and helpers, not in the katapult module.

--
What's working as of now (at least for me) :

  • Installing Katapult
  • Building Katapult
  • Flashing Katapult using Deployer
  • Saving the configs (altough I need to make the proper menu), I was thinking something like the main Klipper flash menu and helpers? @dw-0 would that be worth it?
  • Saving the directory for Katapult
  • Updating Katapult
  • Flashing Klipper over canbus, using can0 (hardcoded as of now)
  • Prompts for the flash mode, either can or uart, but could also be USB. I need input on this. What do people actually use?
  • Automatic install of python3-serial (needs to be changed to install only when uart/usb is used, not can)

If you guys are able to test this on your end that would be great. Be advised I'm not responsible for any issues related to bricking your devices because of this implementation. Let me know if you encounter problems, I'll try to resolve them with you !

--
I've tried documenting a lot of what I did inline, but need input on many questions, that are not necessarily technical, but rather practical :

  • Should I try to go the route of the full-on menu? Is it a waste of time?
  • Is support for multiple instances interesting? Should I just prompt the user to confirm they do what they want, then simply let them enter the information manually?
  • Are the disclaimers ok? Should I modify them? (especially at install time)
  • Should I implement support for multiple can interfaces?
  • I figured while I was at it, that it would be interesting to add a can helper in the main menu. Following @Esoterical's Canbus guide. Is that something I should add in a separate PR? Is it interesting?
  • Is it worth it to go through the trouble of implementing the automatic bootloader mode query from Katapult? This might be dangerous for owners that would go too fast through the setup and might end up bricking everything.

--
Overall, the code might not be of the best quality, please let me know of anything I should change/review in the way I approached things.

Note that the commits make no sense, as I was pushing very frequently to my fork as I'm not developing on the same machine I'm testing on.

@AreYouLoco
Copy link

AreYouLoco commented Nov 8, 2025

  • Is it worth it to go through the trouble of implementing the automatic bootloader mode query from Katapult? This might be dangerous for owners that would go too fast through the setup and might end up bricking everything.

Fot me that would be the main use case. So I can trigger Boot Mode with Katapult and then flash two MCUs with Kiauh.

Edit: I will give it a try tommorow

Edit2: I realized Klipper has an option to jump to bootloader so I no longer have need for that as my chip is RP2040 and there is already flash option for that. And I can do without disassembly it seems

@theogayar
Copy link
Contributor Author

theogayar commented Nov 16, 2025

  • Is it worth it to go through the trouble of implementing the automatic bootloader mode query from Katapult? This might be dangerous for owners that would go too fast through the setup and might end up bricking everything.

I'll work on that this week then, it shouldn't be too difficult. However, I might not be able to test it locally, as I'm running USB to can bridge on both my machines. Would you be kind enough to try it and give me feedback @AreYouLoco ?

Edit2: I realized Klipper has an option to jump to bootloader so I no longer have need for that as my chip is RP2040 and there is already flash option for that. And I can do without disassembly it seems

Could you describe the steps to do this please? I couldn't find the option on my end, and figured either I'm looking in the wrong place or went too fast over the different menus.

@AreYouLoco
Copy link

AreYouLoco commented Nov 16, 2025

@theogayar I also use CAN-to-USB.

Here is documentation
https://github.com/Klipper3d/klipper/blob/master/docs/Bootloader_Entry.md

Based on that I did small bash script. jump_to_bootloader.sh $device

So I just use that and then normal flash using RP2040 mechanism in KIAUH when device is in Boot Mode

@theogayar
Copy link
Contributor Author

@theogayar I also use CAN-to-USB.

Here is documentation https://github.com/Klipper3d/klipper/blob/master/docs/Bootloader_Entry.md

Thanks, I never knew about this. I'll try to add it in order to automatically request the bootloader, but I need to figure out a bit more about the way it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants