-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ender 3 Pro | comm.py / serialposix.py Permission Errors | dietpi (debian 11 based) #5246
Comments
SolutionI got the /tmp/printer step to work by following the symlink to its source and adding that to OctoPrint instead. DetailsWhile troubleshooting I noticed that /tmp/printer was a symlink to the actual virtual port that Klipper setup: In the printer.cfg the serial port of the printer is listed by id, DietPi adds this as /dev/ttyUSBn depending on what you have plugged in. Then klipper set's up the virtual serial port /dev/pts/n which is symlinked to /tmp/printer. By following the OctoPrint steps but using the actual /dev/pts/n location rather than the symlink it worked fine. It should work with the symlink though, despite octoprint & klipper running under different users, as the relevant users and groups are set up:
And the users:
Seeing as symlinks under GNU/Linux have 777 permissions, and the files they are pointing to have 660 (rw for users and group) I really don't understand what the problem is. On a different note, it seems that Klipper can use both the symlink /dev/ttyUSBn and the actual location by id in the printer.cfg file. Maybe it would be good to troubleshoot the install-debian.sh script to figure out why octoprint can't connect to /tmp/printer despite it being a symlink to /dev/pts/0 and all the user/group permissions are correct. tl;dr: |
Most likely this issue: |
Heye,
I'm having some trouble getting octoprint to talk to klipper/printer.
Logs
klippy.log seems fine, it is most likely an octoprint issue.
klippy.log
Context:
I used the
install-debian.sh
script as I want to run DietPi instead of OctoPrint. After some initial troubleshooting I noticed that the path for the usb tty (/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
) was owned by root:root which prevented klipper from talking to it due to permission issues, however, it was symlinked by default to /dev/ttyUSB0 so I commented the relevant line in the config and changed it toserial: /dev/ttyUSB0
which is owned by dietpi:dietpi and now klipper talks to the printer and the LCD on the printer shows the klipper interface instead of just blank.Moving on from there I tried to get octoprint to talk to the printer but it keeps giving me trouble, saying "permission denied" to any attempts. I've checked permissions of various paths and the groups of the users involved (
octoprint
&dietpi
) as detailed below. Not sure what to try next.(I also left the BLTouch part commented despite using a BLTouch. I recommented this section because klippy logs told me I needed to add the z offset to the config, but, since the serial connection to the printer errored due to this part of the config missing, the LCD screen on the printer would stay blank and thus there was no way to get the z offset. I wasn't sure if I could use the z offset from before when running marlin so I decided to leave problem for future me and get everything else set up first.)
Looking through
journalctl
it seems that the problem relates to python and ports, but I'm no python expert so not sure where to go from here.Detailed info
Systeminfo:
I changed the relevant settings in the octoprint webinterface to add /tmp/printer but it keeps getting permission denied on all baud rates.
Octoprint terminal on trying to connect to /tmp/printer:
Additional info on /tmp/printer
Since
Octoprint terminal output when trying to connect to /dev/ttyUSB0:
Additional info on /dev/ttyUSB0:
(As you can see the path by id is symlinked to ttyUSB0)
octoprint is running with the user octoprint, klipper is running with the user dietpi:
And lastly, relevant systemlogs:
This repeats for every baudrate and is the same for both /dev/ttyUSB0 and /tmp/printer.
When I was running the stock Marlin+bltouch from Creality I could connect octoprint and the printer thus reporting this here and not on octoprint git.
edit: added the dev path for the usb serial. In doing this I noticed the path mentions
port0
at the end, but in the python part of the logs port 3775 is mentioned - could this be the issue?The text was updated successfully, but these errors were encountered: