work environment: sdk17.0.2 nrf52832 as peripheral \ nrf52840 as central
nrf52832 connect parameter:
#define APP_ADV_INTERVAL MSEC_TO_UNITS(100, UNIT_0_625_MS)
#define APP_ADV_DURATION 18000
#define APP_BLE_OBSERVER_PRIO 3
#define APP_BLE_CONN_CFG_TAG 1
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(80, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(300, UNIT_1_25_MS)
#define SLAVE_LATENCY 0
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)
#define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000)
#define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000)
#define MAX_CONN_PARAMS_UPDATE_COUNT 3
void advertising_init(void)
{
...
init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
init.advdata.include_appearance = false;
init.advdata.include_ble_device_addr = false;
init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.advdata.uuids_complete.p_uuids = m_adv_uuids;
init.advdata.p_manuf_specific_data = &manuf_data;
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
init.config.ble_adv_fast_timeout = APP_ADV_DURATION;
init.config.ble_adv_on_disconnect_disabled = false;
...
}
The question:
1. Can the above settings realize continuous broadcasting except for connection, working state and deep sleep? If not, how to set?
2. Sometimes central cann't scan a device after central disconnect the device. It seems to be connected by a central. By mobile phone, it is easy to reappear.
The process is as follows:
central: Redmi9, android 10, nrf connect app.
step 1: connected the first device(nrf52832) in NRF connect app, then DFU, then disconnected the device.
step 2: connected the second device(nrf52832) in NRF connect app, then DFU, then disconnected the device.
step 3: connected the thirst device(nrf52832) in NRF connect app, then DFU, then disconnected the device.
repeat the above step. Nrf connect app of central cann't scan the above ten devices after doing about ten steps. App can scan the device after Have to reboot the phone. Why?
Note:The phone is not set to connect automatically. And it is not set to bond.