What is ble_gattc_handle_range_t?

Hello, I'm seeking some clarification regarding "ble_gattc_handle_range_t". I would like to use the function "sd_ble_gattc_char_value_by_uuid_read()" to read the char value on my peripheral. Is "ble_gattc_handle_range_t" referring to a range of conn_handles or a range of 16bit characteristics, or something else?

`

/**@brief Operation Handle Range. */
typedef struct
{
  uint16_t          start_handle; /**< Start Handle. */
  uint16_t          end_handle;   /**< End Handle. */
} ble_gattc_handle_range_t;

Parents
  • Hi,

    Is "ble_gattc_handle_range_t" referring to a range of conn_handles or a range of 16bit characteristics, or something else?

    Something else:

    The ble_gattc_handle_range_t used for p_handle_range in sd_ble_gattc_char_value_by_uuid_read() is the range of GATT table handles for where to look for the characteristic value entry, in the GATT table.

    See the GATTC Read Characteristic Value by UUID Message Sequence Chart for how to use the API. Typically one would start at the full range (0x0001 to 0xFFFF) then if you get one result at e.g. handle 0x000E then you do the next call on the range 0x000F to 0xFFFF.

    Regards,
    Terje

  • Okay thanks. So then "count" in "ble_gattc_evt_char_val_by_uuid_read_rsp_t" would be my "N" right?

    /**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */
    typedef struct
    {
      uint16_t                  count;            /**< Handle-Value Pair Count. */
      uint16_t                  value_len;        /**< Length of the value in Handle-Value(s) list. */
      uint8_t                   handle_value[1];  /**< Handle-Value(s) list. To iterate through the list use @ref sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter.
                                                       @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation.
                                                       See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */
    } ble_gattc_evt_char_val_by_uuid_read_rsp_t;

Reply
  • Okay thanks. So then "count" in "ble_gattc_evt_char_val_by_uuid_read_rsp_t" would be my "N" right?

    /**@brief Event structure for @ref BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP. */
    typedef struct
    {
      uint16_t                  count;            /**< Handle-Value Pair Count. */
      uint16_t                  value_len;        /**< Length of the value in Handle-Value(s) list. */
      uint8_t                   handle_value[1];  /**< Handle-Value(s) list. To iterate through the list use @ref sd_ble_gattc_evt_char_val_by_uuid_read_rsp_iter.
                                                       @note This is a variable length array. The size of 1 indicated is only a placeholder for compilation.
                                                       See @ref sd_ble_evt_get for more information on how to use event structures with variable length array members. */
    } ble_gattc_evt_char_val_by_uuid_read_rsp_t;

Children
No Data
Related