zephyr/subsys/modem
Bjarki Arge Andreasen 7c9f2872e1 modem: chat: Start waiting for response after request is sent
This PR makes the modem_chat wait until a chat script chat
request has been sent before accepting responses to said
request.

This helps ensure that an unsolicitet response is not mistaken
for a response to a request, which is especially problematic
if the chat script chat is using an any match.

For example, start chat script sending AT+CGMI, expecting the
modem name as a response followed by OK

> start script, waiting for response immediately
> start sending "AT+CGMI"
> receive "+CEREG 1,0" while sending
> script accepts "+CEREG 1,0" as the response to "AT+CGMI"
> "AT+CGMI" sent
> receive "QUECTEL BG95"
> receive "OK"

script handler got "+CEREG 1,0" instead of "QUECTEL BG95"

After this PR:

> start script
> start sending AT+CGMI
> receive "+CEREG 1,0" while sending
> "AT+CGMI" sent
> start waiting for response
> receive "QUECTEL BG95"
> script accepts "QUECTEL BG95" as response to "AT+CGMI"
> receive "OK"

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-01-15 15:11:42 +01:00
..
backends modem: backend: tty: Implement transmit idle event 2024-01-11 16:09:44 +00:00
CMakeLists.txt subsys/modem: Add modem modules 2023-08-30 13:48:51 +02:00
Kconfig modem: Add experimental tag 2023-11-03 09:56:30 +01:00
modem_chat.c modem: chat: Start waiting for response after request is sent 2024-01-15 15:11:42 +01:00
modem_cmux.c modem: modem_cmux: optimize modem_cmux_transmit_frame to save ROM 2024-01-11 16:10:37 +00:00
modem_pipe.c modem: pipe: Add TRANSMIT_IDLE event 2024-01-11 16:09:44 +00:00
modem_ppp.c modem: modem_ppp: added net stats 2023-09-15 15:13:06 -05:00