Infineon Logo AIROC BTSDK v4.4 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
GATT Server Data API

GATT Server Data API. More...

Functions

wiced_bt_gatt_status_t wiced_bt_gatt_server_send_indication (uint16_t conn_id, uint16_t attr_handle, uint16_t val_len, uint8_t *p_app_buffer, wiced_bt_gatt_app_context_t p_app_ctxt)
 This API will send a long (1 upto (MTU -3) bytes) indication to the client for the specified handle with a persistent buffer in p_app_buffer. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_server_send_notification (uint16_t conn_id, uint16_t attr_handle, uint16_t val_len, uint8_t *p_app_buffer, wiced_bt_gatt_app_context_t p_app_ctxt)
 This API will send a long (1 upto (MTU -3) bytes) notification to the client for the specified handle with a persistent buffer in p_app_buffer. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_server_send_multiple_notifications (uint16_t conn_id, uint16_t app_buffer_len, uint8_t *p_app_buffer, wiced_bt_gatt_app_context_t p_app_ctxt)
 This API will send a long (1 upto (MTU -1) bytes) multiple variable length notification to the client with a persistent buffer in p_app_buffer. More...
 

Detailed Description

GATT Server Data API.

Function Documentation

wiced_bt_gatt_status_t wiced_bt_gatt_server_send_indication ( uint16_t  conn_id,
uint16_t  attr_handle,
uint16_t  val_len,
uint8_t *  p_app_buffer,
wiced_bt_gatt_app_context_t  p_app_ctxt 
)

This API will send a long (1 upto (MTU -3) bytes) indication to the client for the specified handle with a persistent buffer in p_app_buffer.

The indication confirmation from the remote is indicated by an GATT_ATTRIBUTE_REQUEST_EVT with wiced_bt_gatt_attribute_request_t.opcode = GATT_HANDLE_VALUE_IND

Parameters
[in]conn_id: connection identifier.
[in]attr_handle: Attribute handle of this handle value indication.
[in]val_len: Length of indication value passed.
[in]p_app_buffer: Indication Value, peristent till the data is sent out to the controller
[in]p_app_ctxt: Application context for p_app_buffer
Note
The application may free/release/deallocate the p_app_buffer pointer on receiving a GATT_APP_BUFFER_TRANSMITTED_EVT with wiced_bt_gatt_buffer_transmitted_t::p_app_data = p_app_buffer and wiced_bt_gatt_buffer_transmitted_t::p_app_ctxt = p_app_ctxt
Returns
wiced_bt_gatt_status_t
wiced_bt_gatt_status_t wiced_bt_gatt_server_send_multiple_notifications ( uint16_t  conn_id,
uint16_t  app_buffer_len,
uint8_t *  p_app_buffer,
wiced_bt_gatt_app_context_t  p_app_ctxt 
)

This API will send a long (1 upto (MTU -1) bytes) multiple variable length notification to the client with a persistent buffer in p_app_buffer.

The send complete of the notification is indicated by an GATT_ATTRIBUTE_REQUEST_EVT with wiced_bt_gatt_attribute_request_t.opcode = GATT_HANDLE_VALUE_MULTI_NOTIF

Parameters
[in]conn_id: connection identifier.
[in]app_buffer_len: Length of multiple notification values passed, should not exceed MTU - 1.
[in]p_app_buffer: Notification Values, peristent till the data is sent out to the controller
Note
: Notification values are formatted by the application by setting the handle(2 octets LE), len(2 octets LE) and data of handle of length for atleast 2 handle, len, data pairs.
Parameters
[in]p_app_ctxt: Application context for p_app_buffer
Note
The application may free/release/deallocate the p_app_buffer pointer on receiving a GATT_APP_BUFFER_TRANSMITTED_EVT with wiced_bt_gatt_buffer_transmitted_t::p_app_data = p_app_buffer and wiced_bt_gatt_buffer_transmitted_t::p_app_ctxt = p_app_ctxt
Returns
wiced_bt_gatt_status_t
wiced_bt_gatt_status_t wiced_bt_gatt_server_send_notification ( uint16_t  conn_id,
uint16_t  attr_handle,
uint16_t  val_len,
uint8_t *  p_app_buffer,
wiced_bt_gatt_app_context_t  p_app_ctxt 
)

This API will send a long (1 upto (MTU -3) bytes) notification to the client for the specified handle with a persistent buffer in p_app_buffer.

The send complete of the notification is indicated by an GATT_ATTRIBUTE_REQUEST_EVT with wiced_bt_gatt_attribute_request_t.opcode = GATT_HANDLE_VALUE_NOTIF

Parameters
[in]conn_id: connection identifier.
[in]attr_handle: Attribute handle of this handle value notification.
[in]val_len: Length of notification value passed.
[in]p_app_buffer: Notification Value, peristent till the data is sent out to the controller
[in]p_app_ctxt: Application context for p_app_buffer
Note
The application may free/release/deallocate the p_app_buffer pointer on receiving a GATT_APP_BUFFER_TRANSMITTED_EVT with wiced_bt_gatt_buffer_transmitted_t::p_app_data = p_app_buffer and wiced_bt_gatt_buffer_transmitted_t::p_app_ctxt = p_app_ctxt
Returns
wiced_bt_gatt_status_t