Klipper/Host can't find serial ports after firmware restart

Basic Information:

Printer Model: Voron 2.4
MCU / Printerboard: Host: OrangePI PC One, affected boards: Bigtreetech SKR V1.4 / Makerbase Mks Robin Nano V3
klippy.log (514.6 KB)

Describe your issue:

This is a bit of a strange issue and I’m not entirely sure where to post this, but here is my best starting Point:

Problem: After restarting Klipper (“Restart”-Button) about 50% of the time the USB-Connection is lost and Klipper can’t connect to 2 out of 3 boards.

What I know: After the restart, /dev/serial/by-id as well as /dev/serial/by-path only shows 1 board out of the 3 boards connected (in fact the only board which is working 100% reliable is a self designed Board with an STM32F07 on it).

The other borads, namely a Bigtreetech SKR V1.4 and a Makerbase Mks Robin Nano V3 won’t connect.

Right now the only thing solving this issue is to reach under the printer and unplug and replug the USB-Connectors. All 3 boards are connected via the same USB-Hub.

Klipper error:
mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_lpc1768_0360010AA498C895BFBB3461C32000F5-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-Klipper_lpc1768_0360010AA498C895BFBB3461C32000F5-if00'

A lsusb command reveals that the two missing boards are in fact not shown.

I looked the shematics on both boards up and I saw that on both boards, the USB D+ pullup is switched via a PMOS. I shunted the PMOS, so the 1.5k D+ Pullup would be always there. Unfortunately that did NOT help (and I reversed that change).

Does anyone have a suggestion? Do I have to statically set some pins when compiling the klipper firmware for the boards, so that the pull-up resistor somehow gets enabled at the “right” time?

any suggestions would be appreciated.

  • cad435

Check with the dmesg command what actually is happening on OS level in such cases.
I doubt that this is Klipper related. Sounds more like USB hardware related.
Try without a USB hub or a different hub.

OK, I checked.

This is the relevant USB output when first starting up:

[   17.978324] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   18.138030] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.00
[   18.138071] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   18.138093] usb 1-1: Product: USB2.0 HUB
[   18.144520] hub 1-1:1.0: USB hub found
[   18.144891] hub 1-1:1.0: 4 ports detected
[   18.538311] usb 1-1.1: new high-speed USB device number 3 using ehci-platform
[   18.747400] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=c811, bcdDevice= 2.00
[   18.747436] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   18.747448] usb 1-1.1: Product: 802.11ac NIC
[   18.747457] usb 1-1.1: Manufacturer: Realtek
[   18.747466] usb 1-1.1: SerialNumber: 123456
[   18.926316] usb 1-1.2: new full-speed USB device number 4 using ehci-platform
[   19.139639] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[   19.139675] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   19.139688] usb 1-1.2: Product: stm32f072xb
[   19.139696] usb 1-1.2: Manufacturer: Klipper
[   19.139705] usb 1-1.2: SerialNumber: 350050000857345735333120
[   19.318380] usb 1-1.3: new full-speed USB device number 5 using ehci-platform
[   19.363702] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[   19.363939] usbcore: registered new interface driver cdc_acm
[   19.363953] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   19.552708] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   19.556652] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[   19.556690] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   19.556702] usb 1-1.3: Product: lpc1768
[   19.556712] usb 1-1.3: Manufacturer: Klipper
[   19.556720] usb 1-1.3: SerialNumber: 0360010AA498C895BFBB3461C32000F5
[   19.568909] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   19.602137] cdc_acm 1-1.3:1.0: ttyACM1: USB ACM device
[   19.783880] usb 1-1.4: new full-speed USB device number 6 using ehci-platform
[   19.993244] usb 1-1.4: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[   19.993284] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   19.993297] usb 1-1.4: Product: stm32f407xx
[   19.993305] usb 1-1.4: Manufacturer: Klipper
[   19.993314] usb 1-1.4: SerialNumber: 360019000650313154393520
[   20.033473] cdc_acm 1-1.4:1.0: ttyACM2: USB ACM device
[   20.800801] usbcore: registered new interface driver rtl8821cu
[   20.858686] rtl8821cu 1-1.1:1.0 wlx347de446119e: renamed from wlan0
[   21.160116] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY] (irq=POLL)
[   21.165994] dwmac-sun8i 1c30000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   21.168310] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[   21.168359] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[   21.168387] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[   21.206721] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[   22.494676] IPv6: ADDRCONF(NETDEV_CHANGE): wlx347de446119e: link becomes ready
[   29.360749] IPv6: ADDRCONF(NETDEV_CHANGE): wlx347de446119e: link becomes ready
[   33.782891] vcc3v0: disabling
[   33.782926] vcc5v0: disabling

and after two restarts (first one worked flawlessly), second one was a problem, I get this:

[  197.200988] usb 1-1.2: USB disconnect, device number 4
[  197.527114] usb 1-1.2: new full-speed USB device number 7 using ehci-platform
[  197.744727] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[  197.744760] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  197.744772] usb 1-1.2: Product: stm32f072xb
[  197.744781] usb 1-1.2: Manufacturer: Klipper
[  197.744789] usb 1-1.2: SerialNumber: 350050000857345735333120
[  197.747550] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device
[  197.748733] usb 1-1.3: USB disconnect, device number 5
[  198.079187] usb 1-1.3: new full-speed USB device number 8 using ehci-platform
[  209.099681] usb 1-1.3: device not accepting address 8, error -110
[  209.283647] usb 1-1.3: new full-speed USB device number 9 using ehci-platform
[  224.944361] usb 1-1.3: device descriptor read/64, error -110
[  240.561138] usb 1-1.3: device descriptor read/64, error -110
[  240.673275] usb 1-1-port3: attempt power cycle
[  241.377121] usb 1-1.3: new full-speed USB device number 10 using ehci-platform
[  252.109630] usb 1-1.3: device not accepting address 10, error -110
[  252.293633] usb 1-1.3: new full-speed USB device number 11 using ehci-platform
[  263.118094] usb 1-1.3: device not accepting address 11, error -110
[  263.124911] usb 1-1-port3: unable to enumerate USB device
[  263.131519] usb 1-1.4: USB disconnect, device number 6
[  263.474071] usb 1-1.4: new full-speed USB device number 12 using ehci-platform
[  278.966798] usb 1-1.4: device descriptor read/64, error -110
[  294.579522] usb 1-1.4: device descriptor read/64, error -110
[  294.871556] usb 1-1.4: new full-speed USB device number 13 using ehci-platform
[  310.452232] usb 1-1.4: device descriptor read/64, error -110
[  326.068953] usb 1-1.4: device descriptor read/64, error -110
[  326.181147] usb 1-1-port4: attempt power cycle
[  326.888979] usb 1-1.4: new full-speed USB device number 14 using ehci-platform
[  337.617462] usb 1-1.4: device not accepting address 14, error -110
[  337.801471] usb 1-1.4: new full-speed USB device number 15 using ehci-platform
[  348.625955] usb 1-1.4: device not accepting address 15, error -110
[  348.632386] usb 1-1-port4: unable to enumerate USB device

From what I understand (Im from a hardware side of things, so my Linux knowledge is limited) somehow two of the 3 Klipper devices get (for whatever reason) a new address enumerated (STM32F072 stays at adress 4)

but I have absolutely no idea how that could be caused, or in what circumstances devices get new adresses or when old adresses get reused.

So I can definately track that error down to the USB-Hub im using. Its a cheap chinese one I had laying around which (if the device is reporting itself correct) utilizes a Terminus Technology inc. Product.

Sooo, my guess would be that the chip used is a FE1.1(s) as this is a cheap widely used USB 2.0 Hub.

I bought a new Anker hub from Amazon which will hopefully arrive yesterday, which hopfully utilizes a different chip. I wouldn’t be surprised however if there is also a FE1.1 in there…

Does anyone knows if this particular chip is known to make problems with klipper?

Never had any problems with that hub for anything else…

Edit: With the new USB-Hub everything is working so far. Seems that it is indeed a problem with the FE1.1.

I guess thats sorted out than…

In case anyone comes across this topic:
This is the USB-Hub not working for klipper for me:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.