cancel
Showing results for 
Search instead for 
Did you mean: 

aci_gatt_exchange_config sometimes returns BLE_STATUS_NOT_ALLOWED with BlueNRG M2

RMoc.1
Associate II

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
        }
    }
}

0 REPLIES 0