Infineon Logo AIROC BTSDK v4.2 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Generic Attribute (GATT)

Generic Attribute (GATT) Functions. More...

Data Structures

struct  wiced_bt_gatt_read_t
 Attribute read request. More...
 
struct  wiced_bt_gatt_read_multiple_req_t_
 Response structure, containing the requested handle list for GATT_RSP_READ_MULTI or GATT_RSP_READ_MULTI_VAR_LENGTH commands. More...
 
struct  wiced_bt_gatt_read_multiple_rsp_t
 Response structure for read multiple . More...
 
struct  wiced_bt_gatt_read_by_type_t
 Parameters for GATT_READ_BY_TYPE and GATT_READ_CHAR_VALUE. More...
 
struct  wiced_bt_gatt_write_hdr_t
 Attribute header, used for GATT write operations, and read response callbacks. More...
 
struct  wiced_bt_gatt_write_req_t
 Attribute write request. More...
 
struct  wiced_bt_gatt_req_conf_t
 Attribute handle confirmation, sent to app to indicate completion of server events on the server. More...
 
struct  wiced_bt_gatt_execute_write_req_t
 Attribute handle execution write request received on the client. More...
 
union  wiced_bt_gatt_request_params_t
 Attribute information for GATT attribute requests types received on the server. More...
 
struct  wiced_bt_gatt_discovery_param_t
 Parameters used in a GATT Discovery. More...
 
struct  wiced_bt_gatt_data_t
 Response data for read operations. More...
 
union  wiced_bt_gatt_operation_complete_rsp_t
 Client Operation Complete response data. More...
 
struct  wiced_bt_gatt_char_declaration_t
 characteristic declaration More...
 
struct  wiced_bt_gatt_group_value_t
 GATT group value. More...
 
struct  wiced_bt_gatt_included_service_t
 included service attribute value More...
 
struct  wiced_bt_gatt_char_descr_info_t
 characteristic descriptor information More...
 
union  wiced_bt_gatt_discovery_data_t
 Discovery result data Use GATT_DISCOVERY_RESULT_SERVICE_* or GATT_DISCOVERY_RESULT_CHARACTERISTIC_* macros to parse discovery data) More...
 
struct  wiced_bt_gatt_discovery_result_t
 Discovery result (used by GATT_DISCOVERY_RESULT_EVT notification) More...
 
struct  wiced_bt_gatt_discovery_complete_t
 Discovery Complete (used by GATT_DISCOVERY_CPLT_EVT notification) More...
 
struct  wiced_bt_gatt_operation_complete_t
 Response to read/write/disc/config operations (used by GATT_OPERATION_CPLT_EVT notification) More...
 
struct  wiced_bt_gatt_connection_status_t
 GATT connection status (used by GATT_CONNECTION_STATUS_EVT notification) More...
 
struct  wiced_bt_gatt_attribute_request_t
 GATT attribute request (used by GATT_ATTRIBUTE_REQUEST_EVT notification) More...
 
struct  wiced_bt_gatt_congestion_event_t
 GATT channel congestion/uncongestion (used by GATT_CONGESTION_EVT notification) More...
 
struct  wiced_bt_gatt_buffer_transmitted_t
 Structure to return the application buffer and application buffer context given to the stack in various APIs The application is expected to use this event to free allocated memory used for sending client requests or responding to client requests. More...
 
struct  wiced_bt_gatt_app_response_buffer_t
 Structure to hold the response buffer and the application context for that buffer. More...
 
struct  wiced_bt_gatt_buffer_request_t
 Structure to get a response buffer of the len_requested and the application context for that buffer. More...
 
union  wiced_bt_gatt_event_data_t
 Structures for GATT event notifications. More...
 
union  wiced_bt_gatt_gap_ble_attr_value_t
 GATT attribute value included in central role DB. More...
 
struct  wiced_gattdb_entry_s
 Structure used by wiced_bt_gattdb APIS, to parse GATTDB. More...
 
struct  wiced_bt_gatt_eatt_connection_indication_event_t
 GATT connection request (used by GATT_EATT_CONNECTION_INDICATION_EVT notification) To be returned by application for accepting/rejecting the connection with the wiced_bt_eatt_connection_response. More...
 
struct  wiced_bt_gatt_eatt_connection_response_t
 structure to be used to respond to received EATT connection request More...
 
struct  wiced_bt_gatt_eatt_connection_confirmation_event_t
 structure used to deliver the confirmation status of the requested EATT connection More...
 
struct  wiced_bt_gatt_eatt_callbacks_t
 callbacks for GATT EATT event notifications More...
 

Modules

 Client API
 GATT Profile Client Functions.
 
 Connection API
 GATT Profile Connection Functions.
 
 GATT Utilities
 Generic Attribute (GATT) Utility Functions.
 
 Server API
 GATT Profile Server Functions.
 

Macros

#define GATT_BLE_DEFAULT_MTU_SIZE   23
 Default GATT MTU size over LE link.
 
#define GATT_AUTH_SIGN_LEN   12
 Size of the signature appended to application data in signed write cmd.
 
#define GATT_CLIENT_MAX_WRITE_SIGNED_DATA   (23 - 3 - GATT_AUTH_SIGN_LEN)
 Max size of application data allowed to be sent using the signed write cmd.
 
#define WICED_GATT_HDR_SIZE   3
 GATT Header size (1 byte opcode + 2 byte handle)
 
#define WICED_BT_GATT_ENCRYPED_MITM   WICED_BT_GATT_ENCRYPTED_MITM
 For backward compatiability with previous releases.
 
#define WICED_BT_GATT_ENCRYPED_NO_MITM   WICED_BT_GATT_ENCRYPTED_NO_MITM
 
#define GATT_PREP_WRITE_CANCEL   GATT_PREPARE_WRITE_CANCEL
 See GATT_PREPARE_WRITE_CANCEL.
 
#define GATT_PREP_WRITE_EXEC   GATT_PREPARE_WRITE_EXEC
 See GATT_PREPARE_WRITE_EXEC.
 
#define GATTDB_PERM_NONE   (0x00)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_VARIABLE_LENGTH   (0x1 << 0)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_READABLE   (0x1 << 1)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_WRITE_CMD   (0x1 << 2)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_WRITE_REQ   (0x1 << 3)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_AUTH_READABLE   (0x1 << 4)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_RELIABLE_WRITE   (0x1 << 5)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_AUTH_WRITABLE   (0x1 << 6)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_WRITABLE   (GATTDB_PERM_WRITE_CMD | GATTDB_PERM_WRITE_REQ| GATTDB_PERM_AUTH_WRITABLE)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_PERM_MASK   (0x7f)
 All the permission bits. More...
 
#define GATTDB_PERM_SERVICE_UUID_128   (0x1 << 7)
 The permission bits (see Vol 3, Part F, 3.2.5)
 
#define GATTDB_CHAR_PROP_BROADCAST   (0x1 << 0)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_READ   (0x1 << 1)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_WRITE_NO_RESPONSE   (0x1 << 2)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_WRITE   (0x1 << 3)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_NOTIFY   (0x1 << 4)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_INDICATE   (0x1 << 5)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_AUTHD_WRITES   (0x1 << 6)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_PROP_EXTENDED   (0x1 << 7)
 GATT Characteristic Properties (see Vol 3, Part G, 3.3.1.1)
 
#define GATTDB_CHAR_EXTENDED_PROP_RELIABLE   (0x1 << 0)
 GATT Characteristic Extended Properties (see Vol 3, Part G, 3.3.3.1)
 
#define GATTDB_CHAR_EXTENDED_PROP_WRITABLE_AUXILIARIES   (0x1 << 1)
 GATT Characteristic Extended Properties (see Vol 3, Part G, 3.3.3.1)
 
#define BIT16_TO_8(val)
 Conversion macros. More...
 
#define GATTDB_UUID16_SIZE   2
 UUID lengths.
 
#define GATTDB_UUID128_SIZE   16
 UUID lengths.
 
#define LEGATTDB_PERM_NONE   GATTDB_PERM_NONE
 Since the GATT DB macro names were changed from LEGATTDB_xxx from GATTDB_xxx, these backwards compatibility macros are temporarily defined to minimize impact on applications. More...
 
#define LEGATTDB_PERM_VARIABLE_LENGTH   GATTDB_PERM_VARIABLE_LENGTH
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_READABLE   GATTDB_PERM_READABLE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_WRITE_CMD   GATTDB_PERM_WRITE_CMD
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_WRITE_REQ   GATTDB_PERM_WRITE_REQ
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_AUTH_READABLE   GATTDB_PERM_AUTH_READABLE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_RELIABLE_WRITE   GATTDB_PERM_RELIABLE_WRITE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_AUTH_WRITABLE   GATTDB_PERM_AUTH_WRITABLE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_WRITABLE   GATTDB_PERM_WRITABLE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_MASK   GATTDB_PERM_MASK
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_PERM_SERVICE_UUID_128   GATTDB_PERM_SERVICE_UUID_128
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_BROADCAST   GATTDB_CHAR_PROP_BROADCAST
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_READ   GATTDB_CHAR_PROP_READ
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_WRITE_NO_RESPONSE   GATTDB_CHAR_PROP_WRITE_NO_RESPONSE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_WRITE   GATTDB_CHAR_PROP_WRITE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_NOTIFY   GATTDB_CHAR_PROP_NOTIFY
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_INDICATE   GATTDB_CHAR_PROP_INDICATE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_AUTHD_WRITES   GATTDB_CHAR_PROP_AUTHD_WRITES
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_CHAR_PROP_EXTENDED   GATTDB_CHAR_PROP_EXTENDED
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_UUID16_SIZE   GATTDB_UUID16_SIZE
 To be deprecated, defined for backward compatiablility.
 
#define LEGATTDB_UUID128_SIZE   GATTDB_UUID128_SIZE
 To be deprecated, defined for backward compatiablility.
 
#define GATT_IS_CSF_FEATURE_SUPPORTED(csf, m)   (csf[(m)/8] & (1 << (m)%8))
 macro to determine GATT Client Support features
 

Typedefs

typedef uint16_t wiced_bt_gatt_status_t
 GATT status (see wiced_bt_gatt_status_e)
 
typedef uint8_t wiced_bt_gatt_opcode_t
 GATT Opcodes.
 
typedef uint16_t wiced_bt_gatt_disconn_reason_t
 GATT disconnection reason (see wiced_bt_gatt_disconn_reason_e)
 
typedef uint16_t wiced_bt_gatt_client_char_config_t
 GATT client config (see wiced_bt_gatt_client_char_config_e)
 
typedef uint16_t wiced_bt_gatt_server_char_config_t
 GATT server config (see wiced_bt_gatt_server_char_config_e)
 
typedef uint8_t wiced_bt_gatt_char_properties_t
 GATT characteristic properties mask (see wiced_bt_gatt_char_properties_e)
 
typedef uint8_t wiced_bt_gatt_auth_req_t
 GATT authentication requirement (see wiced_bt_gatt_auth_req_e)
 
typedef uint8_t wiced_bt_gatt_exec_flag_t
 GATT execute flag (see wiced_bt_gatt_exec_flag_e)
 
typedef struct
wiced_bt_gatt_read_multiple_req_t_ 
wiced_bt_gatt_read_multiple_req_t
 Response structure, containing the requested handle list for GATT_RSP_READ_MULTI or GATT_RSP_READ_MULTI_VAR_LENGTH commands.
 
typedef uint8_t wiced_bt_gatt_discovery_type_t
 GATT Discovery type (see wiced_bt_gatt_discovery_type_e)
 
typedef uint8_t wiced_bt_gatt_optype_t
 GATT Client Operation Codes. More...
 
typedef uint8_t wiced_bt_gatt_caching_status_t
 GATT peer caching status (see wiced_bt_gatt_caching_status_e)
 
typedef uint8_t wiced_bt_gatt_permission_t
 Attribute permission bit masks.
 
typedef uint8_t wiced_bt_gatt_format_t
 characteristic format specifiers (see wiced_bt_gatt_format_e)
 
typedef uint8_t wiced_bt_gatt_csf_bits_t
 GATT Client Support features.
 
typedef uint16_t wiced_bt_eatt_lcid_list [EATT_CHANNELS_PER_TRANSACTION]
 list of EATT lcid's More...
 
typedef uint16_t wiced_bt_gatt_eatt_conn_id_list [EATT_CHANNELS_PER_TRANSACTION]
 list of EATT connection id's More...
 
typedef tDRBwiced_bt_eatt_drbs [EATT_CHANNELS_PER_TRANSACTION]
 list of Data Receive Blocks
 
typedef void * wiced_bt_gatt_app_context_t
 Context is returned to application in event GATT_APP_BUFFER_TRANSMITTED_EVT on transmission of application data buffer.
 
typedef wiced_bt_gatt_status_t wiced_bt_gatt_cback_t (wiced_bt_gatt_evt_t event, wiced_bt_gatt_event_data_t *p_event_data)
 GATT event notification callback. More...
 
typedef struct wiced_gattdb_entry_s wiced_gattdb_entry_t
 Structure used by wiced_bt_gattdb APIS, to parse GATTDB.
 
typedef void(* wiced_bt_gatt_eatt_on_connect_ind_t )(wiced_bt_gatt_eatt_connection_indication_event_t *p_ind)
 Function callbacks for EATT. More...
 
typedef void(* wiced_bt_gatt_eatt_on_connect_complete_t )(wiced_bt_gatt_eatt_connection_confirmation_event_t *p_cfm)
 callback upon GATT EATT connection complete
 
typedef void(* wiced_bt_gatt_eatt_on_reconfigure_ind_t )(uint16_t conn_id, uint16_t mtu, uint16_t mps)
 callback upon GATT EATT reconnection complete
 
typedef void(* wiced_bt_gatt_eatt_release_drb_t )(tDRB *p_drb)
 callback upon releasing the DRB
 

Enumerations

enum  gatt_appearance_e {
  APPEARANCE_GENERIC_PHONE = 64, APPEARANCE_GENERIC_COMPUTER = 128, APPEARANCE_GENERIC_WATCH = 192, APPEARANCE_WATCH_SPORTS = 193,
  APPEARANCE_GENERIC_CLOCK = 256, APPEARANCE_GENERIC_DISPLAY = 320, APPEARANCE_GENERIC_REMOTE_CONTROL = 384, APPEARANCE_GENERIC_EYE_GLASSES = 448,
  APPEARANCE_GENERIC_TAG = 512, APPEARANCE_GENERIC_KEYRING = 576, APPEARANCE_GENERIC_MEDIA_PLAYER = 640, APPEARANCE_GENERIC_BARCODE_SCANNER = 704,
  APPEARANCE_GENERIC_THERMOMETER = 768, APPEARANCE_THERMOMETER_EAR = 769, APPEARANCE_GENERIC_HEART_RATE_SENSOR = 832, APPEARANCE_HEART_RATE_BELT = 833,
  APPEARANCE_GENERIC_BLOOD_PRESSURE = 896, APPEARANCE_BLOOD_PRESSURE_ARM = 897, APPEARANCE_BLOOD_PRESSURE_WRIST = 898, APPEARANCE_GENERIC_HID_DEVICE = 960,
  APPEARANCE_HID_KEYBOARD = 961, APPEARANCE_HID_MOUSE = 962, APPEARANCE_HID_JOYSTICK = 963, APPEARANCE_HID_GAMEPAD = 964,
  APPEARANCE_HID_DIGITIZER_TABLET = 965, APPEARANCE_HID_CARD_READER = 966, APPEARANCE_HID_DIGITAL_PEN = 967, APPEARANCE_HID_BARCODE_SCANNER = 968,
  APPEARANCE_GENERIC_GLUCOSE_METER = 1024, APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR = 1088, APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE = 1089, APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE = 1090,
  APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP = 1091, APPEARANCE_GENERIC_CYCLING = 1152, APPEARANCE_CYCLING_COMPUTER = 1153, APPEARANCE_CYCLING_SPEED_SENSOR = 1154,
  APPEARANCE_CYCLING_CADENCE_SENSOR = 1155, APPEARANCE_CYCLING_POWER_SENSOR = 1156, APPEARANCE_CYCLING_SPEED_AND_CADENCE_SENSOR = 1157, APPEARANCE_CONTROL_DEVICE_SWITCH = 1217,
  APPEARANCE_CONTROL_DEVICE_MULTI_SWITCH = 1218, APPEARANCE_CONTROL_DEVICE_BUTTON = 1219, APPEARANCE_CONTROL_DEVICE_SLIDER = 1220, APPEARANCE_CONTROL_DEVICE_ROTARY = 1221,
  APPEARANCE_CONTROL_DEVICE_TOUCH_PANEL = 1222, APPEARANCE_NETWORK_DEVICE = 1280, APPEARANCE_ACCESS_POINT = 1281, APPEARANCE_SENSOR_GENERIC = 1344,
  APPEARANCE_SENSOR_MOTION = 1345, APPEARANCE_SENSOR_AIR_QUALITY = 1346, APPEARANCE_SENSOR_TEMPERATURE = 1347, APPEARANCE_SENSOR_HUMIDITY = 1348,
  APPEARANCE_SENSOR_LEAK = 1349, APPEARANCE_SENSOR_SMOKE = 1350, APPEARANCE_SENSOR_OCCUPANCY = 1351, APPEARANCE_SENSOR_CONTACT = 1352,
  APPEARANCE_SENSOR_CARBON_MONOXIDE = 1353, APPEARANCE_SENSOR_CARBON_DIOXIDE = 1354, APPEARANCE_SENSOR_AMBIENT_LIGHT = 1355, APPEARANCE_SENSOR_ENERGY = 1356,
  APPEARANCE_SENSOR_COLOR_LIGHT = 1357, APPEARANCE_SENSOR_RAIN = 1358, APPEARANCE_SENSOR_FIRE = 1359, APPEARANCE_SENSOR_WIND = 1360,
  APPEARANCE_SENSOR_PROXYMITY = 1361, APPEARANCE_SENSOR_MULTI_SENSOR = 1362, APPEARANCE_LIGHT_GENERIC_FIXTURE = 1408, APPEARANCE_LIGHT_WALL = 1409,
  APPEARANCE_LIGHT_CEILING = 1410, APPEARANCE_LIGHT_FLOOR = 1411, APPEARANCE_LIGHT_CABINET = 1412, APPEARANCE_LIGHT_DESK = 1413,
  APPEARANCE_LIGHT_TROFFER = 1414, APPEARANCE_LIGHT_PENDANT = 1415, APPEARANCE_LIGHT_IN_GROUND = 1416, APPEARANCE_LIGHT_FLOOD = 1417,
  APPEARANCE_LIGHT_UNDERWATER = 1418, APPEARANCE_LIGHT_BOLLAR = 1419, APPEARANCE_LIGHT_PATHWAY = 1420, APPEARANCE_LIGHT_GARDEN = 1421,
  APPEARANCE_LIGHT_POLE = 1422, APPEARANCE_LIGHT_SPOTLIGHT = 1423, APPEARANCE_LIGHT_LINEAR = 1424, APPEARANCE_LIGHT_STREET = 1425,
  APPEARANCE_LIGHT_SHELVE = 1426, APPEARANCE_LIGHT_HIGH_BAY_LOW_BAY = 1427, APPEARANCE_LIGHT_EMERGENCY_EXIT = 1428, APPEARANCE_LOCATION_AND_NAVIGATION_POD = 5188
}
 GATT appearance definitions. More...
 
enum  wiced_bt_gatt_status_e {
  WICED_BT_GATT_SUCCESS = 0x00, WICED_BT_GATT_INVALID_HANDLE = 0x01, WICED_BT_GATT_READ_NOT_PERMIT = 0x02, WICED_BT_GATT_WRITE_NOT_PERMIT = 0x03,
  WICED_BT_GATT_INVALID_PDU = 0x04, WICED_BT_GATT_INSUF_AUTHENTICATION = 0x05, WICED_BT_GATT_REQ_NOT_SUPPORTED = 0x06, WICED_BT_GATT_INVALID_OFFSET = 0x07,
  WICED_BT_GATT_INSUF_AUTHORIZATION = 0x08, WICED_BT_GATT_PREPARE_Q_FULL = 0x09, WICED_BT_GATT_ATTRIBUTE_NOT_FOUND = 0x0a, WICED_BT_GATT_NOT_LONG = 0x0b,
  WICED_BT_GATT_INSUF_KEY_SIZE = 0x0c, WICED_BT_GATT_INVALID_ATTR_LEN = 0x0d, WICED_BT_GATT_ERR_UNLIKELY = 0x0e, WICED_BT_GATT_INSUF_ENCRYPTION = 0x0f,
  WICED_BT_GATT_UNSUPPORT_GRP_TYPE = 0x10, WICED_BT_GATT_INSUF_RESOURCE = 0x11, WICED_BT_GATT_DATABASE_OUT_OF_SYNC = 0x12, WICED_BT_GATT_VALUE_NOT_ALLOWED = 0x13,
  WICED_BT_GATT_ILLEGAL_PARAMETER = 0x8780, WICED_BT_GATT_NO_RESOURCES = 0x8781, WICED_BT_GATT_INTERNAL_ERROR = 0x8783, WICED_BT_GATT_WRONG_STATE = 0x8784,
  WICED_BT_GATT_DB_FULL = 0x8785, WICED_BT_GATT_BUSY = 0x8786, WICED_BT_GATT_ERROR = 0x8787, WICED_BT_GATT_CMD_STARTED = 0x8788,
  WICED_BT_GATT_PENDING = 0x8789, WICED_BT_GATT_AUTH_FAIL = 0x878A, WICED_BT_GATT_MORE = 0x878B, WICED_BT_GATT_INVALID_CFG = 0x878C,
  WICED_BT_GATT_SERVICE_STARTED = 0x878D, WICED_BT_GATT_ENCRYPTED_MITM = WICED_BT_GATT_SUCCESS, WICED_BT_GATT_ENCRYPTED_NO_MITM = 0x878E, WICED_BT_GATT_NOT_ENCRYPTED = 0x878F,
  WICED_BT_GATT_CONGESTED = 0x8791, WICED_BT_GATT_NOT_ALLOWED = 0x8792, WICED_BT_GATT_HANDLED = 0x8793, WICED_BT_GATT_NO_PENDING_OPERATION = 0x8794,
  WICED_BT_GATT_INDICATION_RESPONSE_PENDING = 0x8795, WICED_BT_GATT_WRITE_REQ_REJECTED = 0x8796, WICED_BT_GATT_CCC_CFG_ERR = 0x8797, WICED_BT_GATT_PRC_IN_PROGRESS = 0x8798,
  WICED_BT_GATT_OUT_OF_RANGE = 0x8799, WICED_BT_GATT_BAD_OPCODE = 0x879A, WICED_BT_GATT_INVALID_CONNECTION_ID = 0xFFFF
}
 GATT Status Codes. More...
 
enum  wiced_bt_gatt_opcode_e {
  GATT_RSP_ERROR = 0x01, GATT_REQ_MTU = 0x02, GATT_RSP_MTU = 0x03, GATT_REQ_FIND_INFO = 0x04,
  GATT_RSP_FIND_INFO = 0x05, GATT_REQ_FIND_TYPE_VALUE = 0x06, GATT_RSP_FIND_TYPE_VALUE = 0x07, GATT_REQ_READ_BY_TYPE = 0x08,
  GATT_RSP_READ_BY_TYPE = 0x09, GATT_REQ_READ = 0x0A, GATT_RSP_READ = 0x0B, GATT_REQ_READ_BLOB = 0x0C,
  GATT_RSP_READ_BLOB = 0x0D, GATT_REQ_READ_MULTI = 0x0E, GATT_RSP_READ_MULTI = 0x0F, GATT_REQ_READ_BY_GRP_TYPE = 0x10,
  GATT_RSP_READ_BY_GRP_TYPE = 0x11, GATT_REQ_WRITE = 0x12, GATT_RSP_WRITE = 0x13, GATT_REQ_PREPARE_WRITE = 0x16,
  GATT_RSP_PREPARE_WRITE = 0x17, GATT_REQ_EXECUTE_WRITE = 0x18, GATT_RSP_EXECUTE_WRITE = 0x19, GATT_HANDLE_VALUE_NOTIF = 0x1B,
  GATT_HANDLE_VALUE_IND = 0x1D, GATT_HANDLE_VALUE_CONF = 0x1E, GATT_REQ_READ_MULTI_VAR_LENGTH = 0x20, GATT_RSP_READ_MULTI_VAR_LENGTH = 0x21,
  GATT_HANDLE_VALUE_MULTI_NOTIF = 0x23, GATT_CMD_WRITE = 0x52, GATT_CMD_SIGNED_WRITE = 0xD2
}
 GATT Operation Codes. More...
 
enum  wiced_bt_gatt_disconn_reason_e {
  GATT_CONN_UNKNOWN = 0, GATT_CONN_L2C_FAILURE = 1, GATT_CONN_TIMEOUT = HCI_ERR_CONNECTION_TOUT, GATT_CONN_TERMINATE_PEER_USER = HCI_ERR_PEER_USER,
  GATT_CONN_TERMINATE_LOCAL_HOST = HCI_ERR_CONN_CAUSE_LOCAL_HOST, GATT_CONN_FAIL_ESTABLISH = HCI_ERR_CONN_FAILED_ESTABLISHMENT, GATT_CONN_LMP_TIMEOUT = HCI_ERR_LMP_RESPONSE_TIMEOUT, GATT_CONN_CANCEL = L2CAP_CONN_CANCEL
}
 GATT Disconnection reason. More...
 
enum  wiced_bt_gatt_client_char_config_e { GATT_CLIENT_CONFIG_NONE = 0x0000, GATT_CLIENT_CONFIG_NOTIFICATION = 0x0001, GATT_CLIENT_CONFIG_INDICATION = 0x0002 }
 characteristic descriptor: client configuration value More...
 
enum  wiced_bt_gatt_server_char_config_e { GATT_SERVER_CONFIG_NONE = 0x0000, GATT_SERVER_CONFIG_BROADCAST = 0x0001 }
 characteristic descriptor: server configuration value More...
 
enum  wiced_bt_gatt_char_properties_e {
  GATT_CHAR_PROPERTIES_BIT_BROADCAST = (1 << 0), GATT_CHAR_PROPERTIES_BIT_READ = (1 << 1), GATT_CHAR_PROPERTIES_BIT_WRITE_NR = (1 << 2), GATT_CHAR_PROPERTIES_BIT_WRITE = (1 << 3),
  GATT_CHAR_PROPERTIES_BIT_NOTIFY = (1 << 4), GATT_CHAR_PROPERTIES_BIT_INDICATE = (1 << 5), GATT_CHAR_PROPERTIES_BIT_AUTH = (1 << 6), GATT_CHAR_PROPERTIES_BIT_EXT_PROP = (1 << 7)
}
 GATT Characteristic Properties Mask. More...
 
enum  wiced_bt_gatt_auth_req_e {
  GATT_AUTH_REQ_NONE = 0, GATT_AUTH_REQ_NO_MITM = 1, GATT_AUTH_REQ_MITM = 2, GATT_AUTH_REQ_SIGNED_NO_MITM = 3,
  GATT_AUTH_REQ_SIGNED_MITM = 4
}
 Authentication requirement. More...
 
enum  wiced_bt_gatt_exec_flag_e { GATT_PREPARE_WRITE_CANCEL = 0x00, GATT_PREPARE_WRITE_EXEC = 0x01 }
 GATT Write Execute request flags. More...
 
enum  wiced_bt_gatt_discovery_type_e {
  GATT_DISCOVER_SERVICES_ALL = 1, GATT_DISCOVER_SERVICES_BY_UUID, GATT_DISCOVER_INCLUDED_SERVICES, GATT_DISCOVER_CHARACTERISTICS,
  GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS, GATT_DISCOVER_MAX
}
 Discovery types. More...
 
enum  wiced_bt_gatt_optype_e {
  GATTC_OPTYPE_NONE = 0, GATTC_OPTYPE_DISCOVERY, GATTC_OPTYPE_READ_HANDLE, GATTC_OPTYPE_READ_BY_TYPE,
  GATTC_OPTYPE_READ_MULTIPLE, GATTC_OPTYPE_WRITE_WITH_RSP, GATTC_OPTYPE_WRITE_NO_RSP, GATTC_OPTYPE_PREPARE_WRITE,
  GATTC_OPTYPE_EXECUTE_WRITE, GATTC_OPTYPE_CONFIG_MTU, GATTC_OPTYPE_NOTIFICATION, GATTC_OPTYPE_INDICATION
}
 GATT client operation type, used in client callback function. More...
 
enum  wiced_bt_gatt_caching_status_e { GATT_PEER_CLIENT_CACHE_CHANGE_AWARE = 0, GATT_PEER_CLIENT_CACHE_CHANGE_UNAWARE = 1, GATT_PEER_CLIENT_CACHE_READY_TO_BE_AWARE = 2 }
 GATT caching status of the peer(client) More...
 
enum  wiced_bt_gatt_format_e {
  GATT_CHAR_PRESENTATION_FORMAT_RES, GATT_CHAR_PRESENTATION_FORMAT_BOOL, GATT_CHAR_PRESENTATION_FORMAT_2BITS, GATT_CHAR_PRESENTATION_FORMAT_NIBBLE,
  GATT_CHAR_PRESENTATION_FORMAT_UINT8, GATT_CHAR_PRESENTATION_FORMAT_UINT12, GATT_CHAR_PRESENTATION_FORMAT_UINT16, GATT_CHAR_PRESENTATION_FORMAT_UINT24,
  GATT_CHAR_PRESENTATION_FORMAT_UINT32, GATT_CHAR_PRESENTATION_FORMAT_UINT48, GATT_CHAR_PRESENTATION_FORMAT_UINT64, GATT_CHAR_PRESENTATION_FORMAT_UINT128,
  GATT_CHAR_PRESENTATION_FORMAT_SINT8, GATT_CHAR_PRESENTATION_FORMAT_SINT12, GATT_CHAR_PRESENTATION_FORMAT_SINT16, GATT_CHAR_PRESENTATION_FORMAT_SINT24,
  GATT_CHAR_PRESENTATION_FORMAT_SINT32, GATT_CHAR_PRESENTATION_FORMAT_SINT48, GATT_CHAR_PRESENTATION_FORMAT_SINT64, GATT_CHAR_PRESENTATION_FORMAT_SINT128,
  GATT_CHAR_PRESENTATION_FORMAT_FLOAT32, GATT_CHAR_PRESENTATION_FORMAT_FLOAT64, GATT_CHAR_PRESENTATION_FORMAT_SFLOAT, GATT_CHAR_PRESENTATION_FORMAT_FLOAT,
  GATT_CHAR_PRESENTATION_FORMAT_DUINT16, GATT_CHAR_PRESENTATION_FORMAT_UTF8S, GATT_CHAR_PRESENTATION_FORMAT_UTF16S, GATT_CHAR_PRESENTATION_FORMAT_STRUCT,
  GATT_CHAR_PRESENTATION_FORMAT_MAX
}
 Format of the value of a characteristic. More...
 
enum  t_gatt_csf_assignments { GATT_CSF_ROBUST_CACHING = 0, GATT_CSF_EATT = 1, GATT_CSF_MULTIPLE_HANDLE_VALUE_NOTIFICATIONS = 2 }
 .Enumeration of known Client Supported Feature Bit assignments of the wiced_bt_gatt_client_supported_features_t More...
 
enum  wiced_bt_gatt_evt_t {
  GATT_CONNECTION_STATUS_EVT, GATT_OPERATION_CPLT_EVT, GATT_DISCOVERY_RESULT_EVT, GATT_DISCOVERY_CPLT_EVT,
  GATT_ATTRIBUTE_REQUEST_EVT, GATT_CONGESTION_EVT, GATT_GET_RESPONSE_BUFFER_EVT, GATT_APP_BUFFER_TRANSMITTED_EVT
}
 GATT events. More...
 

Service and Characteristic macros

#define PRIMARY_SERVICE_UUID16(handle, service)
 Macro to assist 16 bit primary service declaration. More...
 
#define PRIMARY_SERVICE_UUID128(handle, service)
 Macro to assist 128 bit primary service declaration. More...
 
#define SECONDARY_SERVICE_UUID16(handle, service)
 Macro to assist 16 bit secondary service declaration. More...
 
#define SECONDARY_SERVICE_UUID128(handle, service)
 Macro to assist 128 bit secondary service declaration. More...
 
#define INCLUDE_SERVICE_UUID16(handle, service_handle, end_group_handle, service)
 Macro to assist included service declaration. More...
 
#define INCLUDE_SERVICE_UUID128(handle, service_handle, end_group_handle)
 Macro to assist 128 bit included service declaration. More...
 
#define CHARACTERISTIC_UUID16(handle, handle_value, uuid, properties, permission)
 Macro to assist readable 16 bit characteristic declaration. More...
 
#define CHARACTERISTIC_UUID128(handle, handle_value, uuid, properties, permission)
 Macro to assist readable 128 bit characteristic declaration. More...
 
#define CHARACTERISTIC_UUID16_WRITABLE(handle, handle_value, uuid, properties, permission)
 Macro to assist writable 16 bit characteristic declaration. More...
 
#define CHARACTERISTIC_UUID128_WRITABLE(handle, handle_value, uuid, properties, permission)
 Macro to assist writable 128 bit characteristic declaration. More...
 
#define CHAR_DESCRIPTOR_UUID16_WRITABLE(handle, uuid, permission)
 Macro to assist writable 16 bit descriptor declaration. More...
 
#define CHAR_DESCRIPTOR_UUID16(handle, uuid, permission)
 Macro to assist readable 16 bit descriptor declaration. More...
 
#define CHAR_DESCRIPTOR_UUID128_WRITABLE(handle, uuid, permission)
 Macro to assist writable 128 bit descriptor declaration. More...
 
#define CHAR_DESCRIPTOR_UUID128(handle, uuid, permission)
 Macro to assist readable 128 bit descriptor declaration. More...
 
#define CHAR_DESCRIPTOR_EXTENDED_PROPERTIES(handle, ext_properties)
 Macro to assist extended properties declaration. More...
 

Detailed Description

Generic Attribute (GATT) Functions.

The Generic Attribute Profile (GATT) defines a service framework which enables Bluetooth low energy applications to configure themselves as a client or server device.

The profile also provides the capability to perform discovery of services, read, write, notification and indication of characteristics defined on a server.

Macro Definition Documentation

#define BIT16_TO_8 (   val)
Value:
(uint8_t)( (val) & 0xff),/* LSB */ \
(uint8_t)(( (val) >> 8 ) & 0xff) /* MSB */

Conversion macros.

#define CHAR_DESCRIPTOR_EXTENDED_PROPERTIES (   handle,
  ext_properties 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
(uint8_t)(GATTDB_PERM_READABLE), \
(uint8_t)(GATTDB_UUID16_SIZE + 1), \
BIT16_TO_8(GATT_UUID_CHAR_EXT_PROP),\
(uint8_t)(ext_properties)
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_UUID16_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:498
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist extended properties declaration.

#define CHAR_DESCRIPTOR_UUID128 (   handle,
  uuid,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
(uint8_t)(permission | GATTDB_PERM_SERVICE_UUID_128), \
(uint8_t)(GATTDB_UUID128_SIZE), \
#define GATTDB_PERM_SERVICE_UUID_128
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:474
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID128_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:499

Macro to assist readable 128 bit descriptor declaration.

#define CHAR_DESCRIPTOR_UUID128_WRITABLE (   handle,
  uuid,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
(uint8_t)(permission | GATTDB_PERM_SERVICE_UUID_128), \
(uint8_t)(GATTDB_UUID128_SIZE), \
(uint8_t)(0), \
#define GATTDB_PERM_SERVICE_UUID_128
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:474
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID128_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:499

Macro to assist writable 128 bit descriptor declaration.

#define CHAR_DESCRIPTOR_UUID16 (   handle,
  uuid,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
(uint8_t)(permission), \
(uint8_t)(GATTDB_UUID16_SIZE), \
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID16_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:498

Macro to assist readable 16 bit descriptor declaration.

#define CHAR_DESCRIPTOR_UUID16_WRITABLE (   handle,
  uuid,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
(uint8_t)(permission), \
(uint8_t)(GATTDB_UUID16_SIZE), \
(uint8_t)(0), \
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID16_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:498

Macro to assist writable 16 bit descriptor declaration.

#define CHARACTERISTIC_UUID128 (   handle,
  handle_value,
  uuid,
  properties,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
21, \
BIT16_TO_8(GATT_UUID_CHAR_DECLARE), \
(uint8_t)(properties), \
BIT16_TO_8((uint16_t)(handle_value)), \
BIT16_TO_8((uint16_t)(handle_value)), \
(uint8_t)(permission | GATTDB_PERM_SERVICE_UUID_128), \
(uint8_t)(GATTDB_UUID128_SIZE), \
#define GATTDB_PERM_SERVICE_UUID_128
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:474
wiced_bt_mesh_core_config_property_t * properties
Array of properties of that element.
Definition: wiced_bt_mesh_cfg.h:209
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID128_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:499
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist readable 128 bit characteristic declaration.

#define CHARACTERISTIC_UUID128_WRITABLE (   handle,
  handle_value,
  uuid,
  properties,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
21, \
BIT16_TO_8(GATT_UUID_CHAR_DECLARE), \
(uint8_t)(properties), \
BIT16_TO_8((uint16_t)(handle_value)), \
BIT16_TO_8((uint16_t)(handle_value)), \
(uint8_t)(permission | GATTDB_PERM_SERVICE_UUID_128), \
(uint8_t)(GATTDB_UUID128_SIZE), \
(uint8_t)(0), \
#define GATTDB_PERM_SERVICE_UUID_128
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:474
wiced_bt_mesh_core_config_property_t * properties
Array of properties of that element.
Definition: wiced_bt_mesh_cfg.h:209
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID128_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:499
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist writable 128 bit characteristic declaration.

#define CHARACTERISTIC_UUID16 (   handle,
  handle_value,
  uuid,
  properties,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
0x07, \
BIT16_TO_8(GATT_UUID_CHAR_DECLARE), \
(uint8_t)(properties), \
BIT16_TO_8((uint16_t)(handle_value)), \
BIT16_TO_8((uint16_t)(handle_value)), \
(uint8_t)(permission), \
(uint8_t)(GATTDB_UUID16_SIZE), \
wiced_bt_mesh_core_config_property_t * properties
Array of properties of that element.
Definition: wiced_bt_mesh_cfg.h:209
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID16_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:498
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist readable 16 bit characteristic declaration.

#define CHARACTERISTIC_UUID16_WRITABLE (   handle,
  handle_value,
  uuid,
  properties,
  permission 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
0x07, \
BIT16_TO_8(GATT_UUID_CHAR_DECLARE), \
(uint8_t)(properties), \
BIT16_TO_8((uint16_t)(handle_value)), \
BIT16_TO_8((uint16_t)(handle_value)), \
(uint8_t)(permission), \
(uint8_t)(GATTDB_UUID16_SIZE), \
(uint8_t)(0), \
wiced_bt_mesh_core_config_property_t * properties
Array of properties of that element.
Definition: wiced_bt_mesh_cfg.h:209
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
uint8_t uuid[16]
UUID of the node to provision.
Definition: wiced_bt_mesh_core.h:137
#define GATTDB_UUID16_SIZE
UUID lengths.
Definition: wiced_bt_gatt.h:498
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist writable 16 bit characteristic declaration.

#define GATTDB_PERM_MASK   (0x7f)

All the permission bits.

#define INCLUDE_SERVICE_UUID128 (   handle,
  service_handle,
  end_group_handle 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
6, \
BIT16_TO_8(GATT_UUID_INCLUDE_SERVICE), \
BIT16_TO_8(service_handle), \
BIT16_TO_8(end_group_handle)
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist 128 bit included service declaration.

#define INCLUDE_SERVICE_UUID16 (   handle,
  service_handle,
  end_group_handle,
  service 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
8, \
BIT16_TO_8(GATT_UUID_INCLUDE_SERVICE), \
BIT16_TO_8(service_handle), \
BIT16_TO_8(end_group_handle), \
BIT16_TO_8(service)
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist included service declaration.

#define LEGATTDB_PERM_NONE   GATTDB_PERM_NONE

Since the GATT DB macro names were changed from LEGATTDB_xxx from GATTDB_xxx, these backwards compatibility macros are temporarily defined to minimize impact on applications.

It is expected that they wll be deprecated over time.To be deprecated, defined for backward compatiablility

#define PRIMARY_SERVICE_UUID128 (   handle,
  service 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
18, \
BIT16_TO_8(GATT_UUID_PRI_SERVICE), \
service
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist 128 bit primary service declaration.

#define PRIMARY_SERVICE_UUID16 (   handle,
  service 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
4, \
BIT16_TO_8((GATT_UUID_PRI_SERVICE)), \
BIT16_TO_8((service))
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist 16 bit primary service declaration.

#define SECONDARY_SERVICE_UUID128 (   handle,
  service 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
18, \
BIT16_TO_8(GATT_UUID_SEC_SERVICE), \
service
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist 128 bit secondary service declaration.

#define SECONDARY_SERVICE_UUID16 (   handle,
  service 
)
Value:
BIT16_TO_8((uint16_t)(handle)), \
4, \
BIT16_TO_8((GATT_UUID_SEC_SERVICE)), \
BIT16_TO_8((service))
#define BIT16_TO_8(val)
Conversion macros.
Definition: wiced_bt_gatt.h:494
#define GATTDB_PERM_READABLE
The permission bits (see Vol 3, Part F, 3.2.5)
Definition: wiced_bt_gatt.h:465

Macro to assist 16 bit secondary service declaration.

Typedef Documentation

typedef uint16_t wiced_bt_eatt_lcid_list[EATT_CHANNELS_PER_TRANSACTION]

list of EATT lcid's

LCID: L2CAP Channel ID L2CAP channel ids are assigned by L2CAP during the channel creation process. The list is passed to the application using wiced_bt_gatt_eatt_connection_indication_event_t

typedef wiced_bt_gatt_status_t wiced_bt_gatt_cback_t(wiced_bt_gatt_evt_t event, wiced_bt_gatt_event_data_t *p_event_data)

GATT event notification callback.

Callback for GATT event notifications Registered using wiced_bt_gatt_register()

Parameters
[in]event: Event ID
[in]p_event_data: Event data
Returns
Status of event handling
typedef uint16_t wiced_bt_gatt_eatt_conn_id_list[EATT_CHANNELS_PER_TRANSACTION]

list of EATT connection id's

Data Receive Buffer Data Receive Buffer or DRB is a memory area of type tDRB and size(channel MTU size + DRB_OVERHEAD_SIZE). The DRB buffer is allocated by the application during channel creation. The allocated DRBs are passed to the GATT layer when establishing an EATT connection. a) As a connection initiator with wiced_bt_gatt_eatt_connect b) As a connection responder with wiced_bt_gatt_eatt_connection_response_t Application has to allocate one DRB per GATT bearer of size equal to that of desired local MTU.

typedef void(* wiced_bt_gatt_eatt_on_connect_ind_t)(wiced_bt_gatt_eatt_connection_indication_event_t *p_ind)

Function callbacks for EATT.

callback upon GATT EATT connection

typedef uint8_t wiced_bt_gatt_optype_t

GATT Client Operation Codes.

GATT client operation type (see wiced_bt_gatt_optype_e)

Enumeration Type Documentation

GATT appearance definitions.

Enumerator
APPEARANCE_CONTROL_DEVICE_MULTI_SWITCH 

Switch Control Device subtype.

APPEARANCE_CONTROL_DEVICE_BUTTON 

Multi - switch.

APPEARANCE_CONTROL_DEVICE_SLIDER 

Button.

APPEARANCE_CONTROL_DEVICE_ROTARY 

Slider.

APPEARANCE_CONTROL_DEVICE_TOUCH_PANEL 

Rotary.

APPEARANCE_NETWORK_DEVICE 

Touch - panel.

APPEARANCE_ACCESS_POINT 

Generic Network Device Generic category.

APPEARANCE_SENSOR_GENERIC 

Access Point Generic Network subtype.

APPEARANCE_SENSOR_MOTION 

Generic Sensor Generic category.

APPEARANCE_SENSOR_AIR_QUALITY 

Motion Sensor.

APPEARANCE_SENSOR_TEMPERATURE 

Air Quality Sensor.

APPEARANCE_SENSOR_HUMIDITY 

Temperature Sensor.

APPEARANCE_SENSOR_LEAK 

Humidity Sensor.

APPEARANCE_SENSOR_SMOKE 

Leak Sensor.

APPEARANCE_SENSOR_OCCUPANCY 

Smoke Sensor.

APPEARANCE_SENSOR_CONTACT 

Occupancy Sensor.

APPEARANCE_SENSOR_CARBON_MONOXIDE 

Contact Sensor.

APPEARANCE_SENSOR_CARBON_DIOXIDE 

Carbon Monoxide Sensor.

APPEARANCE_SENSOR_AMBIENT_LIGHT 

Carbon Dioxide Sensor.

APPEARANCE_SENSOR_ENERGY 

Ambient Light Sensor.

APPEARANCE_SENSOR_COLOR_LIGHT 

Energy Sensor.

APPEARANCE_SENSOR_RAIN 

Color Light Sensor.

APPEARANCE_SENSOR_FIRE 

Rain Sensor.

APPEARANCE_SENSOR_WIND 

Fire SensorF.

APPEARANCE_SENSOR_PROXYMITY 

Wind Sensor.

APPEARANCE_SENSOR_MULTI_SENSOR 

Proximity Sensor.

APPEARANCE_LIGHT_GENERIC_FIXTURE 

Multi - Sensor.

APPEARANCE_LIGHT_WALL 

Generic Light Fixtures Generic category.

APPEARANCE_LIGHT_CEILING 

Wall Light.

APPEARANCE_LIGHT_FLOOR 

Ceiling Light.

APPEARANCE_LIGHT_CABINET 

Floor Light.

APPEARANCE_LIGHT_DESK 

Cabinet Light.

APPEARANCE_LIGHT_TROFFER 

Desk Light.

APPEARANCE_LIGHT_PENDANT 

Troffer Light.

APPEARANCE_LIGHT_IN_GROUND 

Pendant Light.

APPEARANCE_LIGHT_FLOOD 

In - ground Light.

APPEARANCE_LIGHT_UNDERWATER 

Flood Light.

APPEARANCE_LIGHT_BOLLAR 

Underwater Light.

APPEARANCE_LIGHT_PATHWAY 

Bollard with Light.

APPEARANCE_LIGHT_GARDEN 

Pathway Light.

APPEARANCE_LIGHT_POLE 

Garden Light.

APPEARANCE_LIGHT_SPOTLIGHT 

Pole - top Light.

APPEARANCE_LIGHT_LINEAR 

Spotlight.

APPEARANCE_LIGHT_STREET 

Linear Light.

APPEARANCE_LIGHT_SHELVE 

Street Light.

APPEARANCE_LIGHT_HIGH_BAY_LOW_BAY 

Shelves Light.

APPEARANCE_LIGHT_EMERGENCY_EXIT 

High - bay / Low - bay Light.

APPEARANCE_LOCATION_AND_NAVIGATION_POD 

Emergency Exit Light.

.Enumeration of known Client Supported Feature Bit assignments of the wiced_bt_gatt_client_supported_features_t

Enumerator
GATT_CSF_ROBUST_CACHING 

Client supports Robust Caching.

GATT_CSF_EATT 

Client supports Enhanaced ATT bearers.

GATT_CSF_MULTIPLE_HANDLE_VALUE_NOTIFICATIONS 

Client supports receiving multiple handle value notifications.

Authentication requirement.

Enumerator
GATT_AUTH_REQ_NONE 

No Authentication Required.

GATT_AUTH_REQ_NO_MITM 

Unauthenticated encryption (No MITM)

GATT_AUTH_REQ_MITM 

Authenticated encryption (MITM)

GATT_AUTH_REQ_SIGNED_NO_MITM 

Signed Data (No MITM)

GATT_AUTH_REQ_SIGNED_MITM 

Signed Data (MITM)

GATT caching status of the peer(client)

Enumerator
GATT_PEER_CLIENT_CACHE_CHANGE_AWARE 

Peer client is cache aware.

GATT_PEER_CLIENT_CACHE_CHANGE_UNAWARE 

Peer client is cache unaware.

GATT_PEER_CLIENT_CACHE_READY_TO_BE_AWARE 

Peer client is reading the database hash.

GATT Characteristic Properties Mask.

Enumerator
GATT_CHAR_PROPERTIES_BIT_BROADCAST 

bit 0: Broadcast

GATT_CHAR_PROPERTIES_BIT_READ 

bit 1: Read

GATT_CHAR_PROPERTIES_BIT_WRITE_NR 

bit 2: Write (No Response)

GATT_CHAR_PROPERTIES_BIT_WRITE 

bit 3: Write

GATT_CHAR_PROPERTIES_BIT_NOTIFY 

bit 4: Notify

GATT_CHAR_PROPERTIES_BIT_INDICATE 

bit 5: Indicate

GATT_CHAR_PROPERTIES_BIT_AUTH 

bit 6: Authenticate

GATT_CHAR_PROPERTIES_BIT_EXT_PROP 

bit 7: Extended Properties

characteristic descriptor: client configuration value

Enumerator
GATT_CLIENT_CONFIG_NONE 

Does not allow both notifications and indications.

GATT_CLIENT_CONFIG_NOTIFICATION 

Allows notifications.

GATT_CLIENT_CONFIG_INDICATION 

Allows indications.

GATT Disconnection reason.

Enumerator
GATT_CONN_UNKNOWN 

Unknown reason.

GATT_CONN_L2C_FAILURE 

General L2cap failure.

GATT_CONN_TIMEOUT 

Connection timeout.

GATT_CONN_TERMINATE_PEER_USER 

Connection terminated by peer user.

GATT_CONN_TERMINATE_LOCAL_HOST 

Connection terminated by local host.

GATT_CONN_FAIL_ESTABLISH 

Connection fail to establish.

GATT_CONN_LMP_TIMEOUT 

Connection fail due to LMP response tout.

GATT_CONN_CANCEL 

L2CAP connection cancelled.

Discovery types.

Enumerator
GATT_DISCOVER_SERVICES_ALL 

discover all services

GATT_DISCOVER_SERVICES_BY_UUID 

discover service by UUID

GATT_DISCOVER_INCLUDED_SERVICES 

discover an included service within a service

GATT_DISCOVER_CHARACTERISTICS 

discover characteristics of a service with/without type requirement

GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 

discover characteristic descriptors of a character

GATT_DISCOVER_MAX 

maximum discovery types

GATT events.

Enumerator
GATT_CONNECTION_STATUS_EVT 

GATT connection status change.

Event data: wiced_bt_gatt_connection_status_t

GATT_OPERATION_CPLT_EVT 

GATT client events.

Event data: wiced_bt_gatt_event_data_t

GATT_DISCOVERY_RESULT_EVT 

GATT attribute discovery result.

Event data: wiced_bt_gatt_discovery_result_t

GATT_DISCOVERY_CPLT_EVT 

GATT attribute discovery complete.

Event data: wiced_bt_gatt_event_data_t

GATT_ATTRIBUTE_REQUEST_EVT 

GATT attribute request (from remote client).

Event data: wiced_bt_gatt_attribute_request_t

GATT_CONGESTION_EVT 

GATT congestion (running low in tx buffers).

Event data: wiced_bt_gatt_congestion_event_t TODO: add more details regarding congestion

GATT_GET_RESPONSE_BUFFER_EVT 

GATT buffer request, typically sized to max of bearer mtu - 1.

GATT_APP_BUFFER_TRANSMITTED_EVT 

GATT buffer transmitted event, check wiced_bt_gatt_buffer_transmitted_t.

GATT Write Execute request flags.

Enumerator
GATT_PREPARE_WRITE_CANCEL 

GATT_PREP_WRITE_CANCEL.

GATT_PREPARE_WRITE_EXEC 

GATT_PREP_WRITE_EXEC.

Format of the value of a characteristic.

Enumeration types for the

See also
UUID_DESCRIPTOR_CHARACTERISTIC_PRESENTATION_FORMAT descriptor

GATT Operation Codes.

All GATT_REQ_xxx are sent by the client and received on the server. All GATT_RSP_xxx are sent by the server in response to the specific requests from client All GATT_CMD_xxx are sent by client and received on the server. The server shall not send any response to the received GATT_CMD_xxx

GATT_HANDLE_VALUE_NOTIF, GATT_HANDLE_VALUE_IND and GATT_HANDLE_VALUE_MULTI_NOTIF are sent by server to notify/indicate changes to handle values on the server GATT_HANDLE_VALUE_CONF is sent by the client in response to GATT_HANDLE_VALUE_IND

Enumerator
GATT_RSP_ERROR 

Error Response.

GATT_REQ_MTU 

Exchange MTU Request.

GATT_RSP_MTU 

Exchange MTU Response.

GATT_REQ_FIND_INFO 

Find Information Request.

GATT_RSP_FIND_INFO 

Find Information Response.

GATT_REQ_FIND_TYPE_VALUE 

Find By Type Value Request.

GATT_RSP_FIND_TYPE_VALUE 

Find By Type Value Response.

GATT_REQ_READ_BY_TYPE 

Read By Type Request.

GATT_RSP_READ_BY_TYPE 

Read By Type Response.

GATT_REQ_READ 

Read Request.

GATT_RSP_READ 

Read Response.

GATT_REQ_READ_BLOB 

Read Blob Request.

GATT_RSP_READ_BLOB 

Read Blob Response.

GATT_REQ_READ_MULTI 

Read Multiple Request.

GATT_RSP_READ_MULTI 

Read Multiple Response.

GATT_REQ_READ_BY_GRP_TYPE 

Read By Group Type Request.

GATT_RSP_READ_BY_GRP_TYPE 

Read By Group Type Response.

GATT_REQ_WRITE 

Write Request.

GATT_RSP_WRITE 

Write Response.

GATT_REQ_PREPARE_WRITE 

Prepare Write Request.

GATT_RSP_PREPARE_WRITE 

Prepare Write Response.

GATT_REQ_EXECUTE_WRITE 

Execute Write Request.

GATT_RSP_EXECUTE_WRITE 

Execute Write Response.

GATT_HANDLE_VALUE_NOTIF 

Handle Value Notification.

GATT_HANDLE_VALUE_IND 

Handle Value Indication.

GATT_HANDLE_VALUE_CONF 

Handle Value Confirmation.

GATT_REQ_READ_MULTI_VAR_LENGTH 

Read Multiple Variable Length Request.

GATT_RSP_READ_MULTI_VAR_LENGTH 

Read Multiple Variable Length Response.

GATT_HANDLE_VALUE_MULTI_NOTIF 

Handle Value Multiple Notifications.

GATT_CMD_WRITE 

Write Command.

GATT_CMD_SIGNED_WRITE 

changed in V4.0 1101-0010 (signed write) see write cmd above

GATT client operation type, used in client callback function.

Enumerator
GATTC_OPTYPE_NONE 

None.

GATTC_OPTYPE_DISCOVERY 

Discovery.

GATTC_OPTYPE_READ_HANDLE 

Read handle or Read blob.

GATTC_OPTYPE_READ_BY_TYPE 

Read by type operation.

GATTC_OPTYPE_READ_MULTIPLE 

Read multiple, or read multiple var length.

GATTC_OPTYPE_WRITE_WITH_RSP 

Write with response.

GATTC_OPTYPE_WRITE_NO_RSP 

Write no response.

GATTC_OPTYPE_PREPARE_WRITE 

Prepare Write.

GATTC_OPTYPE_EXECUTE_WRITE 

Execute Write.

GATTC_OPTYPE_CONFIG_MTU 

Configure MTU.

GATTC_OPTYPE_NOTIFICATION 

Notification.

GATTC_OPTYPE_INDICATION 

Indication.

characteristic descriptor: server configuration value

Enumerator
GATT_SERVER_CONFIG_NONE 

No broadcast.

GATT_SERVER_CONFIG_BROADCAST 

Broadcast.

GATT Status Codes.

Enumerator
WICED_BT_GATT_SUCCESS 

Success.

WICED_BT_GATT_INVALID_HANDLE 

Invalid Handle.

WICED_BT_GATT_READ_NOT_PERMIT 

Read Not Permitted.

WICED_BT_GATT_WRITE_NOT_PERMIT 

Write Not permitted.

WICED_BT_GATT_INVALID_PDU 

Invalid PDU.

WICED_BT_GATT_INSUF_AUTHENTICATION 

Insufficient Authentication.

WICED_BT_GATT_REQ_NOT_SUPPORTED 

Request Not Supported.

WICED_BT_GATT_INVALID_OFFSET 

Invalid Offset.

WICED_BT_GATT_INSUF_AUTHORIZATION 

Insufficient Authorization.

WICED_BT_GATT_PREPARE_Q_FULL 

Prepare Queue Full.

WICED_BT_GATT_ATTRIBUTE_NOT_FOUND 

Attribute Not Found.

WICED_BT_GATT_NOT_LONG 

Not Long Size.

WICED_BT_GATT_INSUF_KEY_SIZE 

Insufficient Key Size.

WICED_BT_GATT_INVALID_ATTR_LEN 

Invalid Attribute Length.

WICED_BT_GATT_ERR_UNLIKELY 

Error Unlikely.

WICED_BT_GATT_INSUF_ENCRYPTION 

Insufficient Encryption.

WICED_BT_GATT_UNSUPPORT_GRP_TYPE 

Unsupported Group Type.

WICED_BT_GATT_INSUF_RESOURCE 

Insufficient Resource.

WICED_BT_GATT_DATABASE_OUT_OF_SYNC 

GATT Database Out of Sync.

WICED_BT_GATT_VALUE_NOT_ALLOWED 

Value Not allowed.

WICED_BT_GATT_ILLEGAL_PARAMETER 

Illegal Parameter.

WICED_BT_GATT_NO_RESOURCES 

No Resources.

WICED_BT_GATT_INTERNAL_ERROR 

Internal Error.

WICED_BT_GATT_WRONG_STATE 

Wrong State.

WICED_BT_GATT_DB_FULL 

DB Full.

WICED_BT_GATT_BUSY 

Busy.

WICED_BT_GATT_ERROR 

Error.

WICED_BT_GATT_CMD_STARTED 

Command Started.

WICED_BT_GATT_PENDING 

Pending.

WICED_BT_GATT_AUTH_FAIL 

Authentication Fail.

WICED_BT_GATT_MORE 

More.

WICED_BT_GATT_INVALID_CFG 

Invalid Configuration.

WICED_BT_GATT_SERVICE_STARTED 

Service Started.

WICED_BT_GATT_ENCRYPTED_MITM 

Encrypted MITM.

WICED_BT_GATT_ENCRYPTED_NO_MITM 

Encrypted No MITM.

WICED_BT_GATT_NOT_ENCRYPTED 

Not Encrypted.

WICED_BT_GATT_CONGESTED 

Congested.

WICED_BT_GATT_NOT_ALLOWED 

Operation not allowed.

WICED_BT_GATT_HANDLED 

Set by application to indicate it has responded to the message.

WICED_BT_GATT_NO_PENDING_OPERATION 

No pending client operation for the response sent by app.

WICED_BT_GATT_INDICATION_RESPONSE_PENDING 

Indication response pending.

WICED_BT_GATT_WRITE_REQ_REJECTED 

Client Write operation rejected.

WICED_BT_GATT_CCC_CFG_ERR 

Improper Client Char Configuration.

WICED_BT_GATT_PRC_IN_PROGRESS 

Procedure Already in Progress.

WICED_BT_GATT_OUT_OF_RANGE 

Value Out of Range.

WICED_BT_GATT_BAD_OPCODE 

Bad opcode.

WICED_BT_GATT_INVALID_CONNECTION_ID 

Invalid connection id.