Hi,
I’m currently experiencing some periodic MCU resets while testing the BLE Multiple central single peripheral scenario, whose root cause is not clear to me, except that the reset reason is watchdog related and happening in specific situations.
Scenario:
- I’m using nrf52832, SDK16.0.0 and s132nrf52701 and not using peer manager module, i.e., not using pairing/bonding for the BLE connectivity.
- Initially I had a single Peripheral device and multiple Central devices, where each Central could periodically report its status to the Peripheral.
-- I followed Nordic examples, using only single Central and single Peripheral and it worked having still multiple Centrals performing the reporting at the same Peripheral without issues.
-- I.e., I only considered NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1 , NRF_SDH_BLE_CENTRAL_LINK_COUNT 1 and NRF_SDH_BLE_TOTAL_LINK_COUNT 2 and did not consider any multiple concurrent connections.
-- In this 1-Peripheral N-Central scenario I had no reset issues even if not explicitly using multi concurrent connection approach.
- Then, due to distance coverage, I wanted to implement a Mesh scenario, where the device previously always considered as Peripheral could itself change its BLE Role to Central so that it could follow the devices’ statuses (including its) to its Peripheral and then change back to its Peripheral Role again.
-- Initially, I still have not considered any multiple concurrent (Central) connections approach without success, meaning the Peripheral would crash.
-- I then changed the support to multiple concurrent connections (e.g., changed the LINK COUNTs, Queued Write initialization and did not consider single m_conn_handle variable…) also without success.
Questions:
#1 – Is it still important to have multi concurrent connection support if not having Peer Management?
I.e., in which situations would it really fail for my initial approach?
#2 – What is the correct SDH_BLE_<PERIPHERAL|CENTRAL|TOTAL>_LINK_COUNT setting and its use in the initialization when willing to support single Peripheral device and 5 Central devices reporting to the Peripheral device? Is it:
- NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 5 (as Peripheral a device can only be connected to from 5 Central devices)
- NRF_SDH_BLE_CENTRAL_LINK_COUNT 1 (as Central a device can only connect to a single Peripheral device),
Or instead the one below?
- NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1 (as Central a device can only connect to a single Peripheral device ) and
-NRF_SDH_BLE_CENTRAL_LINK_COUNT 5 (as Peripheral a device can only be connected from 5 Central devices)
Additionally, I assume that NRF_SDH_BLE_TOTAL_LINK_COUNT 6 (i.e., the sum of the previous), right?
Moreover, when initializing the Queue Write (which I do not used, i.e., NRF_BLE_QWR_ENABLED 1 but NRF_BLE_QWR_MAX_ATTR 0), do we have to consider only 5 or 6 (the total) connections?
#3 – Do you recommend any example code emulating mesh, i.e., where a device behaves as a Peripheral to receive status but after aggregating some statuses, change its role to Central in order to communicate to its own Peripheral and only then change back to Peripheral?
#4 - Is there any configuration (e.g., from sdk_config.h) which could help understand where the MCU was hanged before watchdog being triggered?
Thanks in advance for you feedback.
Luis