nRF Cloud device location history

I'm working with a nrf9160 custom board device using the nRF cloud location service. I'm trying to use the nRF cloud API GetLocationHistory endpoint to retrieve the previous locations. The endpoint works, but the responses only contain the MCELL/SCELL location entries and never any gps locations, even though it has successfully obtained GNSS fixes. I want to be able to see all types of location in the location history. Do I need explicitly call some functions in my firmware program to submit the GNSS locations to nRF cloud so they will appear in the location history? If yes, can you suggest an example I should look at? Thank you.
prj.conf:
# nRF Cloud
CONFIG_NRF_CLOUD_REST=y
CONFIG_NRF_CLOUD_AGPS=y
CONFIG_NRF_CLOUD_CLIENT_ID_PREFIX="xxx-"
CONFIG_MODEM_INFO=y                  
CONFIG_MODEM_INFO_ADD_NETWORK=y         

# Multicell location service selection
CONFIG_MULTICELL_LOCATION=y
CONFIG_MULTICELL_LOCATION_SERVICE_NRF_CLOUD=y
Sample response:
{
    "items": [

.

.

.

        {
            "id": "5621e58b-d3af-406a-af56-6d5eafef901d",
            "deviceId": "xxx-xxx",
            "serviceType": "SCELL",
            "insertedAt": "2026-06-09T20:28:44.435Z",
            "uncertainty": "535.38",
            "lat": "xxx",
            "lon": "xxx",
            "meta": {}
        },
        {
            "id": "8f8e3176-13cc-4407-ac65-8de421c89e79",
            "deviceId": "xxx-xxx",
            "serviceType": "SCELL",
            "insertedAt": "2026-06-09T20:28:41.378Z",
            "uncertainty": "535.38",
            "lat": "xxx",
            "lon": "xxx",
            "meta": {}
        },
        {
            "id": "4dc8cfa6-ad8d-4ac1-aafe-a089fc93d4b0",
            "deviceId": "xxx-xxx",
            "serviceType": "MCELL",
            "insertedAt": "2026-06-09T20:27:56.412Z",
            "uncertainty": "536.031",
            "lat": "xxx",
            "lon": "xxx",
            "meta": {}
        },
        {
            "id": "04bd42dc-1a9c-42f6-9a65-956f2bc21243",
            "deviceId": "xxx-xxx",
            "serviceType": "MCELL",
            "insertedAt": "2026-06-09T20:11:52.524Z",
            "uncertainty": "536.031",
            "lat": "xxx",
            "lon": "xxx",
            "meta": {}
        }
    ],
    "total": 10,
    "pageNextToken": "xxx"
}
Parents
  • Hello Stam,

    I am confirming about this with the team and will get back to you soon with an update. You can expect a response by tomorrow. Thank you for your patience. 

    Best Regards,

    Samruddhi

  • Thank you for your reply. I'm using the nrf_cloud_rest_send_location() function in nrf_cloud_rest.c to send device messages to submit the GNSS fixes. It seems to be working fine now. 

    Btw I'm working with SDK v2.3.0

    int nrf_cloud_location_send_gnss(float lat, float lon, float acc)
    {
        int err;
        struct nrf_cloud_gnss_data gnss;
    
        memset(&gnss, 0, sizeof(gnss));
    
        gnss.pvt.lat = (double)lat;
        gnss.pvt.lon = (double)lon;
        gnss.pvt.accuracy = acc;	
    	gnss.type = NRF_CLOUD_GNSS_TYPE_PVT;
    	
        err = nrf_cloud_rest_send_location(&rest_ctx, nrf_cloud_device_id, &gnss);
        if (err) {
            printk("nRF Cloud send location failed: %d\n", err);
        }
    
        return err;
    }
    

Reply
  • Thank you for your reply. I'm using the nrf_cloud_rest_send_location() function in nrf_cloud_rest.c to send device messages to submit the GNSS fixes. It seems to be working fine now. 

    Btw I'm working with SDK v2.3.0

    int nrf_cloud_location_send_gnss(float lat, float lon, float acc)
    {
        int err;
        struct nrf_cloud_gnss_data gnss;
    
        memset(&gnss, 0, sizeof(gnss));
    
        gnss.pvt.lat = (double)lat;
        gnss.pvt.lon = (double)lon;
        gnss.pvt.accuracy = acc;	
    	gnss.type = NRF_CLOUD_GNSS_TYPE_PVT;
    	
        err = nrf_cloud_rest_send_location(&rest_ctx, nrf_cloud_device_id, &gnss);
        if (err) {
            printk("nRF Cloud send location failed: %d\n", err);
        }
    
        return err;
    }
    

Children
Related