le_pos_Get2DLocation returns LE_OUT_OF_RANGE

I’m trying to make a little testprogram that will write location in the log. When started it only returns result = -3, which is LE_OUT_OF_RANGE. A thing to notice is when running AT!GPSSATINFO? if that is the right syntax, it returns 0 satellites.
I’m using the mangOH Red starter kit with the WP8548. I’ve heard some problems with the antenna that follows, is this the case?

The code looks like this:

le_result_t result;
int32_t latitude;
int32_t longitude;
int32_t horizontalAccuracy;

le_posCtrl_ActivationRef_t posCtrlRef = le_posCtrl_Request();
if (!posCtrlRef)
{
    LE_ERROR("Can't activate the Positioning service");
    exit(1);
}

LE_INFO("CHECKING 2D POSITION");
while(true){
    result = le_pos_Get2DLocation(&latitude, &longitude, &horizontalAccuracy);
    if (result == LE_OK){
        LE_INFO("OK");
        break;
    }
    else{
        LE_INFO("Somthing went wrong... Result = %d", result);
        sleep(3);
    }
}
LE_INFO("Lat = %d \tLong = %d \t HorizontalAccuracy = %d",latitude, longitude, horizontalAccuracy);

`

Hello,

When user calls le_posCtrl_Request() API, it internally starts gnss engine.
After gnss engine gets started, it requires some delay to work in fully functional state.
I have seen there is a delay of 120 seconds in one of the integration test of position control application.
So put at least 120 seconds of delay before calling le_pos_Get2DLocation() API in your app.

Thanks,
Pinkesh Shah