Hi, In my project I want to read data from i2c and update in advertising data and the board need to advertise without time out (i.e 24x7) for these I take advertising timeout to 0. But some times unexpectedly it stops advertising after 2 days or 3 days. can any one help me how to debug to found the issue. Initializing part of the advertising is as below
static void advertising_init(void)
{
uint32_t err_code;
ble_advdata_t advdata;
ble_advdata_t scanrsp;
ble_advdata_manuf_data_t manuf_specific_data;
int8_t tx_power_level = TX_POWER_LEVEL;
// YOUR_JOB: Use UUIDs for service(s) used in your application.
static ble_uuid_t m_adv_uuids[] = {{BLE_UUID_CURR_SERVICE, BLE_UUID_TYPE_BLE}}; /**< Universally unique service identifiers. */
// Build advertising data struct to pass into @ref ble_advertising_init.
manuf_specific_data.company_identifier = 0x02F4;
manuf_specific_data.data.p_data = mf_Data;
manuf_specific_data.data.size = sizeof(mf_Data);
memset(&advdata, 0, sizeof(advdata));
advdata.name_type = BLE_ADVDATA_FULL_NAME;
advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
advdata.p_manuf_specific_data = &manuf_specific_data;
memset(&scanrsp, 0, sizeof(scanrsp));
scanrsp.p_tx_power_level = &tx_power_level;
scanrsp.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
scanrsp.uuids_complete.p_uuids = m_adv_uuids;
// ble_advdata_conn_int_t connintvls;
// connintvls.min_conn_interval = MIN_CONN_INTERVAL;
// connintvls.max_conn_interval = MAX_CONN_INTERVAL;
// scanrsp.p_slave_conn_int = &connintvls;
ble_adv_modes_config_t options = {0};
options.ble_adv_fast_enabled = BLE_ADV_FAST_ENABLED;
options.ble_adv_fast_interval = APP_ADV_INTERVAL;
options.ble_adv_fast_timeout = APP_ADV_TIMEOUT_DEFAULT;
err_code = ble_advertising_init(&advdata, &scanrsp, &options, on_adv_evt, NULL);
APP_ERROR_CHECK(err_code);
}