Ls /dev/serial/by-id/* Is not being properly generated

Basic Information:

Printer Model: Creality Ender 3
MCU / Printerboard: BTT Skr Mini E3 V3
Host / SBC: Raspberry pi 4 Model B
klippy.log (290.6 KB)

Describe your issue:

I cannot seem to get the expected result from the following command to use in my printer.cfg file

jarchiepacheco@mainsailos:~/klipper $ ls /dev/serial/by-id/*
ls: cannot access '/dev/serial/by-id/*': No such file or directory
jarchiepacheco@mainsailos:~/klipper $

I am feeling reasonably confident that I have followed the instructions carefully but here are my settings in case there is something I am missing:

First this is the config I used for my firmware.

[*] Enable extra low-level configuration options
    Micro-controller Architecture (STMicroelectronics STM32)  --->
    Processor model (STM32G0B1)  --->
    Bootloader offset (8KiB bootloader)  --->
    Clock Reference (8 MHz crystal)  --->
    Communication interface (USB (on PA11/PA12))  --->
    USB ids  --->
[ ] Optimize stepper code for 'step on both edges'
()  GPIO pins to set at micro-controller startup

It seems to match the settings listed in the BTT github.

Just to double check, I also took a look at my board and took a photo. It seems to match the information above. I can provide the photo if asked but I am unable to attach it to this post as a new user.

The other supporting evidence I have is the outputs lsusb and sudo dmesg
which provides

jarchiepacheco@mainsailos:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1d50:614e OpenMoko, Inc. stm32g0b1xx
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
jarchiepacheco@mainsailos:~ $

and (pulling the information I think is relevant out)

[    1.127933] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    1.266677] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[    1.266713] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.266724] usb 1-1: Product: USB2.0 Hub
[    1.268158] hub 1-1:1.0: USB hub found
[    1.268456] hub 1-1:1.0: 4 ports detected
[    1.523754] EXT4-fs (mmcblk0p2): mounted filesystem d4cc7d63-da78-48ad-9bdd-64ffbba449a8 ro with ordered data mode. Quota mode: none.
[    1.556473] usb 1-1.2: new full-speed USB device number 3 using xhci_hcd
[    1.653411] usb 1-1.2: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00
[    1.653443] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.653453] usb 1-1.2: Product: stm32g0b1xx
[    1.653461] usb 1-1.2: Manufacturer: Klipper
[    1.653468] usb 1-1.2: SerialNumber: 33002B0008504B5735313920
[    1.945154] systemd[1]: System time before build time, advancing clock.
[    2.039075] NET: Registered PF_INET6 protocol family
[    2.039831] Segment Routing with IPv6

If this is not enough information, I have a full .txt file I can provide. I just couldn’t link it in this post as a new user.

At this point in time, I have reflashed the firmware to the board multiple times, even using the one provided by BTT with the same results. I know the error means that there is an issue with the USB connection or the firmware on the board but I don’t know where to proceed from here. I’ve tried following the help from multiple posts on this forum regarding this but I haven’t had any luck.

Any help would be greatly appreciated and if any more information is needed then I will provide that as soon as I can.

Thanks,

Okay from the lsusb: the address is: 1d50:614e. Now make menuconfig for you main board. once complete hit “q” to exit and then type make clean. While in dafu mode type make flash FLASH_DEVICE=1d50:614e and press enter. Now once complete reset the main board or re-start the system and they open klipper and type: ls/dev/serial/by-id/* and you will see your ID file.

There is no space after ls.

Note: For better readability, please always use Preformatted Text for code.

The config and your dmesg snippet look good. According to it, your connection path should be:

/dev/serial/by-id/usb-Klipper_stm32g0b1xx_33002B0008504B5735313920-if00

It is surely strange that ls /dev/serial/by-id/* returns nothing. Please attach the full dmesg output.

make flash output.txt (3.1 KB)

This is the output I get from those instructions. I may be incorrect because I don’t fully understand what your commands are having me do (I know it’s dumb to run commands without understanding what they do) but I think you’re trying to flash the control board over usb and I believe the BTT e3 can’t be flashed over usb. It needs to be flashed on an sd card.

If this is incorrect then I apologize but I gave it a try and the linked file is the output from it.

Here is that full log.

dmesg.txt (35.2 KB)

Welcome jarchiepacheco,

no.

Try

[mcu]
serial = /dev/serial/by-id/usb-Klipper_stm32g0b1xx_33002B0008504B5735313920-if00

in your printer.cfg file.

I gave that a try and had no luck.

If it helps, I am attaching a copy of my printer.cfg file.

printer.cfg (3.4 KB)

According to the dmesg, the board seems correctly flashed and registered. There are some messages that may indicate the modemmanager could be interfering.

Try the approach detailed here, but for modemmanager or use the automatic script solution: BRLtty / ModemManager - Services Interfering with Klipper

  • How did you install Klipper?
  • If the above approach does not work, check the dmesg command to see which tty, e.g.

dc_acm 1-1.3:1.0: ttyACM0: USB ACM device

the device registers and use this as an intermediate troubleshooting step, e.g.
```kcfg
[mcu]
serial = /dev/ttyACM0

This is the result of running the automatic script:

jarchiepacheco@mainsailos:~ $ curl -sf -L https://raw.githubusercontent.com/Sineos/useful_bits/main/Linux/disable_unwanted_services.sh | sudo bash
[sudo] password for jarchiepacheco:
Checking for root rights
                             [OK]
Checking if brltty is installed
                             [No brltty service(s) found.]
Checking if modemmanager is installed
                             [No modemmanager service(s) found.]

Unfortunately I forgot to take note of the first time I ran the command but it did tell me it masked the modemmanager stuff.

I am still receiving the same result from the ls /dev/… command. I also don’t fully understand what the rest of your reply is telling me to do but I installed klipper via the raspberry pi imager and selected the mainsailOS option. I haven’t had to do any manual installation of anything at this point beyond the firmware for the control board and configurations.

Sorry, I do that fault always (klippy.log vs printer.cfg) :unamused_face:

Please try

serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_33002B0008504B5735313920-if00

  • What Linux distribution?
  • How was Klipper installed?
  • provide the output ps -axu or ps -axu > ps.txt

You might profit from reading Klipper’s printer.cfg - Syntax and Parsing Rules

Still no luck.

Here is the associated lines of my printer.cfg

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_33002B0008504B5735313920-if00
# serial: /dev/ttyAMA0
# restart_method: command

Here is that output:

ps -axu output.txt (14.3 KB)

As far as I know, Klipper was installed as part of the mainsailOS package on the raspberry pi imager.

I think my linux distro is Debian.

Here is the output from a hostnamectl command

jarchiepacheco@mainsailos:~ $ hostnamectl
 Static hostname: mainsailos
       Icon name: computer
      Machine ID: 56cfa5597b4b4c5eb7872d35bbfc7582
         Boot ID: 746681bb77724c78b6f93333eff2bd94
Operating System: Debian GNU/Linux 12 (bookworm)
          Kernel: Linux 6.12.34+rpt-rpi-v8
    Architecture: arm64

I can see nothing strikingly amiss.
I’d propose to flash a new SD card with Raspberry Pi OS Lite and install your environment with KIAUH and try again.
I’m not sure, but somehow have the feeling that it might be an issue on the Linux OS level.

Okay, that sounds good. I will give that a go later today after work and I will report back my results. I appreciate the help!

Following your advice, everything went off without any issue. Thank you for the help, shame we couldn’t figure out the exact problem and solution. Anyways, thank you and happy printing!

1 Like