I’m trying to sync my rtc with a ntp server but I got
Reply: AT+QNTP="ptbtime1.ptb.de"
OK
+QNTP: 5
+PDP DEACT
This is the sequence of commands soon after reboot:
// Set to 1: Full Functionality
ATparser_send_command("AT+CFUN=1");
CONTINUE_IF_NO_OK_IN_xMS(5000);
// Report Error verbose on
ATparser_send_command("AT+CMEE=2");
CONTINUE_IF_NO_OK_IN_xMS(300);
ATparser_send_command("AT+QSIMSTAT?");
CONTINUE_IF_NO_OK_IN_xMS(300);
ATparser_send_command( "AT+CPIN?" );
CONTINUE_IF_NO_OK_IN_xMS(5000);
// Network time sync with NPT server
// Germany is GMT+2 in quarters = +08
ATparser_send_command("AT+CCLK=\"04/01/01,00:00:02+08\"");
CONTINUE_IF_NO_OK_IN_xMS(300);
// I'm waiting for 0,1 or 0,5 as response
if( !radio_GPRS_network_registration(5) )
{
uart_debug("fail to register a gprs network");
continue;
}
ATparser_send_command("AT+QNTP=\"ptbtime1.ptb.de\"");
_reply = ATparser_receive_reply(5000);
if(strstr_u8( _reply, "+QNTP: 0") == NULL )
{
continue;
}
ATparser_send_command("AT+CCLK?");
CONTINUE_IF_NO_OK_IN_xMS(300);
ATparser_send_command("AT+QIDEACT");
CONTINUE_IF_NO_OK_IN_xMS(5000);
turn_on = true;
}
here is the output for each command
AT Command: AT+CFUN=1
AT Reply: AT+CFUN=1
OK
AT Command: AT+CMEE=2
AT Reply: AT+CMEE=2
OK
AT Command: AT+QSIMSTAT?
AT Reply: AT+QSIMSTAT?
+QSIMSTAT: 0,1
OK
AT Command: AT+CPIN?
AT Reply: AT+CPIN?
+CPIN: READY
OK
AT Command: AT+CCLK="04/01/01,00:00:02+08"
AT Reply: AT+CCLK="04/01/01,00:00:02+08"
OK
AT Command: AT+CGREG?
Reply: AT+CGREG?
+CGREG: 0,5
OK
AT Command: AT+QNTP="ptbtime1.ptb.de"
Reply: AT+QNTP="ptbtime1.ptb.de"
OK
+QNTP: 5
+PDP DEACT
The same code used to work but suddenly the SIM cards cannot connect anymore to NTP.
I also tried with “AT+QIACT” before checking the GPRS network, but I got at ERROR
AT Command: AT+QIACT
AT Reply: AT+QIACT
ERROR
That’s why I don’t use. Also in other post I found this image
Am I missing something?