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

How to disconnect and enter to advertising without reconnecting to latest device

Hi,

On a button press I need to enter to disconnect from the currently connected device and then start advertising in order to allow a new device to connect.

I manage to disconnect and put the device in FAST_ADV but when the master device detects it, it sends a connection request, so I need to prevent the nrf from accepting connection queries from the latest master. 

How to do that ?

Thanks a lot for your help.

Parents
  • Hi

    You can't stop a peripheral from connecting to a master in BLE. If the slave receives a connection request it will automatically connect, so you'll have to find a way to stop the advertising device from getting that connection request in the first place if you want it to connect to another master. 

    This issue has come up before and is discussed in this thread. Additional things you can do to discover the other device is to lower the TX power of the advertising device so that it will only discover devices in close proximity of itself.

    Best regards,

    Simon

Reply
  • Hi

    You can't stop a peripheral from connecting to a master in BLE. If the slave receives a connection request it will automatically connect, so you'll have to find a way to stop the advertising device from getting that connection request in the first place if you want it to connect to another master. 

    This issue has come up before and is discussed in this thread. Additional things you can do to discover the other device is to lower the TX power of the advertising device so that it will only discover devices in close proximity of itself.

    Best regards,

    Simon

Children
Related