Bluetooth 2 Logo

Improving an SDK With Core Bluetooth – Ephemeral Connections

This entry is part 4 of 7 in the series Improving an SDK With Core Bluetooth


Here’s why.

In order to transfer information of any weight, we need to have a connection between the Central and the Peripheral.

Whenever we make a connection, the Peripheral becomes “owned” by the Central, and stops advertising, which is the issue that we want to avoid here.

When we connect, the Peripheral needs to discover its Services, and each of its Services needs to discover its Characteristics.

When we disconnect, all the Services and Characteristics are flushed. That means that, in order to reconnect (like when we are asking a question), we’ll need to go through the whole Service/Characteristic discovery process all over again.

If you remember from the first series, that was a fairly intense process.

It can be done, but that would involve a rather different structure from the very basic one we have now.

I don’t think it’s worth it for the purposes of this lesson. I may do something like that in a more advanced lesson, in a later series.

Additionally, keeping a Peripheral connected helps to reduce energy usage, as the Peripheral is not doing regular radio broadcasts. It’s waiting for data and will send in controlled streams.

Next, let’s look at what it would take to get confirmed delivery.