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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With