Closed adrianocr closed 2 years ago
OK so go ahead and disregard the above, I hadn't realized I copied over the [mcu] section in the printer.cfg file and set a bad path to the serial device.
HOWEVER now that I figured that out and changed it back to ttymxc3 it also didn't work, the logs said there's a permission error. So I tried swapping it out to test with ttyUSB0 and I got the same result. I attached into the container and checked /dev/ and was able to confirm that the device is in there. Here is the bottom of the log as proof:
mcu 'mcu': Starting serial connect
mcu 'mcu': Unable to open serial port: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
webhooks client 139665361786272: New connection
webhooks client 139665361786272: Client info {'program': 'Moonraker', 'version': '?'}
mcu 'mcu': Unable to open serial port: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
Had the same problem on arch linux. Try to add permission to the serial port on a host machine: chmod 666 /dev/ttyUSB0 (or ttyACM0 in my case). Not sure if this is the good solution but it works for me
upd: Unfortunately it will work only for current session (until reboot or printer re-plug/reset)
Alternative solution is to create a file printer.rules in /etc/udev/rules.d/ with some rules in it:
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", MODE="0666"
KERNEL=="ttyUSB[0-9]*", MODE="0666"
KERNEL=="ttyACM[0-9]*", MODE="0666"
and then execute:
# udevadm control --reload
My first reaction would be to set udev rules as @ximikator suggested. Check the file permissions on your printers serial port.
ls -al /dev
docker compose exec klipper ls -al /dev
Also, run the get-info Script and attach the generated archive to this issue.
./scripts/get-info.sh
-Markus
udev rules worked fine
Here is the klippy.log:
As you can see it is referencing a
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
device. In the overrides file I specified- "/dev/ttyUSB0:/dev/ttymxc3"
so I'm not even sure where the firmware got that value from. Read the host's serial connections in /dev/ maybe?Anyway I was also able to confirm that the device it says it cannot find does actually exist in /dev/serial/by-id/ so I'm not sure why it can't seem to find it.
Suggestions?