This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Peripheral role - how to initiate disconnect / reconnect / unbond ?

Hello,

Extremely Low power sensor follows this use case:

  1. Initial connection : push of a button on the sensor starts advertising,  concurrently initiating scan on a smart device ==>sensor discovered by smart device.
  2. Bonding.
  3. Sensor disconnects to conserve power.
  4. Sensor does its 'stuff' for long period of time (longer than Supervision timeout).
  5. After a while the sensor initiates reconnection to smart device (if in range).  No user interaction with smart device required.
  6. Sensor transmits its data to smart device.
  7. Sensor disconnects to conserve power.
  8. Sequence 4-7 repeats.
  9. Every x months sensor's battery is being replaced (loosing all non-volatile data).
  10. After battery replacement,  sensor recognizes it's bonded and can keep repeating sequence 4-7.
  11. Occasionally sensor need to connect/bond to another smart device hence need to 'unbond' the previous smart device.

Now after this long intro her are my questions :

  • Q1. How can peripheral intentionally (and immediately) disconnect (i. e.  Not responding to connection events on connection intervals) ?
  • Q2a. How can peripheral initiate reconnection without having the user interact with smart device (i.e. not pressing 'scan'  button) ?
  • Q2b. What is required on the central side (smart device) to support the above ?
  • Q3. After battery replacement, how can peripheral recognize is already bonded ?
  • Q4. How to 'unbond' ?

Phew,  that was a long post... Hope you succeeded to follow...  :)

Thanks in advance for any advice.

  • Hi,

    1. Peripheral can terminate the connection by calling function 'GAPRole_TerminateConnection()'.

    2. AFAIK, peripheral device can't initiate the connection. As per the defined role it can advertise to make central device able discover it. If time is well defined after which you want peripheral device to initiate the connection, the central device can scan for the device and initiate the connection after that interval.

    3. I think peripheral need to recognize that it is bonded. That information can be stored on central device side.

    4. The bonding information can be erased using 'gapBondMgrEraseAllBondings()'.

    Hope this helps.

    Thanks.

    Dhaval

    If this has answered your question, you may like to click on 'Verify Answer'.