Auto Klipper reconnection to the MCU
This allows Klipper to automatically reconnect when the MCU is powered on.
Thanks to Th33xitus for this tip: https://discord.com/channels/431557959978450984/550724465886101514/729330554796900433
Get your USB vendor and product IDs
First you need to find you MCU's Vendor and Product ID. Type the following command in a SSH terminal.
lsusbTIP: to find out which USB device is your MCU, disconnect your MCU and run slusb again. and compare the two. You will find a line like this (this is my MCU):
Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapterin this case, 1a86 is the Vendor ID and 7523 is the Product ID. Save those on the side...
Edit rules
Now we need to updated rules.d. Type:
cd /etc/udev/rules.d/
sudo nano 98-klipper.rulesand add this line at the end of the document:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ACTION=="add", RUN+="/bin/sh -c '/bin/echo RESTART > /dev/pts/0'"Make sure to change the idVendor and idProduct values to the ones you got in the first step. Then do Ctrl +X Y Enter to save the changes.
Done!
You did it!
Last updated
Was this helpful?