Hello.
I am now implementing communication to multiple peripheral devices based on the multi-roll project “ble_app_multirole_lesc”. (image1)
Central link after setting memory in previous article (https://devzone.nordicsemi.com/f/nordic-q-a/51784/about-memory-error-of-multiple-communication-in-ble) Changed the value of the count variable.
The next thing to do is
First, commented out "filter_settings_change ()" because it uses the same service.
Second, I came up with the idea of increasing the number of connection handle variables by the number of connections, referring to the sample projects “ble_app_hrs_rscs” and “ble_app_multilink_central”.
Changed the connection handle variable to the following element specification when using it as an array type.
1.
BLE_DB_DISCOVERY_DEF (m_db_disc);
⇒BLE_DB_DISCOVERY_ARRAY_DEF (m_db_discovery, NRF_SDH_BLE_CENTRAL_LINK_COUNT)
2.
static uint16_t m_conn_handle_hrs_c = BLE_CONN_HANDLE_INVALID;
⇒static uint16_t m_conn_handle_hrs_c [NRF_SDH_BLE_CENTRAL_LINK_COUNT] = BLE_CONN_HANDLE_INVALID;
3.
if (m_conn_handle_hrs_c == "XXXXX")
⇒ if (m_conn_handle_hrs_c [current_handle] == "XXXXX")
4.
m_conn_handle_hrs_c = "XXXXX"
⇒m_conn_handle_hrs_c [current_handle] = "XXXXX"
When the build was executed with the above changes, the following error occurred. (image2)
-------------------------------------------------- -----------------------------------------
invalid initializer
in expansion of macro 'BLE_CONN_HANDLE_INVALID'
-------------------------------------------------- ----------------------------------------
The environment is as follows.
SoftDevice: S132
IDE: SES
BLE Device: NRF52832
SDK version: 15.30
peripheral project: ble_peripheral⇒ble_app_hrs
multirole project: experimental⇒ble_app_multirole_lesc
Please tell me what to do. Thank you.