You are here

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?

Summary: 1 Reply, Latest post by hli on 17 Apr 2016 04:55 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
kwagjj_1632506's picture
12 posts

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?


user_78878863's picture
2553 posts

1) the whitelist has nothing to do with automated connection. It allows you to connect only to know devices, instead of every central device that tries to.

2) yes. The BLE peripheral is only advertising. Its the central device thats actually starting he connection process. So you need to make your central device to scan continuously (or e.g. every 10 seconds) - watch out for battery consumption!

Log in to post new comments.