-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
nrf/bluetooth: Add support for nimble based ubluetooth. #8318
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8318 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21877 21877
=======================================
Hits 21558 21558
Misses 319 319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Now tested on nrf52840 dongle with the Adafruit UF2 bootloader: https://github.com/adafruit/Adafruit_nRF52_Bootloader/releases/download/0.6.3/pca10059_bootloader-0.6.3_s140_6.1.1.zip Flashed that on with nrfutil following adafruit instructions
It reboots in mass storage mode. While this bootloader comes with a copy of the softdevice bundled, micropython will happily flash over the top of that. Apparently the adafruit uf2 bootloader live checks if SD is installed and can work with/without it just fine - however no BLE OTA updates without it. I compiled this current commit (fea9f0d) again with DFU=1 then converted the hex to uf2
nrf52840_micropython_ubluetooth_fea9f0d0.uf2.zip Then drag and drop the uf2 onto the board bootloader. double click the reset switch to get back into bootloader. |
Note that there is a copy of |
fea9f0d
to
364d085
Compare
Ok, I've tried running the ble multitests... it didn't go great. Initially they all failed, found a few issues, fixed a few issues.
I haven't looked into these failures specifically yet, other than the
|
364d085
to
6e8cd9a
Compare
So coming back to this, for some reason the previous approach to flashing adafruit uf2 bootloader on the nordic nrf52840 dongle won't work for me anymore. Pressing the right-angle button on the dongle puts it into bootloader mode, at which point I try:
Same deal running in linux, no change with newer So downloaded the hex of the bootloader instead and convert it:
Then try to flash it
So yeah, I gave up on adafruit and uf2 bootloader.
that works! ok, back to testing multi_bluetooth tests... |
remove last uses of 'u' prefix
6e8cd9a
to
11d9121
Compare
Code size report:
|
11d9121
to
21f123c
Compare
21f123c
to
6eb6155
Compare
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
a5516fa
to
11c6b03
Compare
It seems most multitests are unreliable, occasionally failing with a timeout. |
I had noticed that when adapting the NINAW10 package for the SAMD and MIMXRT port. Some tests fail always, some tests fail never, some sometimes. Using the ESP_HOSTED package is much more reliable, even if both rely on nimble. With ESP_HOSTED still some tests fail nearly always (like deepsleep and stress_log_filesystem, but the other tests pass fine. The list below shows the success rate with the NINAW10 package of 100 attempts.
|
That's really interesting. The tests I was having issues with seemed fine going from pyb-d to stm32wb55 so it's definitely the nrf that's got issues compared to them. I did some more testing and suspect my soft timer integration might not be working, I'll want to get a debugger connected to check what it's actually doing. |
For me, the BLE multitests are very robust when testing using PYBD-SFx and ESP32 boards, which use NimBLE. Maybe occasionally one of them will fail, but it's not often. |
There are no problems in testing with PYBD or ESP32. Since both NINAW10 and ESP_HOSTED use the ESP32 implementation of BLE, but with a different version of the ESP_IDF (3.x vs. 5.x), it looks like that make the difference. |
0b200ce
to
5c7d598
Compare
Signed-off-by: Andrew Leech <andrew@alelec.net>
Signed-off-by: Andrew Leech <andrew@alelec.net>
Signed-off-by: Andrew Leech <andrew@alelec.net>
These can cause confusion when they don't match cpu in use. No change in functionality as they're not used by nimble codebase. Signed-off-by: Andrew Leech <andrew@alelec.net>
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Signed-off-by: Andrew Leech <andrew@alelec.net>
5c7d598
to
971407a
Compare
I've rebased this to current master but haven't yet re-tested anything |
Initial support for nimble based
ubluetooth
support on nrf port. Using this replaces any need for the softdevice.Has only been tested on nrf52840 dongle.
TODO:
make DEBUG=1 DFU=0
firmware with jlink.