fix: prevent ESP32 KISS modem stalls under USB backpressure#2819
Open
ViezeVingertjes wants to merge 3 commits into
Open
fix: prevent ESP32 KISS modem stalls under USB backpressure#2819ViezeVingertjes wants to merge 3 commits into
ViezeVingertjes wants to merge 3 commits into
Conversation
Switch ESP32-S3 KISS modem environments to HWCDC and move outbound KISS writes to a non-blocking queued frame path so loop() and TX completion keep progressing when the host reads slowly. Add native backpressure regression tests and correct the native_kiss_modem test filter so this suite runs directly with pio test.
The new test_kiss_modem suite needs KissModem headers and sources that only native_kiss_modem provides. Scope native to test_utils and run both envs in the unit test workflow.
setTxTimeoutMs() and setTxBufferSize() are HWCDC-only APIs; calling them on HardwareSerial (UART-bridge boards like T-Beam) fails to compile.
Contributor
Author
|
What do you think about this solution, @agessaman? I didn't want to butcher your branch/PR, so I made it a separate one. If we end up going with this approach, all the credit goes to you since you brought up the idea in the first place. Happy to add you as a co-author as well. It's a bigger change in terms of LOC, but with KISS gaining popularity, I think it makes sense to make it as resilient as possible. Most of the changes in this PR are test related anyway. If you filter on the three files under I've tested it both in code and on hardware, but if you get a chance to do the same and give it a try, I can probably get it merged a bit quicker. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch ESP32-S3 KISS modem environments to HWCDC and move outbound KISS writes to a non-blocking queued frame path so loop() and TX completion keep progressing when the host reads slowly. Add native backpressure regression tests and correct the native_kiss_modem test filter so this suite runs directly with pio test.
Also should resolve #2646
write()blocks →loop()permanently wedgedloop()keeps running