le_pos_Get2DLocation return 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 NO SAT INFO.
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");

    result = le_pos_Get2DLocation(&latitude, &longitude, &horizontalAccuracy);
    if (result == LE_OK){
        LE_INFO("Somthing went wrong... Result = %d", result);
LE_INFO("Lat = %d \tLong = %d \t HorizontalAccuracy = %d",latitude, longitude, horizontalAccuracy);



It seems like it returns LE_OUT_OF_RANGE because of the horizontalAccuracy not going through. When checking if horizontalAccuracy == INT32_MAX it was true… so i just removed it, and then it worked with result = le_pos_Get2DLocation(&latitude, &longitude, NULL);


I would like to point out that i still get NO SAT INFO when typing AT!GPSSATINFO? Someone know why?


What antenna have you connected to the GPS port?


The one that follows in the starter kit.


we dont provide a GPS antenna with the kit. Some of the forum users used the following antenna:
Adafruit: https://www.adafruit.com/product/2461

The GPS ufl is next to the main antenna ufl. Just to try, you can stick the Taoglass cellular antenna in the GPS uFl slot.


A thing i wonder about then, is how I am able to get lat, long from le_pos_Get2DLocation without an antenna connected to the GNSS Antenna port? Would like to mention that the lat long coordinates is wrong tho :stuck_out_tongue:


Is it integrated in the module?


Check post by @spmaurer. Best is to attach a good active antenna. Note if you are testing in your lab it might still not work as best is to test in the open.