-
Notifications
You must be signed in to change notification settings - Fork 282
SWSERIAL_9N1 Possible? #93
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
Comments
@ondabeach, discussion regarding your requirement happens in espressif/arduino-esp32#2701 |
@ondabeach, to the point of code cleanups I have done some preliminary work to allow one to identify the spots that need to be touched for multi-byte words. In my spare time, I am afraid, I am not going to do much more than that. As were are learning, the ESP32 team don't have much love for software serial emulation, either. If you want/need this mode commercially, a different arrangement should be possible. |
I've adapted an older version of this library to support parity (None, Odd, Even, Mark and Space). I'm using it to detect and send addressing commands using mark/space parity in a RS485 protocol. It should be sufficient to solve most "9-bit serial problems" I've seen people asking about. @ondabeach - What is your use case, do you need 9 true data bits or is the 9th bit used separately, e.g. for addressing in the protocol? Unfortunately my application isn't very stable and I don't know if the problem is that other parts of my code interferes with realtime requirements (most likely), my patches to ESPSoftwareSerial or the library itself (unlikely). If flexible parity options can be added it could be a great selling point for this library. As far as I can tell there is no simple way to implement Space and Mark parity in hardware for ESP8266 or ESP32 (but I'd love to be corrected). It's great to see that so much work has been done here over the last year and I'm hoping that the updated code will be more forgiving to my application and can improve overall stability for me. So I am currently on track to adapt my parity code to the curent ESPSoftwareSerial layout and plan to share it with you all. It will be a slow process with no guarantees as it is for a small hobby project. Also, I am not a professional programmer by any means, so keep your expectations low :-) Obviously, I would love to know if anyone else is also working on it. |
@fredvik using explicit mark/space parity, as I assume combined with "manually" shifting the data bits in user code to simulate 9bits on the wire, is something that I've been thinking about, too. If there is some standard API to this, accepting PRs to this end would be easier. |
@dok-net That's fine with me! I'll have a look at your working repository as well. |
@fredvik Keeping the API you designed in spirit, I've merged your README enhancements and implemented the "9bit" as parity with mark and space extension. It would be great if could have a moment or two available to try and let me know if it works for you, too. |
Hi, thanks for this beautiful code. It is the only softwareserial that will work on the ESP32. But I need 9 data bits, is it possible to add this config mode?. I know it means doubling the buffer size but that does not matter for me. I looked at the code in espsoftwareserial and it is beyond my level of understanding, otherwise I would try to do it myself.
Thanks, Steve.
The text was updated successfully, but these errors were encountered: