gxmad
gxmad

Reputation: 2210

How can to change Bluetooth parameters programmatically iPhone?

I need to change the connection interval of my BLE connection from 30ms to 15ms, but I don't find how to update the Bluetooth parameters in swift for iPhone. I just find in one blog someone talking about it. Any idea, how?

Upvotes: 0

Views: 1190

Answers (1)

Jens Meder
Jens Meder

Reputation: 4367

Central role

AFAIK there is no way you can set or request connection parameters from within your iOS App when using the central role. This happens all behind the scenes and is maintained on the operating system level. Your peripheral needs to request the desired connection parameters (connection intervals, connection supervision timeout and slave latency) in accordance to the Apple recommendations. iOS will then negotiate appropriate parameters with your peripheral. Please refer to section 3.6 of the Bluetooth Design Guidelines for more information.

Peripheral role

If your iOS App represents the peripheral role you can only set the connection latency for each central. Please refer to the documentation of the setDesiredConnectionLatency(_:for:) method on CBPeripheralManager for more information.

Upvotes: 1

Related Questions