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

Merge HRM and iBeacon.

Hello

I'm doing a test that if it's possible to start ibeacon function when BLE is connected in nRF52840. so I merge ibeacon into HRM demo code and as you can in the following pic.

But some problem comes out when I download the code into chip.

  1. HRM service is failed ,HRM in "nRF Toolbox" app can discover my BLE device but can not connect.
  2. iBeacon is failed, i can not find my beacon with "nRF Beacon" app.
  3. When I remove InitBeacon() from "BLE_GAP_EVT_CONNECTED", the HRM works.

How can I start a beacon whatever ibeacon or Eddystone when BLE is connected?

Thank you for your kindly help.

  • Hello,

    It can be very helpful to have debug logging enabled. Often it will tell you exactly where and why the program crashed (compile with DEBUG to get verbose "crashlog"). Anyway, the advertising module has a feature that automatically restarts advertising on disconnect and it is possible that this happens before the disconnect event is received by your event handler.  Try to change the BLE_ADV_BLE_OBSERVER_PRIO configuration sdk_configh from 1 to 3 and increase the priority of your BLE event handler from 3 to 1 and see if it helps.

Related