Skip to content
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

enable parity workaround for Linux systems #1366

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HendrikR
Copy link

On some systems, the serial port needs to set odd/even parity on connecting, before reverting to no parity during operation. Otherwise, the connection is flaky and often stops working after the first command.
This serial port parity workaround is not limited to Debian-based systems, but extends to other Linux distributions, too (e.g. Arch). Also, platform.system() is "Linux" on those systems, not "linux".

The serial port parity workaround is not limited to Debian-based systems,
but extends to other Linux distributions, too (e.g. Arch).
Also, platform.system() is "Linux" on those systems, not "linux".
@rockstorm101
Copy link
Collaborator

rockstorm101 commented Jul 19, 2023

Hi @HendrikR, first thanks for you contribution, I'm happy to merge this really. However I would like to take the opportunity to discuss this "parity workaround".

I presume you run Arch and find a need for this parity workaround? I ask because I run Debian and never felt the need for it really. The fact that it was applied when system was "linux", which never happened, makes me think not many people are facing parity issues.

@kliment, do you know the history of this workaround? Why it was made for Debian-derivates only?
@volconst, @hroncok, do your (Linux) systems need this parity hack?

@HendrikR
Copy link
Author

Hi @rockstorm101 , I am running a current Archlinux (uname -a: Linux modi 6.4.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 06 Jul 2023 18:35:54 +0000 x86_64 GNU/Linux) and access my printer (Monoprice Select Mini v2) via USB. The connection is flaky without the workaround, and works with no problems when enabling it.
If this workaround would not cause trouble for anyone who does not need it, it could stay activated indiscriminately for every Linux system. On the other hand, it could be controlled by an option (.pronsolerc and/or CLI flag).

@rockstorm101
Copy link
Collaborator

I've got a feeling that this isn't a platform-dependent issue but actually something to do with whether the serial driver supports parity or not. Maybe @kevans91 can shed some more light here? (Sorry to bring you into this so abruptly but I believe you introduced this check back in the day)

If it is indeed a driver-dependent issue, the platform check is not required and a configuration option would be the appropriate thing to do.

I'm surprised this makes any difference in the connection since, in theory, the parity is set to "NONE" in the end anyway regardless of the platform? I've been printing with and without the workaround and did not notice any difference. But I only have two computers and one printer to test anyway, not a huge sample :P

Friendly ping for @kliment, @hroncok and @volconst (Or anyone else who can comment on this :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants