Klipper configuration on the Fly SHT-36 V1 for CAN bus
Edit me
Important: This guide assumes you have a working Klipper host installation on a Raspberry Pi or compatible device
Setup steps
Klipper firmware
Compile Klipper firmware for can
Note: Repeat these steps if a klipper update requires flashing new firmware to the MCU.
- ssh to your klipper host console
- cd to the klipper directory
cd klipper
- Run make clean
make clean
- Open menuconfig
make menuconfig
- Set the following settings
- Enable extra Low Level configuration options : Checked
- Micro Controller : STMicroelectronics STM32
- Processor Model: stm32f072
- Build: 8 Kib bootloader
- Clock Ref: 8 MHz crystal
- Comm Interface - CAN bus on PA8/PA9
-
Application Offset 8 Kib
-
CanBus Speed: 500000
-
Quit and save the configuration
- Run Make to compile the firmware
make -j 4
Flash Klipper firmware with CanBoot over CAN bus
- Get the SHT-36 UUID buy running the following script.
~/CanBoot/scripts/flash_can.py -i can0 -q
- If CAN devices are detected the above command will return the following.
Found canbus_uuid=6248a4b16ede
-
Each device will have a unique uuid. In the above example, 6248a4b16ede is the micro-controller’s canbus uuid.
-
Save the UUID for the next step.
- Flash the klipper FW to the SHT-36 by running the following command.
python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u {paste your UUID here}
Example
python3 ~/CanBoot/scripts/flash_can.py -i can0 -f ~/klipper/out/klipper.bin -u 6248a4b16ede
- You should get a download progress bar and File downloaded successfuly when the burning is complete.
- Your SHT-36 should now have klipper firmware loaded and be ready to use.
CAN configuration
- Run one the following commands at the Klipper host SSH console to get the UUID for the SHT-36 tool board.
~/klippy-env/bin/python ~/klipper/scripts/canbus_query.py can0
or
~/CanBoot/scripts/flash_can.py -i can0 -q
- If uninitialized CAN devices are detected the above command will report lines like the following:
Found canbus_uuid=6248a4b16ede
- Each device will have a unique identifier. In the above example, 6248a4b16ede is the micro-controller’s “canbus_uuid”.
Note: The canbus_query.py tool will only report uninitialized devices - if Klipper (or a similar tool) configures the device then it will no longer appear in the list.
add screen shot here
- Add the following lines to your printer.cfg file replacing the UUID with the one you copied in the last section.
[mcu SHT-36]
canbus_uuid: { your UUID here }
# run the following command to locate the uuid > ~/CanBoot/scripts/flash_can.py -i can0 -q