Hi,
I made an application that creates a TCP socket via GPRS network to exchange date every 15 minutes.
The pseudo code is:
- Make sure that the network is attached AT+CGATT=1
- Get the status AT+CREG
- Use WIP library to create the TCP socket
SOMETIMES the AT+CGATT=1 locks the class GPRS and does NOT give an answer (so each next GPRS commands will return “+CME ERROR: 536” (class locked).
- Does somebody have the same problem ?
- Do I need to issue the AT+CGATT? command before (even if the doc says that I don’t need to do it…) ? I will make the test…
- Does the OS manage the command timeout ?
- Is there a command to abort the AT+CGATT=1 command ?
...
s8 l_Result = adl_atCmdCreate ( p_"AT+CGATT=1", FALSE, CGATT_Handler, "*", NULL );
if (l_Result != OK)
{
// When my problem occurs this function returns OK and all the next GPRS commands return OK ! To see the +CME ERROR: 536 I need to enter a GPRS command in the terminal....
}
...
static bool CGATT_Handler(adl_atResponse_t *p_kParam)
{
// When my problem occurs this handler is never called !!
}
Thanks !