-
Notifications
You must be signed in to change notification settings - Fork 125
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
Enable inclusion of softdevice #139
Conversation
Thanks for the PR! |
Do the BLE examples work with the S132 SoftDevice? |
Hm I got the S132 from platform-nordicnrf52/examples/arduino-ble-led/platformio.ini Lines 10 to 13 in 58ec6d6
with which it builds.. I guess that won't run then during runtime? I haven't gotten feedback from https://community.platformio.org/t/bbc-microbit-v2-cannot-compile-bleperipheral-library/25688/7?u=maxgerhardt regarding it working :/ nRF52833 is indeed the chip on the BBC Micro:bit 2 per board definitoin. |
Yeah, I would guess this would probably crash when the code tries to call any of the SoftDevice functionality. Maybe without using any BLE code an Arduino sketch could run without errors, but this might likely trip people trying to use Bluetooth and not knowing why their programme stops working. |
Well but then the next problem is that the nrf5 SDK only seems to have SoftDevice choices that are not compatible with this chip, which is extremely weird. (https://github.com/platformio/builder-framework-arduino-nrf5/blob/08ccc03196db3c58fbd52ddd55b20ea406c927ae/nrf5.py#L129-L134). |
The choices for the MicroBitV2 softdevices is literally empty in that core. https://github.com/sandeepmistry/arduino-nRF5/blob/master/boards.txt#L84-L87 Did they support a bluetooth board there without bluetooth functionality? |
We now depend on sandeepmistry/arduino-nRF5#483. |
@ivankravets please revert this PR, per sandeepmistry/arduino-nRF5#483 (comment) the core does not support bluetooth functionality and using the S132 softdevice seems very wrong per comments above. Issue must be fixed in the Arduino core. |
Thanks! Done! |
Per https://community.platformio.org/t/bbc-microbit-v2-cannot-compile-bleperipheral-library/25688.
Without this flag, the builder script won't include the softdevice needed for bluetooth.
https://github.com/platformio/builder-framework-arduino-nrf5/blob/08ccc03196db3c58fbd52ddd55b20ea406c927ae/nrf5.py#L129-L134
And hence, simple sketches needing bluetooth fail to compile, as e.g.
with
src\main.cpp
with errors like
I think the soft-device should be enabled by default, especially since the user fix, adding
build_flags = -DNRF52_S132
to theplatformio.ini
, is not documented on Nordic nRF52.Although this flag does exist in example project like https://github.com/platformio/platform-nordicnrf52/blob/master/examples/arduino-ble-led/platformio.ini, it's rather well-hidden.