Kelvin Lee
Kelvin Lee

Reputation: 73

In iOS, how do I lower BLE connection interval?

How do I specify a lower BLE connection interval in iOS?

I believe in iOS the default is 30 ms but can be lowered to 15 ms (as mentioned in 2017 WWDC Whats New In Core Bluetooth).

Apple mentioned the connection interval can be lowered but this does not seem to be documented anywhere.

I need this to be done by the centralManager rather than the peripheral.

Current code:

self.centralManager.connect(self.peripheral, options: nil)

I would expect the options parameter could be the right place for this, but it does not seem to be so https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/peripheral_connection_options.

This https://developer.apple.com/documentation/corebluetooth/cbperipheralmanager/1393277-setdesiredconnectionlatency looked promising but was for an acting peripheral rather than a central.

Is it even possible to do this using CoreBluetooth in iOS?

Upvotes: 1

Views: 1034

Answers (1)

Emil
Emil

Reputation: 18452

This question is not really about the Swift language, but about the CoreBluetooth framework. What they talked about in WWDC 2017 was that iOS acting as central now accepts a larger range of connection parameters requested by a peripheral. From what I know, there is no API to change the connection parameters from an app acting as BLE central.

Upvotes: 1

Related Questions