Change connection interval at runtime

3 posts / 0 new
Last post
Jda
Offline
Last seen:3 years 6 months ago
加入:2015-04-24 10:43
Change connection interval at runtime

Hi all,

I'd like to change the connection interval dynamically at runtime. Most of the time, the interval is long in order to save power, when a certain characteristic is written it needs to be short so the latency of the total system (smartphone app + BLE device) is much smaller.

I already found out that the GAPC_PARAM_UPDATE_CMD command can be issued to negotiate a new connection interval with the master. This works quite well, but I still have a problem.

Problem is, the message is processed after a delay by the kernel because it is busy with handling other (GATT-) messages. Is there a way to give the GAPC_PARAM_UPDATE_CMD a higher priority so the kernel handles it (almost) immediately?

BR, Jda

Device:
Joacimwe
Offline
Last seen:1 year 5 months ago
Guru
加入:2014-01-14 06:45
当你running as a

当你running as a central, the new interval should be issued immediately.
But when you are running as a peripheral (as you normally do when connected to a smartphone), an update request will be sent to the central, which in turn will update the connection interval and that often takes time much time since an extra roundtrip is needed. Maybe you could have a short connection interval but high slave latency? Then you will get very small delay when notifying a smartphone, but high latency when writing from the smartphone to the peripheral.

Jda
Offline
Last seen:3 years 6 months ago
加入:2015-04-24 10:43
I'm indeed running as

I'm indeed running as peripheral. Thanks for your suggestion, will give it a try.