Fix for BLE restart after a BLE end #37
Open
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
If the user sketch starts and stops BLE several time, after the first time, the BLE stack advertises the wrong BLE mac address ( "AA:AA:AA:AA:AA:AA" ). This is caused because the BLE.end() function of ArduinoBLE doesn't turn off correctly the BLE mbed-os library.
Here a cketch for reproducing the bug.
Here the fix on ArduinoBLE
This PR is needed for solving the problem since that after the second wake up the radio chip is not reset and sends an erroneous HCI response that is not related to the Reset request performed by the BLE stack during the init phase. With this change this packet will be ignored, instead of hanging the board. This solution works since the radio chip sends as second HCI response the expected reset response.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers