Skip to main content
SBour.9
Associate II
January 16, 2020
Question

Is it possible to set the systime to the server network time using MAC command in a Class A device?

  • January 16, 2020
  • 1 reply
  • 653 views

I am using the software I-CubeLoRaWAN to create a class A end node from a STM32 and SX1272. From the spec the protocol LORAWAN have a MAC command to request the server time. This function is implemented in I-CubeLoRaWAN (file lora.c) :

#ifdef LORAMAC_CLASSB_ENABLED
#if defined( USE_DEVICE_TIMING )
static LoraErrorStatus LORA_DeviceTimeReq( void){ 
 MlmeReq_t mlmeReq;
 mlmeReq.Type = MLME_DEVICE_TIME;
 if( LoRaMacMlmeRequest( &mlmeReq ) == LORAMAC_STATUS_OK ){
 return LORA_SUCCESS; 
 }else{ 
 return LORA_ERROR;
 }
}

As showed in the code, the function is not defined if LORAMAC_CLASSB_ENABLED is not defined. Since i am using a class A end node how should i modify this?

This topic has been closed for replies.

1 reply

SBour.9
SBour.9Author
Associate II
January 16, 2020

Is it better to define LORAMAC_CLASSB_ENABLED even if i stay with a class A or modify the code to define the function even if LORAMAC_CLASSB_ENABLED is not define?