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

HID advertise, Beacon advertise and scanner program at the same time

Hello,

I am using following component for my project, 1-nrf51822,2-SDK 11 3-S130, 4-BLE400 board, 5-Keil IDE. I am also using SDK 11.x HID example for my base program. My goal is to have a constant beacon (always ON), so I have used advertiser_beacon_timeslot.c with no issue. So basically, my program advertises HID service, in addition to beacon data, after connection and pairing, the beacon data still is on. After disconnect from HID service the beacon still is on. Also part of my requirement is to have a scanner program always ON as well, to detect other beacon data broadcast. So I decided to use scanner_beacon_timeslot.c program. When I add scanner, everything is failing, no more beacon or HID advertising. I was hoping that I can time slot 3 data in nrf51822, HID advertise, beacon data and scanner code. Is this doable? Can I time slot all 3 in nrf51822, S130?

here is part of my code:

gap_params_init();
advertising_init();
services_init();
sensor_simulator_init();
conn_params_init();

beacon_adv_init();
scanner_init();

// Start execution.
timers_start();
err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);

beacon_start();
scanner_start();

if I comment out scanner_start(), everything works OK,

Thanks in advance

Related