Skip to content
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

fix(modem): Fixed inconsistent state on data after OK #446

Conversation

david-cermak
Copy link
Collaborator

If we received response in two chunks and the first one completed the command (result=OK or FAIL), and the second chunk preempts command processing, then we performed processing again rewriting the result back to TIMEOUT. This would invalidate the command, but also causes an exception: ESP_MODEM_THROW_IF_ERROR(ESP_ERR_INVALID_STATE)

Fixed by checking if the processing already finished in process_line().

Closes #426

If we received response in two chunks and the first one completes the
command (result=OK or FAIL), and the second chunk pre-empts command processing,
then we performed processing again rewritting the result back to
TIMEOUT. This would invalidate the command, but also causes an
exception: ESP_MODEM_THROW_IF_ERROR(ESP_ERR_INVALID_STATE)
Fixed by checking if the processing already finished in process_line().

Closes espressif#426
@dset0x
Copy link

dset0x commented Dec 6, 2023

Thanks for this. Looks good. :) We run into this bug often due to URCs. Would definitely love to see it in the next release.

@david-cermak david-cermak merged commit 671190b into espressif:master Dec 6, 2023
90 checks passed
@david-cermak
Copy link
Collaborator Author

Thanks for the review @dset0x @euripedesrocha !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Esp Modem panic_abort on unsolicited data from SIM card (IDFGH-11441)
3 participants