Has anyone had success using android client to get requestMTU to work? Works fine in nRF but I am getting a status of false on my android callback to the command.
The process seems pretty straightforward gatt.requestMTU(100). Tried issuing the requestMTU at various points in the connection process but getting the same response (always false) from the esp no matter where I make the request. Also, once I issue the request, the esp no longer triggers onWrite events no matter what the length of the value.
How to increase MTU size on GATT - Server
Re: How to increase MTU size on GATT - Server
I would like to join this discussion with enhancement request. It would be nice to have option to setup max allowed MTU in GATTS or at least to response on mtu request with own mtu value by exposing mtu response callback. According to bluetooth specs Vol 3 Part F 3.4.2.2
Exchange MTU Response
The Exchange MTU Response is sent in reply to a received Exchange MTU Request.
Re: How to increase MTU size on GATT - Server
Did you try esp_ble_gatt_set_local_mtuchegewara wrote:I would like to join this discussion with enhancement request. It would be nice to have option to setup max allowed MTU in GATTS or at least to response on mtu request with own mtu value by exposing mtu response callback. According to bluetooth specs Vol 3 Part F 3.4.2.2Exchange MTU Response
The Exchange MTU Response is sent in reply to a received Exchange MTU Request.
Re: How to increase MTU size on GATT - Server
As for now only on client side, but thanks for tip. Will check it but im pretty sure you are right and it the solution.
Re: How to increase MTU size on GATT - Server
Sadly its not documented function yet, but it works like expected. Big thanks.WiFive wrote: Did you try esp_ble_gatt_set_local_mtu
Re: How to increase MTU size on GATT - Server
Hi, I'm using the esp_ble_gatt_set_local_mtu() function, but doesn't seem to work.
I've noticed with nRf Connect app that if I use the Request MTU utility, next writings work.
Is this normal or should GATTS use the value set with esp_ble_gatt_set_local_mtu ?
My ble initalistation code is the same as the GATTS example. I've modified the events handler, but that's it, nothing else...
Thanks in advance.
EDIT: just saw this post
viewtopic.php?t=6040
so the mtu server should be modified by the client at the beginning of the connection (eg. if we want more than 23 mtu bytes)?
I've noticed with nRf Connect app that if I use the Request MTU utility, next writings work.
Is this normal or should GATTS use the value set with esp_ble_gatt_set_local_mtu ?
My ble initalistation code is the same as the GATTS example. I've modified the events handler, but that's it, nothing else...
Thanks in advance.
EDIT: just saw this post
viewtopic.php?t=6040
so the mtu server should be modified by the client at the beginning of the connection (eg. if we want more than 23 mtu bytes)?
Re: How to increase MTU size on GATT - Server
Yes, you are right.mr1000 wrote: so the mtu server should be modified by the client at the beginning of the connection (eg. if we want more than 23 mtu bytes)?
Re: How to increase MTU size on GATT - Server
hey there
I'm working on the same Thing with androind app to send data > 20 byte .
could you help me please?
I didn't know where should I put gatt.requestMtu(500); and what should I do in the server side ESP32 do I need to add a response or a callback function ...?
thank you
I'm working on the same Thing with androind app to send data > 20 byte .
could you help me please?
I didn't know where should I put gatt.requestMtu(500); and what should I do in the server side ESP32 do I need to add a response or a callback function ...?
thank you
Re: How to increase MTU size on GATT - Server
Hi,
bt stack will take care of response for you.
What you need to do is to eventually store mtu value and reuse it in read/write requests
https://github.com/espressif/esp-idf/bl ... emo.c#L403
Of course you can try to send notify/indicate response with any length data, but it will be truncated by bt stack to mtu - 3 length.
bt stack will take care of response for you.
What you need to do is to eventually store mtu value and reuse it in read/write requests
https://github.com/espressif/esp-idf/bl ... emo.c#L403
Of course you can try to send notify/indicate response with any length data, but it will be truncated by bt stack to mtu - 3 length.
Re: How to increase MTU size on GATT - Server
Hi
i am having the same problem but the gatt.requestMtu(500) on android but it works for me for the first time then i doesn't receive any data when i reboot the android application.
Is there any solution?
Thank you.
i am having the same problem but the gatt.requestMtu(500) on android but it works for me for the first time then i doesn't receive any data when i reboot the android application.
Is there any solution?
Thank you.
Who is online
Users browsing this forum: devlat and 118 guests