Hi,
Is it possible to go from slow advertising to fast advertising with a button press?
I did this but it didn't work:
case BLE_ADV_EVT_FAST: #if (ENABLE_TASK_NRF_LOG) NRF_LOG_INFO("Fast advertising."); #endif // ENABLE_TASK_NRF_LOG #if ENABLE_BLE_LED_BUTTON err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING); APP_ERROR_CHECK(err_code); set_battery_led_indicate = false; #endif //ENABLE_BLE_LED_BUTTON break; case BLE_ADV_EVT_SLOW: #if (ENABLE_TASK_NRF_LOG) NRF_LOG_INFO("Slow advertising."); #endif // ENABLE_TASK_NRF_LOG #if ENABLE_BLE_LED_BUTTON err_code = bsp_indication_set(BSP_INDICATE_ADVERTISING_SLOW); APP_ERROR_CHECK(err_code); set_battery_led_indicate = false; #endif //ENABLE_BLE_LED_BUTTON // Prepare wakeup buttons. err_code = bsp_btn_ble_sleep_mode_prepare(); APP_ERROR_CHECK(err_code); break;
P.S. I slightly modified names and operation of my LED indication modes but I can clearly distinguish the two and pressing the button does not switch the LED state - that's how I can tell it didn't switch back to fast advertising.