cancel
Showing results for 
Search instead for 
Did you mean: 

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

SBour.9
Associate II

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?

1 REPLY 1
SBour.9
Associate II

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?