3 Replies Latest reply on Oct 29, 2019 8:30 AM by StN._1917156

    wiced_bt_l2cap_update_ble_conn_params details?

    StN._1917156

      Where could see details or example for wiced_bt_l2cap_update_ble_conn_params: in what units are min_int, max_int, timeout and what are min/max values allowed?

      Also when tracing Hello example (with some extra TRACERT added) I see plenty of BTM_BLE_CONNECTION_PARAM_UPDATE requests in both cases when connecting and when disconnecting to/from CYW and cant find where they come from?

      Thanks

       

       

      //Connecting to CYW20719 from Cysmart 1.2 / Android

      ....

      ADV stop

      hello_sensor_management_cback: 1f

      ** BTM_BLE_CONNECTION_PARAM_UPDATE

      conn params upd: status 0, conn_interval 6, conn_latency 0, supervision_timeout 2000,  bd (72 6d 57 9e 48 04 )

      hello_sensor_management_cback: 1f

      ** BTM_BLE_CONNECTION_PARAM_UPDATE

      conn params upd: status 0, conn_interval 39, conn_latency 0, supervision_timeout 2000,  bd (72 6d 57 9e 48 04 )

      ## hello_sensor_gatts_callback: GATT_ATTRIBUTE_REQUEST_EVT

      ## hello_sensor_gatts_req_cb. conn 1, type 5

      req_mtu: 512

       

       

      ....

       

       

      //Disconnecting to CYW20719 from Cysmart 1.2

      hello_sensor_management_cback: 1f

      ** BTM_BLE_CONNECTION_PARAM_UPDATE

      conn params upd: status 0, conn_interval 6, conn_latency 0, supervision_timeout 2000,  bd (72 6d 57 9e 48 04 )

      hello_sensor_management_cback: 1f

      ** BTM_BLE_CONNECTION_PARAM_UPDATE

      conn params upd: status 0, conn_interval 39, conn_latency 0, supervision_timeout 2000,  bd (72 6d 57 9e 48 04 )

      ## hello_sensor_gatts_callback: GATT_CONNECTION_STATUS_EVT

      connection_down 72 6d 57 9e 48 04  conn_id:1 reason:19

      hello_sensor_management_cback: 17

      Advertisement State Change: 4

      wiced_bt_start_advertisements 0

        • 1. Re: wiced_bt_l2cap_update_ble_conn_params details?
          AnjanaM_61

          Hi,

           

          Q) Where could see details or example for wiced_bt_l2cap_update_ble_conn_params: in what units are min_int, max_int, timeout and what are min/max values allowed?

          A) This is as per spec.

            Connection interval min / max - you have to pass a number N such that resulting interval will be N * 1.25ms   ( supported 7.5 ms to 4000ms)

            Timeout - You have to pass a number N such that resulting time out will be N * 10 ms (supported 100ms to 32s)

           

           

          Q) Also when tracing Hello example (with some extra TRACERT added) I see plenty of BTM_BLE_CONNECTION_PARAM_UPDATE requests in both cases when connecting and when disconnecting to/from CYW and cant find where they come from?

          A) This will be triggered by Bt stack when it receive a connection parameter update from the client (like CySmart).

          It depends upon the Client side implementation. In case of CySmart android app, it will automatically send a connection param update upon connecting to a peer device.

           

          Thanks,

          Anjana

           

          • 2. Re: wiced_bt_l2cap_update_ble_conn_params details?
            ChunleiL_51

            Hi,

             

            AnjanaM_61 has provided a very good answer. Here are some more insights.

             

            1)

            You can also refer to Bluetooth Core Specification's CONNECTION PARAMETER UPDATE REQUEST for further explanation, which is located at [Vol 3] Part A, section 4.20. See the quotation below:

            Interval Min Defines minimum value for the connection interval in the following manner: connIntervalMin = Interval Min * 1.25 ms. Interval Min range: 6 to 3200 frames where 1 frame is 1.25 ms and equivalent to 2 BR/EDR slots. Values outside the range are reserved for future use. Interval Min shall be less than or equal to Interval Max.

             

            Interval Max Defines maximum value for the connection interval in the following manner: connIntervalMax = Interval Max * 1.25 ms. Interval Max range: 6 to 3200 frames. Values outside the range are reserved for future use. Interval Max shall be equal to or greater than the Interval Min.

             

            Timeout Multiplier Defines connection timeout parameter in the following manner: connSupervisionTimeout = Timeout Multiplier * 10 ms The Timeout Multiplier field shall have a value in the range of 10 to 3200.

             

            2)

            You can also refer to Bluetooth Core Specification's LINK LAYER CONTROL PROCEDURES for further explanation, which is located at [Vol 6] Part B, section 5.1.

             

            As described, Connection Update procedure is kind of self-managed and both peripheral/central devices can initiate it.

             

            <<<<<<<<<<<<<>>>>>>>>>>>>>

            Best regards

            C. L.

            <<<<<<<<<<<<<>>>>>>>>>>>>>

            • 3. Re: wiced_bt_l2cap_update_ble_conn_params details?
              StN._1917156

              Hi AnjanaM_61,

              "This will be triggered by Bt stack when it receive a connection parameter update from the client (like CySmart)."

              I was searching all the source code of Cysmart 1.2 for "requestConnectionPriority"  and cant find any in the code Is there any other function that is used in Cysmart that is able to change BLE connection parameters that I'm missing?

              Thanks