# Cannot connect to toolhead MCU on TwoTrees SK1

**URL:** <https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566>\
**Category:** General Discussion\
**Created:** [April 7, 2024, 9:58am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566 "2024-04-07T09:58:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 9:58am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/1 "2024-04-07T09:58:58Z")

</div>

### Basic Information:

Printer Model: TwoTrees SK1  
 MCU / Printerboard: custom RP2040 based board  
 Host / SBC: Custom makerbase skipr like board

I am trying to upgrade klipper software on the TwoTrees SK1 printer, as the stock version is almost 2 years old. I managed to upload new firmware to the toolhead’s microcontroller. The firmware is built with the following parameters:

- No bootloader
- UART communication at 250000
- All other settings are default

The problem is that klipper cannot connect to the toolhead on cold boot. Sometimes it stucks on “mcu ‘MKS\_THR’: Starting serial connect” message, sometimes it restarts connection on timeout, but still cannot connect. Surprisingly after a few presses on the toolhead board reset button it eventually connects and works normally.

What could go wrong with this upgrade? How I can troubleshoot the connectivity (to understand whether this is a linux side issue, or the toolhead board problem)

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [April 7, 2024, 10:02am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/2 "2024-04-07T10:02:13Z")

</div>

Hello @grafalex !

Deleting the line that asks for the klippy.log does not mean you don’t have to provide it.

Please attach it to your **next post**.

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 10:44am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/3 "2024-04-07T10:44:58Z")

</div>

[klippy.log](https://klipper.discourse.group/uploads/short-url/a0UFui5FEKXL94iTNjsUGrsgmRC.log) (163.9 KB)  
.  
Here is the log from the cold boot, then a few klipper restarts, tries to reset the board, and eventually it connected.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [April 7, 2024, 11:41am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/4 "2024-04-07T11:41:23Z")

</div>

I’m not overly familiar with that printer but a quick google search told me two important things.

From what I can tell, a version of the MKS\_THR is made using the RP2040. This shouldn’t affect it with a cold boot but I’d definitely look at putting a fan on that board ASAP if it is in fact RP2040 based. They heat up QUICK.

Second, I’m assuming since it’s serial you’re connected via USB? Have you tried a different USB cable?

You’re getting timeouts because the board isn’t replying to Klipper quick enough.

> mcu ‘MKS\_THR’: Timeout on connect  
> mcu ‘MKS\_THR’: Wait for identify\_response

There seems to be quite a bit of latency on when the connect command is sent and when it’s reported as received, so my first thought is a wiring problem. I’d try a different cable and see if that helps solve your issue.

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 11:53am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/5 "2024-04-07T11:53:56Z")

</div>

Thank you for the response. Here are a few notes:

- There is an always-on fan at the RP2040 board, though it does not heat even without it.
- I am using USB only to upload the new firmware. In the other time the board is connected using the UART.
- The board is connected using a wire installed on the factory, that goes from the main board, through the frame, then through the cable chain to the board. Perhaps it is possible to replace this cable, but this might be complicated, so I need to be absolutely sure this is because of the cable (I am using this printer for about 4 weeks, and it worked fine until I started the upgrade, so I think this wire is the last thing to check). Though I’ll try to connect with another cable.
- It fails on timeout after a few seconds, not miliseconds.

Question: Is there a way to check whether RP2040 boots normally?

---

<div class="post-metadata">

**Author:** ![docgalaxyblock](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/docgalaxyblock/32/4892_2.png) [@docgalaxyblock](https://klipper.discourse.group/u/docgalaxyblock)\
**Post date:** [April 7, 2024, 12:07pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/6 "2024-04-07T12:07:36Z")

</div>

> [@TheFuzzyGiggler](#):
>
> Second, I’m assuming since it’s serial you’re connected via USB? Have you tried a different USB cable?

Nope those MKS OEM boards and toolheads are using plain uart to the toolheads

* * *

@grafalex I personally had the interest to get discord colleges kingroon to the latest version and we had success for kingroon hw version V2.0 (toolhead usb) and the current V2.2 (th serial).  
_I plan to write a full guide here_  
The same should be possible with the SK1 too.

Can you make good pics from the toolhead pcb on both sides?

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 1:45pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/8 "2024-04-07T13:45:54Z")

</div>

Here are the pics (sorry, this is the best quality I can make)

 ![IMG_20240407_155621](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/0/086130192d304708f59f04bca40028948ee613b0.jpeg)

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 1:48pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/9 "2024-04-07T13:48:59Z")

</div>

![IMG_20240407_155635](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/b5202dfb2dbeb46615f5ff928a79d0fb1e6335fe.jpeg)

---

<div class="post-metadata">

**Author:** ![docgalaxyblock](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/docgalaxyblock/32/4892_2.png) [@docgalaxyblock](https://klipper.discourse.group/u/docgalaxyblock)\
**Post date:** [April 7, 2024, 5:18pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/10 "2024-04-07T17:18:36Z")

</div>

Thx  
Could you just check if  
`~/klippy-env/bin/python ~/klipper/klippy/console.py /dev/ttyS0` (if that is the same tty as on the KP V.2.2)  
also lose the connecton to the THR while build in? (klipper service must be stopped)

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 6:34pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/11 "2024-04-07T18:34:59Z")

</div>

Yes, it behaves same way - repeatedly trying to connect.

I did some oscilloscope probing, and see that TX pin (from MCU to the host) value is about 0.6V. I still have no idea what the problem is.

This could be a hardware problem (e.g. broken wire or a connector), but I tried to bend wires and connectors - nothing changes. But sometimes after replugging everything the connection fixes. Sometimes it goes other way - works normally for a long time, then after reboot breaks.

This tends me to think, that this could be also a RP2040 initialization issue. For some reason the microcontroller does not start, or does not initialize UART properly.

So there is a question: is there a way to verify microcontroller works normally? It would be nice to understand somehow whether this is MCU issue, or the host side one.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [April 7, 2024, 7:05pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/12 "2024-04-07T19:05:45Z")

</div>

Did you have any issues when flashing? If it went into dfu mode and accepted the firmware that’s a decent sign it’s working. Can you post a screenshot of the menuconfig options you used when flashing?

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 7, 2024, 8:06pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/13 "2024-04-07T20:06:22Z")

</div>

Flashing was always working normally. Though I am not sure this is a classic USB DFU - when in boot mode the RP2040 exposes a mass storage device, where I just copy the firmware to.

Taking into account that sometimes it works, I come to a conclusion that firmware update goes normally. The question is why it does not start normally for most of the time.

Here is the configuration screenshot.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/a/ad48a940c65056c9324e1d09848be32d915aac86.png)

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [April 7, 2024, 10:07pm UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/14 "2024-04-07T22:07:58Z")

</div>

> [@grafalex](#):
>
> when in boot mode the RP2040 exposes a mass storage device, where I just copy the firmware to.

That’s how the RP2040 is designed, so that’s right.

I’ll let docgalaxy help you, I can’t find any meaningful info on those boards and he seems to be familiar with them.

---

<div class="post-metadata">

**Author:** ![docgalaxyblock](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/docgalaxyblock/32/4892_2.png) [@docgalaxyblock](https://klipper.discourse.group/u/docgalaxyblock)\
**Post date:** [April 9, 2024, 3:31am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/15 "2024-04-09T03:31:50Z")

</div>

Year it could be an hardware problem …

But the best way imo is to get the manufacture fw on the toolhead. We need somebody that still has it to extract it but I am unfamiliar with this on rp2040. Did this with the many STM32s already and the Kingroon was one where it worked flawlessly to get the offset out of the dumped bin.

I need to check TT Support page and downloads to take a look if they provide the file there.

Lets see if I find time on wednesday or thursday evening for that

* * *

@grafalex What happens if you use some shorter jumper cables to connect the toolhead to the board.  
Same behavior?

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [April 9, 2024, 5:48am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/16 "2024-04-09T05:48:07Z")

</div>

Thats kind of a janky board to be honest, I tried to visually follow the path to the serial connector but GPIO0 and GPIO1 are facing AWAY from it and I don’t see any vias that are headed that way.

That doesn’t necessarily mean anything, it’s just a weird PCB design.

Also, They couldn’t have included a legit USB connector?

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 9, 2024, 6:33am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/17 "2024-04-09T06:33:17Z")

</div>

> [@docgalaxyblock](#):
>
> We need somebody that still has it to extract it but I am unfamiliar with this on rp2040.

The official firmware, surprisingly, is Klipper. That is why I am here.  
Though I tried to flash the stock version, and have the same problem.

> [@docgalaxyblock](#):
>
> What happens if you use some shorter jumper cables to connect the toolhead to the board.  
> Same behavior?

Unfortunately I do not have right connectors laying around, and there are no such connectors in local stores either. Need to order on Aliexpress, which will take some time. Though I’ll try to make invent somethig on this.

> [@TheFuzzyGiggler](#):
>
> Also, They couldn’t have included a legit USB connector?

What do you mean? The USB pin header can be wired to a USB connector no problem.

---

<div class="post-metadata">

**Author:** ![TheFuzzyGiggler](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/thefuzzygiggler/32/12313_2.png) [@TheFuzzyGiggler](https://klipper.discourse.group/u/TheFuzzyGiggler)\
**Post date:** [April 9, 2024, 7:07am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/18 "2024-04-09T07:07:52Z")

</div>

> [@grafalex](#):
>
> What do you mean? The USB pin header can be wired to a USB connector no problem.

How many people have spare pin header to USB cables laying around? I have 35+ years of electronics parts, cables, wires etc. and probably have maybe 2 pin headers to USB connectors that I salvaged from something else.

They’re not very common. So what happens if you lose one? or it breaks on the USB side?

What _is_ ULTRA common though is just a regular USB cable. Just seems like a weird design choice is all I guess.

---

<div class="post-metadata">

**Author:** ![docgalaxyblock](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/docgalaxyblock/32/4892_2.png) [@docgalaxyblock](https://klipper.discourse.group/u/docgalaxyblock)\
**Post date:** [April 9, 2024, 7:14am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/19 "2024-04-09T07:14:43Z")

</div>

> [@TheFuzzyGiggler](#):
>
> Also, They couldn’t have included a legit USB connector?

Hey here they even soldered the headers here. The kingroon boards have only the holes.  
Keep in mind those china printers are not designed with upgrading in the future.  
They run outdated Buster and ancient klipper & co

Kingroon even modified the moonraker code to disable its update manager completely (they commented out the update check function codeblock) even if you add the update manager to the config.

* * *

@grafalex Is the above mentioned moonraker thing also prrsent at the SK1?

An idea I have is to connect the toolboard to a different board over serial and/or connect a generic pico over serial instead of the thr and check if it dropps out there too

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 9, 2024, 8:13am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/20 "2024-04-09T08:13:43Z")

</div>

> [@TheFuzzyGiggler](#):
>
> How many people have spare pin header to USB cables laying around?

Well, you are right, that it would be easier if they could solder a regular USB socket. But I had plenty of regular pin headers, and number of spare USB cables which I could simply cut and solder dupont pins. Moreover one can simply solder USB cable directly to pads.

> [@docgalaxyblock](#):
>
> They run outdated Buster and ancient klipper & co

Correct. Though I managed to update all of them. The biggest problem was updating from buster to bullseye, while updating fluidd, moonraker. and klipper was not a big deal. The only proprietary SW component in this printer is Nextion display to Moonraker bridge, but it seems to work fine with the updated Moonraker.

> [@docgalaxyblock](#):
>
> An idea I have is to connect the toolboard to a different board over serial and/or connect a generic pico over serial instead of the thr and check if it dropps out there too

Thanks for the idea, I’ll try.

---

<div class="post-metadata">

**Author:** ![grafalex](https://avatars.discourse-cdn.com/v4/letter/g/c4cdca/32.png) [@grafalex](https://klipper.discourse.group/u/grafalex)\
**Post date:** [April 9, 2024, 8:19am UTC](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566/21 "2024-04-09T08:19:41Z")

</div>

> [@TheFuzzyGiggler](#):
>
> I tried to visually follow the path to the serial connector but GPIO0 and GPIO1 are facing AWAY from it and I don’t see any vias that are headed that way.

Here they are:

 ![086130192d304708f59f04bca40028948ee613b0](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/372f9e6d2a79e4b3d1a050e75b277cc3581d7e7f.jpeg)

[Next page](https://klipper.discourse.group/t/cannot-connect-to-toolhead-mcu-on-twotrees-sk1/15566.md?page=2)
