Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS Bluetooth Low Energy Connection Interval

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

like image 505
Scott Avatar asked Nov 03 '22 12:11

Scott


1 Answers

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

like image 89
vbgd Avatar answered Nov 08 '22 03:11

vbgd