diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index a841d28a8..bb318aa49 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -2219,7 +2219,7 @@ bool LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd, bool saveToEeprom) { } else if (this->band->dataRates[drUp] != RADIOLIB_LORAWAN_DATA_RATE_UNUSED) { // check if the module supports this data rate - DataRate_t dr = { .lora = { .bandwidth = 0, .codingRate = 0, .spreadingFactor = 0 } }; + DataRate_t dr; findDataRate(drUp, &dr); state = this->phyLayer->checkDataRate(dr); if(state == RADIOLIB_ERR_NONE) {