Why doesn't the scan_evt_handler get called in the ble_app_uart_c sample under nRF5_SDK_17.0.2_d674dde conditions?
I've tried various things, but neither scan_evt_handler nor ble_evt_handler gets called.
Why doesn't the scan_evt_handler get called in the ble_app_uart_c sample under nRF5_SDK_17.0.2_d674dde conditions?
I've tried various things, but neither scan_evt_handler nor ble_evt_handler gets called.
Thanks for the advice.
<info> app_timer: RTC: initialized.
<info> app: err_code = nrf_sdh_enable_request:0
<info> app: err_code = nrf_sdh_ble_default_cfg_set:0
<info> app: err_code = nrf_sdh_ble_enable:0
<info> app: err_code = nrf_ble_scan_init:0
<info> app: BLE UART central example started.
<info> ble_scan: sd_ble_gap_scan_start:Scanning
<info> app: Central;Scanning started
What is NRF_SDH_BLE_OBSERVER run3?
NRF_SDH_BLE_OBSERVER(m_scan_observer, APP_BLE_OBSERVER_PRIO, nrf_ble_scan_on_ble_evt, &m_scan);
NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_handler, NULL);
Is the above correct?
Is anything else needed?
Hello,
Maybe you are doing something similar already to determine whether callback is invoked, but could you try adding the log print line below to your event handler to see if the message gets printed or not?

static void scan_evt_handler(scan_evt_t const * p_scan_evt)
{
ret_code_t err_code;
nrf_gpio_pin_toggle(LED1_PIN); // デバッグ用
NRF_LOG_INFO("scan_evt_handler called, id=%d", p_scan_evt->scan_evt_id);
I'm putting it in.
Did you already have toggling of the LED in this callback?