-
Notifications
You must be signed in to change notification settings - Fork 222
Fix for BLE restart after a BLE end on portenta based devices #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for BLE restart after a BLE end on portenta based devices #374
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
eab5631
to
1b1db35
Compare
This comment was marked as outdated.
This comment was marked as outdated.
1b1db35
to
55c343a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@fabik111 isn't hciTrSerialRxIncoming
available only for mbed palatform? if so I think we should wrap all the changes inside the #ifdefs
If i recall correctly arduino/mbed-os#37 is not really needed, can you confirm?
If i recall correctly arduino/mbed-os#37 is not really needed, can you confirm?
Yeah I confirm that after more testing with mbed core v 4.2.4 and without that changes all is working . I would like to keep open (or in draft) that PR since I opened after I got strange errors during the begin after an end, so if the problem happens again we already have the fix.
55c343a
to
bbc2baa
Compare
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 9.62%. Comparing base (
9712cb1
) to head (bbc2baa
).
Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #374 +/- ## ====================================== Coverage 9.62% 9.62% ====================================== Files 28 28 Lines 3656 3656 ====================================== Hits 352 352 Misses 3304 3304
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
On portenta based board, 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 sketch for reproducing the bug.
The fix improves the HCICordioTransportClass::end() calling the ble.shutdown() of mbed-os BLE library and restores the default HCI data received handler to make a valid initialization of the BLE chip at the coming restart.
This PR depends on this PR on the mbed-os repository; do not merge separately.