I have created a program to extract data from various AT commands, such as AT+QENG=“servingcell” or AT+QSCAN. Sometimes, some of these commands take even over a minute to respond. To handle this, I implemented a timeout of 40 seconds, if no response is received within this time, the next command is sent.
The issue I’m facing is that, although the new command is sent, it doesn’t receive a response until the previous command has finished responding. Ideally, when the timeout is triggered, the ongoing command should be canceled so that the new one is processed immediately.
Is there a way to force the cancellation of an AT command response?