Closed SebDominguez closed 2 years ago
Ok so the solution is to isTxConfirmed = true;
just before sending the payload and then set it to isTxConfirmed = false;
inside the dev_time_updated
callback
inside your loop you need to:
if (timeReq) {
isTxConfirmed = true;
timeReq = false;
MlmeReq_t mlmeReq;
mlmeReq.Type = MLME_DEVICE_TIME;
LoRaMacMlmeRequest(&mlmeReq);
}
and then the callback should look like this:
void dev_time_updated() {
isTxConfirmed = false;
led.colorDelay(magenta, 500);
sysTimeCurrent = TimerGetSysTime();
setTime((time_t)sysTimeCurrent.Seconds);
}
I don't know if this is by design or a bug, but if I try to use
timereq
while setting myuplinkmode
toUNCONFIRMED
first ofdev_time_updated()
is never triggered (but I successfully get the current time) and the second thing (more annoying) is that the CubeCell is sending infinite joins...UNCONFIRMED
CONFIRMED