5
votes

I am building an app for a Bluetooth Low Energy device. I am trying to figure out how set the connection interval on the iPhone side.

I have defined a minimum and maximum connection interval on the peripheral device. However, I would like the iPhone app to use the longest connection interval possible. Is there any way to set the connection interval in the app or at least a way to influence it?

Thanks

2
How did you set minimum and maximum interval on peripheral device?uerceg

2 Answers

2
votes

There are two possibilities:

Case 1

If your application is master, there is no way to change the connection interval from the application. There is no API for this. Your peripheral should ask for a changing of connection interval. For accepted connection interval values please check this document (https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf) at 3.6 Connection Parameters.

Case 2

If your application is peripheral, you can use the setDesiredConnectionLatency method in CBPeripheralManager. More details here: https://developer.apple.com/reference/corebluetooth/cbperipheralmanager/1393277-setdesiredconnectionlatency

0
votes

You can send a connection parameter update request from the peripheral with the minimum connection interval closer to the high one. Not sure if you can influence it on the iPhone.