-
Notifications
You must be signed in to change notification settings - Fork 31
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
Serial communication may be blocking #39
Comments
I can confirm this is definitely an issue with the module. I believe pyserial was mostly written before asyncio was common. There's a pyserial-asyncio extension that appears to implement a cross-platfrom async serial implementation, but ... it also looks like pyserial is not well maintained these days. Unclear if the solution is to bring in pyserial-asyncio (or the homelab fork) and hope for the best, or if it makes sense to make changes the serial backend to natively support interactions with serial file-descriptors using O_NONBLOCK and some Windows-specific nonsense for that platform. I was thrilled to see that this module was recent and featured an async API, but learning that the serial comms are not actually async under the hood makes a fix for this issue imperative for me. I'll start work on a PR. |
Thanks for your comment, and I hope the library can be of use to you. Please send any pull requests to alexrudd2/alicat as that fork is actively maintained. |
I think the higher-level
write_and_read
will block with this serial implementation. There needs to be an async wait-until-ready part.I don't know how best to do this with serial today.
Originally posted by @patrickfuller in #37 (comment)
The text was updated successfully, but these errors were encountered: