AtDigester consumes first line of responses as echos #13
Labels
bug
Something isn't working
enhancement
New feature or request
question
Further information is requested
I started working on adding UART config commands (get/set
AT+UART_CUR
andAT+UART_DEF
), but the responses always failed to parse.example response (with echo):
AT+UART_CUR?\r\n+UART_CUR:115201,8,1,0,1\r\n
I think I tracked it down to:
That first step always seems to discard the first line as an echo, but then the original input is used to match for URCs. URCDigester then matches the echo as a valid URC and returns. On the next digest, the first step discards the entire first line of any response (the entire response in the case of
AT+UART_CUR?
).Preventing URCDigester from matching echos allows the responses to parse correctly. The AtDigester docs suggest that it should work with echo disabled, but it always seems to discard the first line as echo unless I'm misunderstanding something. Another solution is to change AtDigester to hand
P::parse()
the buf after discarding the echo instead ofinput
like it does now.The same issue happens with
get_address()
. The first response disappears (the ipv4 address for me).I'm new to rust and embedded rust so I appreciate any help.
The text was updated successfully, but these errors were encountered: