# Auto Klipper reconnection to the MCU

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.&#x20;

```
lsusb
```

TIP: 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 adapter
```

in 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.rules
```

and 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.&#x20;

## Done!

You did it!&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lazarofilm.gitbook.io/3d-printing/handle-power-on-off.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
