This is a new issue for an old problem.
These are the related issues/PRs i could find about this:
I'm trying to understand why this seems so complicated to fix. I feel like I must be missing something here.
From what I understand, at least as long as command echos are enabled, this problem should be easy enough to solve:
Afer receiving a command echo, URCs are not possible until the command response was fully received. We can use this to just skip looking for URCs until the final response code was received.
Has anyone tried this yet? Or is there a problem in this logic?
I had a look at the implementation and from what I see the Digester just drops anything it thinks is a command echo. Basically treating echos as garbage. I understand that the Digester does not know what command has been sent, thus it cannot check for the exact echo, but "AT+" will only ever occur in an echo.
My attempt to solve this:
- If echo data is dropped, check if the dropped data contains "AT+"
- If it does, set a flag:
response_in_flight
- For as long as
response_in_flight is set: skip parsing of URCs
- If a response is fully parsed, reset
response_in_flight
I tried implementating this, and after a rough first test it seems to be working. Before I continue here I would like to know if my logic is sound or not.
This is a new issue for an old problem.
These are the related issues/PRs i could find about this:
I'm trying to understand why this seems so complicated to fix. I feel like I must be missing something here.
From what I understand, at least as long as command echos are enabled, this problem should be easy enough to solve:
Afer receiving a command echo, URCs are not possible until the command response was fully received. We can use this to just skip looking for URCs until the final response code was received.
Has anyone tried this yet? Or is there a problem in this logic?
I had a look at the implementation and from what I see the
Digesterjust drops anything it thinks is a command echo. Basically treating echos as garbage. I understand that theDigesterdoes not know what command has been sent, thus it cannot check for the exact echo, but "AT+" will only ever occur in an echo.My attempt to solve this:
response_in_flightresponse_in_flightis set: skip parsing of URCsresponse_in_flightI tried implementating this, and after a rough first test it seems to be working. Before I continue here I would like to know if my logic is sound or not.