Static Random Address is set only when _ownBdaddrType == STATIC_RANDOM_ADDR
The BLELocalDevice::address() method returns the default address of the device if the address type is PUBLIC_ADDRESS, otherwise it returns a static random address. Previously, the device received a static random address, but the method returned the public address, which was confusing.
I have added an @note with the reason for the changes. They can be removed from the code.
Changes tested using P-NUCLEO-WB55 and a phone.
Please feel free to test further and make any changes to the code.
Merging commits with Arduino BLE and https://github.com/arduino-libraries/ArduinoBLE/pull/141
Device pairing works (tested with phone).
Changes made to BLELocalDevice:
I have added an @note with the reason for the changes. They can be removed from the code.
Changes tested using P-NUCLEO-WB55 and a phone.
Please feel free to test further and make any changes to the code.