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

can peripheral start connection?

Hi,

I am planning system with a BLE peripheral (using nRF52840) and BLE Central (using nRF52840) that is AC powered.

The peripheral will be advertising every ~300msec.

If central wants to "say" something to peripheral it will connect, transfer data and then disconnect.

My question is: what if peripheral decides that it wants to send data to central? how can it be done?

Thanks,

Gil

Parents
  • If I were you, I'd consider just opening a connection and keeping it open as long as the devices are in range. In that way, the Central can write to a characteristic any time it has something to send, and the Peripheral can send a notification right away. The response time should be shorter, since no link needs to be established first, before data can be sent.

    Since advertising (by default) consists of sending data and listening on 3 channels, while a connection event only sends and listens on 1 channel, a connection with 300 ms connection interval should also be almost 3 times more power-efficient than advertising every 300 ms too, so I don't think there are any downsides.

    You could even play with a shorter connection interval, but add slave latency, which could give much improved response times from Peripheral to Central. You can take a look at this post to understand connection parameters better.

Reply Children
Related