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

How to change Peripheral Role to Central Role without having concurrent Role?

How to change Peripheral Role to Central Role without having concurrent Role?

I know S130 Can have 8 Concurrent Role as Central, Peripheral, Observer, Broadcaster.

But I'd like to make one Single Role, not as an concurrent Role.

For Example, When this DEVICE A turns on for the first time, It needs to work as Peripheral Role till Central device Connect this. When the dedicated work is done, this Central Role disconnects it's connection, and DEVICE A changes it's role from peripheral to Central Role. And this DEVICE A connects to other peripheral device. And when some dedicated work is done, DEVICE A disconnect's it's connection. And DEVICE A REPEATS THIS PROCESS.

Why I would like not to make Concurrent Role is to make other devices not to search this DEVICE A. If DEVICE A is in Central Role, it can't be found by other devices. (Also, It's low of battery power, so I must make it low powered.)

In this scenario, how I can make this done with Softdevice? How do I have to set PERIPHERAL_LINK_COUNT and CENTRAL_LINK_COUNT ? (does it makes any affect?)

And How can I change to Central Role? Can I just (literally JUST) change to Central just after ble_advertising_start?

Is there any Example with this changing Central and Peripheral Role within Single app?

Related