I posted this same question to UBLOX forum and the only recommendation I got is to increase the TIMEOUT to a couple of minutes. But even I do a AT+ULOC=2,2,0,360,100,1 the Arduino Serial Monitor just displays OK and ends there.
I noticed that other AT commands usually returns URC then OK in that sequence.
+UPSND: 0,8,1 ======> OK
+UPSND: 0,0,“100.101.71.204” ======> OK
+CSQ: 18,99: ======> OK
However, +ULOC is expected to return OK then URC (reverse sequence):
OK ======> +UULOC: 07/11/2016,20:28:44.000,41.3989758,-79.4511917,0,399
Now I’m thinking about the possibility that URC of +ULOC is not being processed correctly by SerialCloud.available() and/or SerialCloud.read(). I hope this can be ruled out so I can proceed with my debugging.
Here is the code block I used to execute the above:
void setupGPRS() {
Serial.println(“1 = AT”);
sendAT(10, “AT\r\n”);
Serial.println(“2 = AT+UPSD=0,1”);
sendAT(3000, “AT+UPSD=0,1,"my.apn.com"\r\n”);
Serial.println(“3 = AT+UPSDA=0,1”);
sendAT(3000, “AT+UPSDA=0,1\r\n”);
Serial.println(“4 = AT+UPSDA=0,3”);
sendAT(5000, “AT+UPSDA=0,3\r\n”);
Serial.println(“5 = AT+UPSND=0,8”);
sendAT(1000, “AT+UPSND=0,8\r\n”);
Serial.println(“6 = AT+UPSND=0,0”);
sendAT(1000, “AT+UPSND=0,0\r\n”);
Serial.println(“7 = AT+CSQ”);
sendAT(1000, “AT+CSQ\r\n”);
Serial.println(“8 = Get Cell Location”);
sendAT(360000, “AT+ULOC=2,2,0,360,100,1\r\n”); “AT+ULOC=2,2,0,360,100,1\r\n”);
}
//AT COMMAND PROCESSING
void sendAT(int timeout, char *ATCommand) {
returnChar = “”;
SerialCloud.write(ATCommand);
delay(timeout);
while (SerialCloud.available()) {
inputChar = (char)SerialCloud.read();
returnChar += inputChar;
}
Serial.print("Return value = ");
Serial.println(returnChar);
delay(2000);
}