1.0.3 flag added and add_device_time_req updated to not support 1.0.2

feature-lorawan-1-1
Antti Kauppila 2018-10-11 14:53:44 +03:00
parent cba835bbad
commit 78a04ec77c
2 changed files with 6 additions and 0 deletions

View File

@ -440,6 +440,11 @@ lorawan_status_t LoRaMacCommand::add_device_mode_indication(uint8_t classType)
lorawan_status_t LoRaMacCommand::add_device_time_req()
{
//App developer must know if the server version is 1.0.3 (or greater)
//1.0.2 does not support this MAC command and our stack does not support pre 1.0.2 versions
if (LORAWAN_VERSION_1_0_2 == MBED_CONF_LORA_VERSION) {
return LORAWAN_STATUS_UNSUPPORTED;
}
lorawan_status_t ret = LORAWAN_STATUS_LENGTH_ERROR;
if (cmd_buffer_remaining() > 0) {
mac_cmd_buffer[mac_cmd_buf_idx++] = MOTE_MAC_DEVICE_TIME_REQ;

View File

@ -52,6 +52,7 @@
#define MSG_PROPRIETARY_FLAG 0x08
#define LORAWAN_VERSION_1_0_2 0
#define LORAWAN_VERSION_1_0_3 1
#define LORAWAN_VERSION_1_1 10
/**