Prevent unnecessary BLE Parameter updates

PR_Loqed
Posts: 1
Joined: Tue Jan 08, 2019 6:48 pm

Prevent unnecessary BLE Parameter updates

Postby PR_Loqed » Tue Jan 08, 2019 7:07 pm

Using the latest ESP IDF, we connect from the ESP (Central) to a Peripheral (Ti26x2). The peripheral accepts parameters within the following ranges, and also advertises them:
Minimum connection interval (units of 1.25ms, 80=100ms): 80
Maximum connection interval (units of 1.25ms, 104=130ms): 104
Slave latency to use for parameter update request: 0
Supervision timeout value (units of 10ms, 300=3s): 300

When an iOS device connects, no parameter update are happening. This is the expected and desired behavior. The iOS device gets the preferred parameter range from the peripheral's advertisement package, and sets the initial connection parameters correctly when setting up the BLE connection (note: Android has a different behavior, unfortunately).

When ESP32 connects, after a short time I see a parameter update happening to a very low 6, 6, 0, 600 (min,max,slave,supervision). I have no clue where these values are coming from. Shortly thereafter, a second parameter update happens, and the settings are changed to 104 interval and a 300 supervision timeout. I've seen someone else with the same issue and the Arduino IDF: https://github.com/espressif/arduino-esp32/issues/1913

I have tried setting esp_ble_gap_set_prefer_conn_params (before making the BLE connection) to 80, 104, 0, 300 (min,max,slave,supervision), but no luck.

Is this is bug? Do you have the same issue? It is very important to me to stop parameter updates, because:
- Due to a bug, it makes the Ti26x4 chip (very new) often crash when a parameter update starts (known bug)
- The communication costs unnecessary power
- It prevents me from setting optimized parameters

Thanks!

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 13 guests