Skip to content

URCs overwrite responses before they can be processed #16

@denravonska

Description

@denravonska

In a multithreaded environment like at-unix.c a data pipe will pull data from a UART and push it into the parser. If a response is detected it's returned to the caller as an unguarded char *.

One problem we're facing with ESP32-AT is that when you read data from a socket it returns a response+raw data, OK then immediately sends a URC. Since parser_handle_line resets the parser when it has detected a complete response, any data received after that will start overwriting the response.

In this particular case we can setup a command scanner that handles the URC as the final OK but there's always a risk of other spurious URCs overwriting the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions