Skip to main content
RMoc.1
Associate II
March 22, 2023
Question

aci_gatt_exchange_config sometimes returns BLE_STATUS_NOT_ALLOWED with BlueNRG M2

  • March 22, 2023
  • 0 replies
  • 881 views

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

    This topic has been closed for replies.