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

Parents
  • Hi Petter, Yes the board came up with both HID advertising and beacon broadcasting iOS id 0x4C, I left HID advertsing timer intact, used the example as it is. I could easily connect and pair to it with iphone, and then as soon as I brought another ibeacon board with correct Major and Minor value close to this board, this board LED starts blinking, as it should by recognizing the 2 values in scanner handler routine. Again worked perfect. So all 3 feature are on. The important part for me was to keep beacon broadcasting and scanner ON 100%.

Reply
  • Hi Petter, Yes the board came up with both HID advertising and beacon broadcasting iOS id 0x4C, I left HID advertsing timer intact, used the example as it is. I could easily connect and pair to it with iphone, and then as soon as I brought another ibeacon board with correct Major and Minor value close to this board, this board LED starts blinking, as it should by recognizing the 2 values in scanner handler routine. Again worked perfect. So all 3 feature are on. The important part for me was to keep beacon broadcasting and scanner ON 100%.

Children
No Data
Related