DA14585 BLE peripheral with Beacon mode

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
koukou
Offline
Last seen:3 weeks 1 day ago
加入:2019-10-14 10:42
DA14585 BLE peripheral with Beacon mode

Dear Dialog support team,

We are working on the DA14585/DA14586-DA14531 Multiperipheral Example project and we need to configure the DA14585 in beacon mode (because we need to inform the nearby mobile phones of BLE device proximity) and we also need to configure it in peripheral mode (for central devices can connect to DA14585). So would it be possible for DA14585 to act simultaneously as beacon and peripheral or alternate between beacon mode and peripheral mode with software control?

regards,

Device:
PM_Dialog
Offline
Last seen:3 days 3 hours ago
工作人员
加入:2018-02-08 11:03
Hi koukou,

Hi koukou,

So, what you would like to do is to change the advertising between connectable and non-connectable. Did I understand correctly what is your requirement? Please correct me if I am mistaken. If yes, you can stop advertising and change the advertising mode accordingly.

Thanks, PM_Dialog

koukou
Offline
Last seen:3 weeks 1 day ago
加入:2019-10-14 10:42
thank you for reply, what is

thank you for reply, what is the order of the steps to stop the advertising and change the advertising mode every 0.5 seconds and what functions are used?

MHv_Dialog
Offline
Last seen:1 month 3 weeks ago
工作人员
加入:2013-12-06 15:10
Hi Koukou,

Hi Koukou,

One way to implement interlaced connectable and non-connectable advertising would be to use the advertising scheme DEF_ADV_WITH_TIMEOUT and set the timeout to 500ms. When advertising times out, you will get different callbacks:

  • app_on_adv_nonconn_complete, when the recently timed out advertisement was non-connectable
  • app_on_adv_undirect_complete, when the recently timed out advertisement was connectable

These callbacks are currently set to NULL (meaning nothing happens). Simply implement your own functions where you start the opposite type of advertising of what recently timed out. The two types of advertising can be set by changing the mode to GAP_GEN_DISCOVERABLE or GAP_BROADCASTER_MODE.

您可以了解更多关于implementing callbacks and changing the advertising in the "Getting Started with SDK6 Tutorial":http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/index.html

/MHv