what API to use for automatic connection to a peer device at power on? | Cypress Semiconductor
what API to use for automatic connection to a peer device at power on?
I am trying to realize a feature where once the BLE device is powered up, it will connect automatically to a peer device whose address has been stored when it had been connected before.
the BLE device that I am developing acts are a peripheral.
Of course, at the very first time it turns on, it would have no history of a device address to connect to. However, when connected to some peer device, it will store its device address(or something else to identify the partner) in the flash.
In that way, even after a power cycle, my BLE device will load the target device address from flash and try to connect to it.
So far, digging in to the API documents, I've found that the 'whitelist' seems to be one way to realize my objective.
However, I'm curious about a few things here:
Q1. Is whitelist the only chance for me to achieve my goal?
Q2. Connection is made when both the peripheral and central both interact with each other. Therefore I'm assuming that trying to do something on the peripheral side alone is not enough to achieve my goal. Am I right to think that I need to make changes in the central BLE device too?