2023-03-22 12:59 AM
I am using BlueNRG M2 and would like to increase the MTU size from default 23 to 100 bytes.
After reading PM0257 programming manual, I tried calling aci_gatt_exchange_config function which sometimes returns BLE_STATUS_SUCCESS and sometimes throws BLE_STATUS_NOT_ALLOWED error.
I am unable to find the reason why it throws BLE_STATUS_NOT_ALLOWED error. What could be the cause for the same?
Following is my code implementation
static void User_Process(void)
{
tBleStatus status;
if (connected && !mtu_exchange_called)
{
mtu_exchange_called = true;
status = aci_gatt_exchange_config(connection_handle);
if (status != BLE_STATUS_SUCCESS)
{
// Handle error
}
}
}