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

Advertising as two peripherals at once

Hi there,

We're looking at doing something with beacons so that we can make use of the way iOS handles scans for them in the background differently to other peripherals. Beacons are generally not connectable - they just advertise and the central scans and sees the advertising packets, but never connects.

What I'd like to do, using an nRF52832 with SDK 13.0.0 and SD 132, is appear as a beacon as far as the BLE stack on iOS is concerned, but actually accept connections from the iOS central (and also an Android central). I'd also like to add some characteristics and generally behave like a regular peripheral, apart from the advertising requirements for beacons.

Is this possible? Could it be done by advertising twice in the one device, once as a beacon and once with a fully custom set of characteristics and accepting connections?

The experimental_ble_app_mulitperipheral at first looks relevant, but on closer inspection it's just one peripheral accepting connections from multiple centrals, I think.

  • Hi Eliot,

    Indeed you can be switching between two (or even more) advertising (and scan response) packets, radio_notification API is the best (unless you have some connection in the parallel which makes it little bit harder). The only problem is when you want to also change things like connectable/not connectable, whitelist, channel map etc., that is not well supported by Nordic Soft Device GAP API. See more examples here and here and elsewhere on this forum (and I can tell you that iOS devices love it, GAP Peripherals being iBeacon and at the same time something else, you can be switching adv. address to appear as completely independent devices or not, beside small confusion in some applications BLE stacks in mobiles seems to be completely OK with both variants and iOS devices especially react on iBeacon broadcasting in situations when nothing else would wake them up).

Related