esp_modem_at() returning partial response from AT command

indigilog
Posts: 2
Joined: Fri Jan 05, 2024 8:27 am

esp_modem_at() returning partial response from AT command

Postby indigilog » Sat Feb 10, 2024 4:28 pm

Hello, I am using esp_modem component to communicate with EC200 Quectel SIM module to get GPS location data. I used initialise the module and started GPS context and trying to fetch location using "AT+QGPSLOC=0\r" command. But the method is only returning a partial response

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);
        }

Who is online

Users browsing this forum: No registered users and 87 guests