BLE: cannot change MTU size at all

Hi guys,

First post here. Be gentle.

I am working with particle Argon SDK 3.3.0. I have read several other threads. When I connect to my BLE peripheral device from Argon acting as central, there is no way to change the MTU size.

The error is
0000533316 [hal.ble] TRACE: sd_ble_gattc_exchange_mtu_request() failed: 17

I can work with MTU sizes of more than 200 bytes with the same BLE peripheral when my central device is my laptop or a raspberry pi so the only one I cannot make it work is Argon.

Any hint how to solve this? Also tried calling functions from the HAL driver, no luck.
Maybe this is solved in SDK v4.0.0beta which I just saw available?

Please let me know your thoughts and have a nice day.

Hi and welcome to the forums!

The minimum MTU is 23 and the maximum appears to be 247.

Try calling:

int hal_ble_gatt_set_att_mtu(size_t att_mtu, void* reserved)

Pass nullptr for reserved. You shouldn’t need to add any include files.

I haven’t tested it, but this has worked for others in the past.

1 Like

If I read the NRF BLE doc right, the stack is saying it is busy with error code 17.