-
Notifications
You must be signed in to change notification settings - Fork 34
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
Response without leading '\r\n' is eaten by echo detector #184
Comments
I feel like the only way to properly deal with this is if the Digester knows about the commands that have been sent so you can specifically match echoes (if enabled) and expect a specific response. |
I am seeing an issue that is related. I noticed a URC missing in my software. This is transmitted by a ESP-01 (empty lines are
(3 bytes are sent with The last This means the parser will only get to parse
|
I share your feeling regarding the current implementation in regards to echo & URC handling. I also observed that in some situations URC's are not parsed because the buffer is advanced during false echo identification. I have the issue with an ESP32C3 and latest AT firmware. Did you find a solution without breaking the unit tests? |
I have encountered a specific case in which the response on a command is removed by
digest::parser::echo
:"\r\n+QMTRECV: 1,0\r\n+QMTRECV: 1,0,\"t/dev/commands\",16,\"{\"cmd\": \"blink\"}\"\r\n\r\nOK\r\n"
First
\r\n+QMTRECV: 1,0\r\n
is correctly detected as an URC.Then we are left with:
"+QMTRECV: 1,0,\"t/dev/commands\",16,\"{\"cmd\": \"blink\"}\"\r\n\r\nOK\r\n"
Because there is no
\r\n
in front, this will not be detected as an URC, which is good because this is actually a response to the"AT+QMTRECV"
command.However
digest::parser::echo
parses this as an echo and removes it.echo
removes everything up to the next newline.If I change
echo
to detect an echo as: `AT.....\r\n' like this:Then I can parse my input, however there are 2 failing tests:
It seems like the
echo
parser also has the responsibility to remove garbage.That means the issue comes down to differentiating between a response without a leading
'\r\n'
and garbage. But that is very hard when echo is on. Because for example with prompts there is no leadingAT
.The text was updated successfully, but these errors were encountered: