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

Ble connection only on certain events

I want to connect a central and peripheral and only have ble on when the peripheral senses a certain event that exceeds a threshold. Do the devices need to connect on startup to recognize eachother? How is the best way to turn the connection on/off? I am using the heart rate collector as a base.

Parents
  • You can start to advertise when it suites your application. This also depends on the central application that needs to scan for advertisements to be able to initate the connection. If the central can scan all the time, it's ok to do so, and start advertising when ble should be turned on. But if power is limited on the central or if you have multiple advertisers you might want to use another scheme. Guess I'm trying to say that it depends on your application, so if you elaborate a little on the use case it will be easier to give recommendations. Thanks.

Reply
  • You can start to advertise when it suites your application. This also depends on the central application that needs to scan for advertisements to be able to initate the connection. If the central can scan all the time, it's ok to do so, and start advertising when ble should be turned on. But if power is limited on the central or if you have multiple advertisers you might want to use another scheme. Guess I'm trying to say that it depends on your application, so if you elaborate a little on the use case it will be easier to give recommendations. Thanks.

Children
No Data
Related