Questions and discussion about the geolocalization features of the TD RF modules.
omlu
 
Posts: 46
Joined: Tue Oct 06, 2015 8:27 am

Double GPS init with TD1204

by omlu Fri Nov 08, 2019 10:59 am

Hi,
More than a year ago, I used to init the GPS like this:
Code: Select all
void gpsFix(TD_GEOLOC_Fix_t *fix, bool timeout)
{
//DO SOMETHING
}
void TD_USER_Setup(void)
 {
   TD_SENSOR_Init(SENSOR_TRANSMITTER, 0, 0);
   TD_GEOLOC_Init();
   TD_GEOLOC_TryToFix(TD_GEOLOC_NAVIGATION, FIX_TIMEOUT, gpsFix);
}

And it worked for a coupe of years.
Then my newly produced devices couldn't find a GPS fix unless I restarted the TryToFix. So what I did is that I start-stop-started the GPS at init. Like so:
Code: Select all
void gpsStart(uint32_t lol, uint8_t lil)
{
   TD_GEOLOC_TryToFix(TD_GEOLOC_NAVIGATION, FIX_TIMEOUT, gpsFixing);
}

void gpsFix(TD_GEOLOC_Fix_t *fix, bool timeout)
{
//DO SOMETHING
}
void TD_USER_Setup(void) {
   TD_SENSOR_Init(SENSOR_TRANSMITTER, 0, 0);
   TD_GEOLOC_Init();
   TD_GEOLOC_TryToFix(TD_GEOLOC_NAVIGATION, FIX_TIMEOUT, gpsFix);
   TD_GEOLOC_StopFix(TD_GEOLOC_HW_BCKP);
   TD_SCHEDULER_Append(FIX_INTERVAL, 1, 0, TD_SCHEDULER_ONE_SHOT, gpsStart, 0);  //Restart GPS in 60s
}

And it worked until recently: both init method doesn't work.

So my questions are:
1) Has the TD1204 firmware changed ?
2) Where can i find the information when there is a firmware change ?
3) Is there a better way to init the GPS ? (it seems really similar to the geoloc_fix example)

Thank you,
User avatar
lcheminade
 
Posts: 146
Joined: Mon May 11, 2015 7:47 am

Re: Double GPS init with TD1204

by lcheminade Fri Nov 15, 2019 1:55 pm

Hello,

There has been no change in the TD1204's hardware ever since it was released. Moreover when you build a firmware with a SDK and load it into the TD1204, the previous firmware is fully erased by your own. Therefore when you received a brand new TD1204 it is irrelevant to know what is the firmware inside it because you will fully replace it. Even if there was no firmware at all it would not affect your code behaviour in any way.

This being said the correct usage for the GPS is :

UserSetup

TD_SENSOR_Init(SENSOR_TRANSMITTER, 0, 0);
TD_GEOLOC_Init();
TD_GEOLOC_TryToFix(TD_GEOLOC_NAVIGATION, FIX_TIMEOUT, gpsFix);


UserLoop

TD_GEOLOC_Process()


Anything else simply means something is wrong and we should first understand why.

Could you please give us more information about "gps does not work"? Does the "gpsFix" callback never get called (it should be called every seconds)? Does the module reboot?

Regards.

Loïc
Return to Geolocalization

Who is online

Users browsing this forum: No registered users and 6 guests