Change BLE default MTU for iOS application
Posted: Thu Sep 05, 2019 2:13 pm
Hi,
I need to change BLE MTU from default 23 value to some higher.
My ESP32 act as peripheral (server). Phone with Android / iOS act as central (client) and connect to ESP32, using custom application.
With Android everything wokrs fine by next routine:
1. Phone connects
2. Phone request MTU change
3. MTU successfully changed
This can be easily tested with any dev app, for example NRF Connect.
Problem is that iOS doesnt support MTU change requests. From iOS specs, it says that maximum MTU is 185 bytes.
I want to achieve it or at least get about 150-160 bytes.
But without ablitity to change it after connect, I have to set some higher default MTU value.
Right now I want to test that MTU value is changed, so testing with Android and NRF Connect.
What I've tried:
1) change at esp-idf\components\bt\bluedroid\api\include\api but not affect on MTU (still default 23 bytes left)
2) change at esp-idf\components\bt\bluedroid\stack\include\stack but got error (in NRF Connect log says "Error 129 (0x81) GATT INTERNAL ERROR ") and not able even discover services.
3) during bt initialisation call but still no changes in MTU
Any assistance would be appreciated
I need to change BLE MTU from default 23 value to some higher.
My ESP32 act as peripheral (server). Phone with Android / iOS act as central (client) and connect to ESP32, using custom application.
With Android everything wokrs fine by next routine:
1. Phone connects
2. Phone request MTU change
3. MTU successfully changed
This can be easily tested with any dev app, for example NRF Connect.
Problem is that iOS doesnt support MTU change requests. From iOS specs, it says that maximum MTU is 185 bytes.
I want to achieve it or at least get about 150-160 bytes.
But without ablitity to change it after connect, I have to set some higher default MTU value.
Right now I want to test that MTU value is changed, so testing with Android and NRF Connect.
What I've tried:
1) change
Code: Select all
ESP_GATT_DEF_BLE_MTU_SIZE
2) change
Code: Select all
GATT_DEF_BLE_MTU_SIZE
3) during bt initialisation call
Code: Select all
esp_ble_gatt_set_local_mtu(180)
Any assistance would be appreciated