2 Replies Latest reply on Feb 14, 2018 8:45 AM by frederic.chasse_1669321

    MTU exchange procedure question

    frederic.chasse_1669321

      Hi,

       

      Me and a coworker were working on the MTU exchange procedure using a CYBLE-222014-01 and CySmart on Windows.

       

      In the stack event handler, at the event CYBLE_EVT_GATTS_XCNHG_MTU_REQ, we proceed as follows:

       

      switch (event) {

      /* ... */

          case CYBLE_EVT_GATTS_XCNHG_MTU_REQ:

              connHandle = ((CYBLE_GATT_XCHG_MTU_PARAM_T*)eventParam)->connHandle;

              CyBle_GattGetMtuSize(&mtu);

              CyBle_GattsExchangeMtuRsp(connHandle, mtu);

              break;

      /* ... */

      }

       

      But we found that we don't necessarily need to use CyBle_GattsExchangeMtuRsp in the MTU exchange process.

       

      In CySmart, we set the MTU to 512, and in the PRoC's BLE component, we set the MTU to 124. We commented the CyBle_GattsExchangeMtuRsp function, and found in CySmart that the negociated MTU after a connection was of 124.

       

      So even though we didn't send back our MTU, the BLE connection resulted in a negociated MTU size of 124. My question is: is the MTU exchange process done in background with the Cypress BLE stack? Do we need the case CYBLE_EVT_GATTS_XCNHG_MTU_REQ at all?

       

      Thanks,

       

      Frederic