/voronpi-klipper-backup

Automated backup of klipper config

Primary LanguageHTML

voronpi-klipper-backup

Automated backup of klipper config

Voron 2.4 250mm v2.1906

discord: whistlinric

Features

"C:\Users\accou\OneDrive\Reprap\klipper_estimator\klipper_estimator.exe" --config_moonraker_url http://voron0pi post-process;

Previous features

Links

Main mod repos

Software

Hardware

Voron parts

Klipper configs

Misc

ERCF

Other klipper backups I've found useful

CAN Bus for Mellow SHT36 v2

  1. Maz's github on CAN Bus
  2. Ensure your data cables are twisted
  3. Ensure you have a file in `/etc/network/interfaces.d' called 'can0'
allow-hotplug can0
iface can0 can static
    bitrate 500000
    up ifconfig $IFACE txqueuelen 128
    pre-up ip link set can0 type can bitrate 500000
    pre-up ip link set can0 txqueuelen 256

Make menuconfigs

Klipper - Octopus UART

Klipper-Octopus-UART

Klipper - Octopus USB

Klipper-Octopus-USB

Klipper - mellow-sht36-v2

Full instructions at https://github.com/Esoterical/voron_canbus/tree/main/toolhead_flashing

make clean KCONFIG_CONFIG=config.sht36
make menuconfig KCONFIG_CONFIG=config.sht36
make KCONFIG_CONFIG=config.sht36
# Reboot toolhead to CanBoot
python3 ~/CanBoot/scripts/flash_can.py -i can0 -u bc3001b7c431 -r
# Check it's there
python3 ~/CanBoot/scripts/flash_can.py -q
# Flash it
python3 ~/CanBoot/scripts/flash_can.py -i can0 -u bc3001b7c431 -f ~/klipper/out/klipper.bin

klipper-sht36-v2

CanBoot - Octopus

canboot-octopus

Klipper - Raspberry Pi

make clean KCONFIG_CONFIG=config.Rasppi
make menuconfig KCONFIG_CONFIG=config.Rasppi
sudo service klipper stop
make flash KCONFIG_CONFIG=config.Rasppi
sudo service klipper start

Klipper-RaspberryPi

Klipper - Octopus USB to CAN Bridge

Thanks to help from Methos on discord this is now working.

  1. Build the firmware e.g. this way allows a config per device
make clean KCONFIG_CONFIG=config.Octopus
make menuconfig KCONFIG_CONFIG=config.Octopus
make KCONFIG_CONFIG=config.Octopus
  1. Double click the button (near the usb socket) on the Octopus board to turn on canboot
  2. Find your usb device - should have CanBoot in it
ls /dev/serial/by-id/*
~/CanBoot/scripts/flash_can.py -d /dev/serial/by-id/usb-CanBoot_stm32f446xx_0B0027000A50534E4E313020-if00
  1. lsusb should show two OpenMoko devices
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1d50:606f OpenMoko, Inc.
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 007: ID 1d50:606f OpenMoko, Inc.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  1. If you already have a can board e.g. utoc build plugged in that will be CAN0, we need to setup a CAN1 to scan.
sudo ip link set can1 type can bitrate 500000
sudo ip link set can1 txqueuelen 256
sudo ifconfig can1 up
  1. Now we can scan the CAN1 for the klipper UUID
~/CanBoot/scripts/flash_can.py -i can1 -q
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: bac2e369d891, Application: Klipper
Query Complete
  1. Change your printer.cfg to use CANBUS
[mcu]
canbus_uuid: bac2e369d891
  1. Unplug your old UTOC or similar board, reboot system (full power cycle)
  2. Hopefully that all works. note: It seems that klipper prevents scans of canbus once it has connected, single click the button on the octopus board to allow querying to work. Possibly power cycling the CANBUS board on your toolhead as well if you don't know it's UUID or find it out first before using the Octopus board as your USB CAN bridge.

klipper-Octopus-USB2CAN

Some command lines

# Octopus Flash
make clean KCONFIG_CONFIG=config.Octopus
make menuconfig KCONFIG_CONFIG=config.Octopus
make KCONFIG_CONFIG=config.Octopus
~/CanBoot/scripts/flash_can.py -i can0 -u bac2e369d891 -f ~/klipper/out/klipper.bin
~/CanBoot/scripts/flash_can.py -d /dev/serial/by-id/usb-CanBoot_stm32f446xx_0B0027000A50534E4E313020-if00

# OpenMoko is CAN bus I think
x@host:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 1d50:606f OpenMoko, Inc.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

# After flashing CAN bus Octopus the UUID goes to [mcu] canbus_uuid::
x@host:~/klipper $ ~/CanBoot/scripts/flash_can.py -i can0 -q
Resetting all bootloader node IDs...
Checking for canboot nodes...
Detected UUID: bac2e369d891, Application: Klipper
Query Complete

# Also
x@host:~/klipper $ ~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
Total 0 uuids found

# Double click reset button to flash via CanBoot /dev/serial
x@host:~/klipper $ ls /dev/serial/by-id/*
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
/dev/serial/by-id/usb-CanBoot_stm32f446xx_0B0027000A50534E4E313020-if00

# Flash from klipper folder
x@host:~/klipper $ python3 ~/CanBoot/scripts/flash_can.py -d /dev/serial/by-id/usb-CanBoot_stm32f446xx_0B0027000A50534E4E313020-if00
Attempting to connect to bootloader
CanBoot Connected
Protocol Version: 1.0.0
Block Size: 64 bytes
Application Start: 0x8008000
MCU type: stm32f446xx
Flashing '/home/x/klipper/out/klipper.bin'...

[##################################################]

Write complete: 2 pages
Verifying (block count = 444)...

[##################################################]

Verification Complete: SHA = A27B43282D53034644140581F8DBB1B05BF64F7B
CAN Flash Success