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

Choosing the Central...

Hi,

Can a peripheral choose among multiple central?

Consider a situation where I have a 3 centrals. Lets say CentralA, CentralB and CentralC with,

CentralA - High connetction priority... CentralB,CentralC - Low connection priority...

Now my peripheral is advertising and CentralB scans it and connects to it.

So is there any way I can keep my peripheral to advertise and check if any of CentralA(High Priority) or CentralB(same priority) is active, so that peripheral can drop connection to CentralB and connect with CentralA or CentralC as per requirement.

Regards.

Parents
  • Our peripheral SoftDevices support non-connectable advertising while in a connection. So you can use the BLE_GAP_ADV_TYPE_ADV_NONCONN_IND or the BLE_GAP_ADV_TYPE_ADV_SCAN_IND advertising types while in a connection.

    If you use BLE_GAP_ADV_TYPE_ADV_SCAN_IND central A can send scan requests, and the peripheral will get the BLE_GAP_EVT_SCAN_REQ_REPORT event. You can use this event to detect if Central A is active, if it is, you disconnect from Central B, and connect to Central A.

  • Are there any advertisement parameters that needs to be changed. I did try to start advertisement with BLE_GAP_ADV_TYPE_ADV_SCAN_IND, but the sd_ble_gap_adv_start() function returned with error code:NRF_ERROR_INVALID_PARAM. So what other advertisement parameters are to be changed and What are their hard limits?

    Thanks Again!!

Reply Children
No Data
Related