Skip to content

Commit 08afaf2

Browse files
author
Cruz Monrreal
authored
Merge pull request #7770 from kivaisan/fix_rejoin_with_parameters
LoRa: Fix MAC initialization for connection with parameters
2 parents c10ad7f + 76d01f5 commit 08afaf2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

features/lorawan/lorastack/mac/LoRaMac.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,11 @@ lorawan_status_t LoRaMac::prepare_join(const lorawan_connect_t *params, bool is_
14191419
}
14201420
// Reset variable JoinRequestTrials
14211421
_params.join_request_trial_counter = 0;
1422+
1423+
reset_mac_parameters();
1424+
1425+
_params.sys_params.channel_data_rate =
1426+
_lora_phy->get_alternate_DR(_params.join_request_trial_counter + 1);
14221427
} else {
14231428
if ((params->connection_u.abp.dev_addr == 0)
14241429
|| (params->connection_u.abp.nwk_id == 0)

0 commit comments

Comments
 (0)