sm: use static random address after power up

This commit is contained in:
Matthias Ringwald 2022-08-22 16:40:47 +02:00
parent 74d525e6ef
commit 4a688bd119
2 changed files with 7 additions and 2 deletions

View File

@ -18,7 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- embedded audio: mono audio is played on both channels if HAVE_HAL_AUDIO_SINK_STEREO_ONLY is defined
### Fixed
- GAP: use static random address after power up
### Changed
- HCI Dump: provide log level to log_message implementation
- GAP: replace BTSTACK_EVENT_DISCOVERABLE_ENABLED with BTSTACK_EVENT_SCAN_MODE_CHANGED

View File

@ -3692,7 +3692,11 @@ static void sm_event_packet_handler (uint8_t packet_type, uint16_t channel, uint
#endif
// restart random address updates after power cycle
gap_random_address_set_mode(gap_random_adress_type);
if (gap_random_adress_type == GAP_RANDOM_ADDRESS_TYPE_STATIC){
gap_random_address_set(sm_random_address);
} else {
gap_random_address_set_mode(gap_random_adress_type);
}
break;
case HCI_STATE_OFF: