Skip to content

Allow compile time configuration of Nordic BLE parameters #7279

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

Closed
AGlass0fMilk opened this issue Jun 20, 2018 · 2 comments
Closed

Allow compile time configuration of Nordic BLE parameters #7279

AGlass0fMilk opened this issue Jun 20, 2018 · 2 comments

Comments

@AGlass0fMilk
Copy link
Member

I recently encountered an issue where custom BLE services were failing to be added to my device. I stepped through and found that there is a preallocated table of a fixed size set by the macro NRF_SDH_BLE_VS_UUID_COUNT which is populated by the mbed_lib.json file depending on what soft device you use.

From my understanding of the mbed compile-time system, there is no way to override these currently through targets or application configurations since they are fixed macros. It would be better to make these configuration parameters with custom macro names so the application can configure them down the line.

Also, I'm not sure if this was fixed in the mbed-os 5.9 error API update (having unrelated issues preventing me from updating at the moment), but it would be nice to have more verbose error output when adding custom services to the table fails. I wasn't aware of this configuration limitation and it took me a bit of searching to find out why my services weren't being added.

{
"name": "softdevice",
"macros": [
"SOFTDEVICE_PRESENT=1",
"S132",
"BLE_STACK_SUPPORT_REQD",
"NRF_SDH_CLOCK_LF_SRC=1",
"NRF_SDH_CLOCK_LF_RC_CTIV=0",
"NRF_SDH_CLOCK_LF_RC_TEMP_CTIV=0",
"NRF_SDH_CLOCK_LF_XTAL_ACCURACY=7",
"NRF_SD_BLE_API_VERSION=5",
"NRF_SDH_ENABLED=1",
"NRF_SDH_BLE_ENABLED=1",
"PEER_MANAGER_ENABLED=1",
"NRF_SDH_BLE_GATT_MAX_MTU_SIZE=23",
"NRF_SDH_BLE_OBSERVER_PRIO_LEVELS=4",
"NRF_SDH_BLE_GAP_EVENT_LENGTH=3",
"BLE_ADV_BLE_OBSERVER_PRIO=1",
"BLE_CONN_STATE_BLE_OBSERVER_PRIO=0",
"BLE_CONN_PARAMS_BLE_OBSERVER_PRIO=1",
"NRF_BLE_GATT_BLE_OBSERVER_PRIO=1",
"NRF_SDH_DISPATCH_MODEL=2",
"NRF_SDH_SOC_ENABLED=1",
"NRF_SDH_STACK_OBSERVER_PRIO_LEVELS=2",
"NRF_SDH_STATE_OBSERVER_PRIO_LEVELS=2",
"NRF_SDH_SOC_OBSERVER_PRIO_LEVELS=2",
"NRF_SDH_REQ_OBSERVER_PRIO_LEVELS=2",
"NRF_SDH_BLE_STACK_OBSERVER_PRIO=0",
"NRF_SDH_SOC_STACK_OBSERVER_PRIO=0",
"FDS_BACKEND=2",
"SWI_DISABLE1=1"
],
"target_overrides": {
"*": {
"target.features_add": ["BLE"],
"target.bootloader_img": "hex/s132_nrf52_5.0.0_softdevice.hex"
}
}
}

@ciarmcom
Copy link
Member

ARM Internal Ref: MBOTRIAGE-826

@AGlass0fMilk
Copy link
Member Author

Seems to have been taken care of by PR #6860 👍 💯
I was late to the party 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants