2025-05-21 12:42 AM
Good day
I am currently trying to run the end_node sample located on the STM32Cube_FW_WL_V1.3.1 package. I would like to know if i can have some guideline on how to use LmHandlerDeviceTimeReq().
Which class do i need to use?
What lora server allows the time request?
How do i check if the MAC request is even sending? Should I see this on the Logs under my application located on the server?
The request currently is not updating my system time. The request is currently being done in a callback after a successful join.
static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
{
/* USER CODE BEGIN OnJoinRequest_1 */
if (joinParams->Status == LORAMAC_HANDLER_SUCCESS)
{
APP_LOG(TS_ON, VLEVEL_L, "JOINED\n");
// Send time request
if (LmHandlerDeviceTimeReq() == LORAMAC_HANDLER_SUCCESS)
{
APP_LOG(TS_ON, VLEVEL_L, "DeviceTimeReq sent.\n");
}
}
/* USER CODE END OnJoinRequest_1 */
}
After the request is sent successfully, the below lines are never run.
static void OnSysTimeUpdate(void)
{
/* USER CODE BEGIN OnSysTimeUpdate_1 */
SysTime_t time = SysTimeGet();
APP_LOG(TS_ON, VLEVEL_L, "Network Time: %lu (UNIX timestamp)\n", time.Seconds);
/* USER CODE END OnSysTimeUpdate_1 */
}
My setup is as follows:
This functionality is crucial to our project .
thank you in advance!