Configure MTU failure

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Tool: modustoolbox 3.0
Sample: mtb-example-btsdk-ble-throughput-master/ GATT_server
Platform: CYBT-41355-EVAL

Steps
1. Connect to Android
2. I thought MTU already defined 247 in app_bt_cfg.c but never negotiated.
.gatt_cfg = /* GATT configuration */
{
.appearance = APPEARANCE_GENERIC_TAG,
.client_max_links = 2,
.server_max_links = 1,
.max_attr_len = 244,
.max_mtu_size = 247
},
3. So I call API(wiced_bt_gatt_configure_mtu) when ble is connected.
Status is '0' success but MTU never updated.

status = wiced_bt_gatt_configure_mtu(tput_conn_state.conn_id, 247);
WICED_BT_TRACE("TPUT: Request MTU %dM\r\n", status);

4. I repeated it every 1 seconds but MTU never updated.

5. But, If I change MTU at android app side (247) , it works.

What should I do? I have to update MTU even if Android did not update MTU. 

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @ilHw_4713311 

Please check the solution explained in the following thread: 

https://community.infineon.com/t5/Bluetooth-SDK/MTU-size-configuration/td-p/288920

Regards,
Anjana

View solution in original post

4 Replies
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @ilHw_4713311 

Please check the solution explained in the following thread: 

https://community.infineon.com/t5/Bluetooth-SDK/MTU-size-configuration/td-p/288920

Regards,
Anjana

ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

Thanks for updating.

I already read your article before (so I added step 2, 3).
I review your given link once again, but I still failed to change MTU.

Please check once again.


 

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @ilHw_4713311 

Do you know by default what is the Android phone / peer device MTU ? If by default its a lower value , then even if you set 247 at our device side , it will negotiate to that lower value only. 

In that case you have to change the MTU size at Android side as well like you already tried. 

Regards,
Anjana

0 Likes
ilHw_4713311
Level 4
Level 4
5 solutions authored 50 sign-ins 50 replies posted

I found MTU exchange in air sniff log.
Maybe MTU updated without any notification. I was expecting MTU changed message.
Thanks anyway.

0 Likes