Expected response:
+QGPSLOC: 061951.000,3150.7223N,11711.9293E,0.7,62.2,2,000.00,0.0,0.0,110513,09
But I am getting: 00,0.0,0.0,110513,09 Just the few tail end characters.
Here is the code which I am calling
Code: Select all
char loc[100]; // = "+QGPSLOC: 061951.000,3150.7223N,11711.9293E,0.7,62.2,2,000.00,0.0,0.0,110513,09";
while (1)
{
memset(loc, 0, sizeof(loc)); // Clear the buffer
err = esp_modem_at(dce, "AT+QGPSLOC=0\r", loc, 10000);
if (err != ESP_OK)
{
ESP_LOGE(TAG, "Get Location failed with %d", err);
// return;
}
else
{
ESP_LOGI(TAG, "Location: %s", loc);
}
vTaskDelay(1000 / portTICK_PERIOD_MS);
}