diff --git a/Projects/B-L072Z-LRWAN1/Applications/LoRa/AT_Slave/LoRaWAN/App/src/lora.c b/Projects/B-L072Z-LRWAN1/Applications/LoRa/AT_Slave/LoRaWAN/App/src/lora.c index 0318bced..6f6eb1dd 100644 --- a/Projects/B-L072Z-LRWAN1/Applications/LoRa/AT_Slave/LoRaWAN/App/src/lora.c +++ b/Projects/B-L072Z-LRWAN1/Applications/LoRa/AT_Slave/LoRaWAN/App/src/lora.c @@ -891,7 +891,11 @@ int16_t lora_config_rssi_get(void) void lora_config_tx_datarate_set(int8_t TxDataRate) { - lora_config.TxDatarate = TxDataRate; + mibReq.Type = MIB_CHANNELS_DATARATE; + mibReq.Param.ChannelsDatarate = TxDataRate; + if (LoRaMacMibSetRequestConfirm(&mibReq) != LORAMAC_STATUS_PARAMETER_INVALID) { + lora_config.TxDatarate = TxDataRate; + } } int8_t lora_config_tx_datarate_get(void)