This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51 scan and advertise

HI, all Nordic Developer

I know that the S130 soft-driver supports both functions concurrently. But, I am trying to combine ble_app_beacon and ble_app_uart_c to perform scanning and broadcasting simultaneously/alternatively. I am still new to nRF development. The coding in my main function is as following:

 uint32_t err_code;
// Initialize.
err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);
APP_ERROR_CHECK(err_code);
ble_stack_init();
buttons_leds_init();
db_discovery_init();
uart_init();
gpio_init();
nus_c_init();
scan_start();
advertising_init();
advertising_start();

But, it seems like my nrf51 only broadcasting beacon and it does not scan for beacon at all. What is my mistake, and any reference for me to refer?

Related