mg_error peer RST during firmware upload #3434
-
|
I'm using the sample code from mongoose/tutorials/http/device-dashboard with the following config: and During the file upload I get a random lost(?) HTTP response which the client never receives. Example debug messages when the error occurs: The problem is not in the pico specific code (where interrupts get disabled) as the problem still occurs when I dummy out the mg_ota_flash_xxx() calls; Very grateful if one of the gurus can tell me what Im missing? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
What you're missing is a Wireshark capture and all the data to be able to match that call to mg_error() to who is doing it, in order to determine the reason for it. |
Beta Was this translation helpful? Give feedback.
-
|
When the error occurs, I can see the client POST request with Wireshark: The server is still responding to other HTTP requests: |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your trying, here is the Rafiki situation: I don't need what you see, I need what you don't see. You are asking a question, if you knew the answer you wouldn't be asking a question, so the answer is not in what you know, it is in what you don't know. |
Beta Was this translation helpful? Give feedback.
OK, I seem to have a clearer picture now.
Mongoose send functions do not send for TCP. Data is buffered and later sent when calling mg_mgr_poll(). One Eth frame per call.
If your code does not allow that to happen, then it won't get sent. I'm not into the Wizard code, it may have changed a lot since the last time I worked on it, and this is not the place to handle possible Wizard issues. The code I remember fired a timer before going to re-flash, in order to allow for the response to be sent.
WRT your off-topic Q, that would be my code, so I will check. It was long time ago.