I am trying to send the command AT+COPS=?
using the Ql_RIL_SendATCmd()
.
Here is a snippet:
void getCopsInformation(void)
{
static char cmd[] = "AT+COPS=?";
debugPrint("%s:%d\r\n", __func__, __LINE__); // <<== my own debug that prints on serial
Ql_RIL_SendATCmd(cmd, strlen(cmd), atCopsResponseHandler, NULL, 1000*60*6);
debugPrint("%s:%d\r\n", __func__, __LINE__); // <<== my own debug that prints on serial
}
And the registered callback atCopsResponseHandler
just prints on the serial that it has reached that point, and the response.
The command is taking about 3 minutes to be executed, and I am getting a response:
getCOPSInformation:144
+COPS: (2,"","","72404",9),(0,"","","72499",9),(0,"","","72406",9),,(0-4),(0-2)
OK
getCOPSInformation:146
But, as you can see, it is printing my debug messages only around the AT command, but not in the response callback.
If I change the command to be like AT+COPS?
then the callback prints fine, and the command executes very fast:
getCOPSInformation:144
atCopsResponseHandler:123
atCopsResponseHandler:127
atCopsResponseHandler:132, line=[+COPS: 0,2,"72404",9
OK
]
atCopsCollectNeighbors:55
atCopsCollectNeighbors:58
atCopsResponseHandler:134
Any idea why in the first command the response callback is not being called?