-
Notifications
You must be signed in to change notification settings - Fork 24
Fix dropped receive data caused by timeout #45
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
Conversation
Set receive timeout to 500ms to prevent dropped data. Update the call in ESP8266::recv to call parser.process_oob rather than parser.recv since this code is only used to trigger the processing of out-of-band data.
f35f00a
to
8f101bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
#endif | ||
#ifndef ESP8266_RECV_TIMEOUT | ||
#define ESP8266_RECV_TIMEOUT 0 | ||
#define ESP8266_RECV_TIMEOUT 500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some quick math, 5 symbols (+IPD:) / 115200 baud = 0.043 ms.
500ms > 0.043ms so this looks good 👍
@marcuschangarm, @bentcooke, this may be a fix for the corruption issue you guys were seeing. |
Awesome! Can someone try the https://github.com/ARMmbed/mbed-stress-test please? I don't have access to an ESP module! 😄 |
Yes, I will try it with both the CC update and the stress test... though it may be tomorrow before I can get to it. I am having to setup a new laptop right now(old one died!). : ( |
Below is my output when I run
|
Beautiful! Thank you Russ! 😄 |
Merge it in, ASAP. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I see we need a needs dependency label... |
I have been able to test this with a CC FW update config that was previously failing every time and it appears to have fixed the image corruption issue. Nice work Russ! |
Set receive timeout to 500ms to prevent dropped data. Update the call to parser.recv to pass NULL rather than a dummy value so only out of band data is processed. This allows parser.recv to return immediately if there is no out of band data.
This patch also updates the ATParser library to bring in updated out of band data processing support.
This PR depends on ARMmbed/ATParser#14