EC200U-CN-AA-N05-SGNSA : A-GPS Data Download Failing in QuecOpen C SDK

Hi Quectel Team and community,

I am trying to implement A-GPS on the EC200U-CN-AA-N05-SGNSA module using the QuecOpen C SDK.

My code successfully registers to the network, establishes a data call using APN "jionet", and successfully calls ql_gnss_agps_param_cfg and ql_gnss_agps_cfg(AGPS_GNSS_ENABLE). However, when checking the data traffic counter (ql_nw_get_data_count), the bytes downloaded remain at 0, meaning no A-GPS data injection is occurring.

Here is my current implementation:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>

#include “ql_api_osi.h”
#include “ql_api_nw.h”
#include “ql_api_datacall.h”
#include “ql_uart.h”
#include “ql_gnss.h”

#define QL_UART_DEBUG_PORT QL_USB_PORT_MODEM
#define APP_DEBUG_TX_BUF_SIZE 1024

#define AGPS_APN “jionet”
#define APP_AGPS_URL “http://quectel-api1.rx-networks.cn/rxn-api/locationApi/rtcm”

static ql_task_t javid_gps_task = NULL;

static void uart_debug_init(void)
{
ql_uart_config_s uart_cfg = {0};
uart_cfg.baudrate = QL_UART_BAUD_115200;
uart_cfg.data_bit = QL_UART_DATABIT_8;
uart_cfg.stop_bit = QL_UART_STOP_1;
uart_cfg.parity_bit = QL_UART_PARITY_NONE;
ql_uart_set_dcbconfig(QL_UART_DEBUG_PORT, &uart_cfg);
ql_uart_open(QL_UART_DEBUG_PORT);
}

static void debug_print(const char *fmt, …)
{
va_list ap;
char buf[APP_DEBUG_TX_BUF_SIZE];
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
ql_uart_write(QL_UART_DEBUG_PORT, (unsigned char *)buf, strlen(buf));
}

static void ql_gnss_notify_cb(uint32 ind_type, ql_uart_port_number_e port, uint32 size)
{
if (ind_type == QUEC_UART_RX_RECV_DATA_IND)
{
unsigned char *recbuff = calloc(1, QL_UART_RX_BUF_SIZE);
if (recbuff != NULL) {
int ret = ql_gnss_nmea_get(port, recbuff, size);
if (ret >= 0) {
debug_print(“[GNSS_CB] Drained %d bytes\r\n”, size);
}
free(recbuff);
}
}
}

static void javid_gps_app_thread(void *arg)
{
uart_debug_init();
debug_print(“[MAIN]======= A-GPS TEST START =======\r\n”);

if (ql_set_data_call_asyn_mode(0, 1, false) == QL_DATACALL_SUCCESS)
    debug_print("[BOOT] Datacall async mode enabled\r\n");

// 1. Wait for Network Registration
while(ql_network_register_wait(0, 1000) != QL_NW_REG_SUCCESS)
{
    debug_print("[DATACALL] Waiting for network...\r\n");
}

// 2. Start Data Call
if(ql_start_data_call(0, 1, QL_PDP_TYPE_IP, AGPS_APN, NULL, NULL, 0) == QL_DATACALL_SUCCESS)
{
    debug_print("[MAIN] Connected TO INTERNET\r\n");
}
else
{
    debug_print("[MAIN] Failed TO Connect TO INTERNET\r\n");
    return;
}

// 3. Configure A-GPS server parameters
if(ql_gnss_agps_param_cfg(1,
                          "http://quectel-api1.rx-networks.cn/rxn-api/locationApi/rtcm",
                          "wLgWwv6JQt",
                          "Quectel",
                          "aFltUERDZzZxeTY5cEp2eA==") == QL_GNSS_SUCCESS)
{
    debug_print("[MAIN] AGPS PARAMETER CONFIGURE SUCCESS\r\n");
}

// Capture baseline network usage
ql_nw_data_count_info_s before = {0};
ql_nw_get_data_count(0, &before);

// 4. Enable AGPS Configuration
ql_gnss_agps_cfg(AGPS_GNSS_ENABLE);

// 5. Turn GNSS Engine ON
ql_gnss_switch(GNSS_ENABLE);
ql_gnss_callback_register(ql_gnss_notify_cb);

// 6. Monitor Downlink traffic (A-GPS injection tracking)
ql_nw_data_count_info_s after = {0};
for (int i = 0; i < 10; i++)
{
    ql_rtos_task_sleep_s(2);
    ql_nw_get_data_count(0, &after);
    uint64_t delta = after.downlink_data_count - before.downlink_data_count;
    debug_print("[AGPS_TEST] t=%ds delta: %llu bytes\r\n", (i+1)*2, delta);
}

while(1) { ql_rtos_task_sleep_ms(100); }

}

int ql_javid_gps_app_init(void)
{
return ql_rtos_task_create(&javid_gps_task, 16*1024, APP_PRIORITY_NORMAL, “JavidGps”, javid_gps_app_thread, NULL, 5);
}

My Questions:

  1. Is there an explicit API command I am missing to actively trigger the A-GPS HTTP download (like ql_gnss_agps_start() or similar)?

  2. Does the standard QuecOpen SDK for EC200U automatically download the data upon ql_gnss_switch(GNSS_ENABLE), or do I need to explicitly inject the HTTP download manually via custom socket logic?

  3. Could you provide a working A-GPS example source file or application note for this specific firmware/chipset?

Module will automatically download AGPS data from server. Don’ t need custom socket.

It is simple to enable agps. Please refer to below screenshot.