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

amitgohel
Posts: 2
Joined: Sat Dec 31, 2022 1:14 pm

Re: esp_modem_at() returning partial response from AT command

Postby amitgohel » Tue Oct 22, 2024 5:09 am

I am also facing the same problem.I am able to send and receive MQTT data but when any custom code I am tring to use some unknown characters are inbetween the received data,it breaks the string and partial message is received.

If anyone know the method to send and receive the AT command in CMUX enabled, Please share.

Who is online

Users browsing this forum: No registered users and 153 guests