Microchip® Advanced Software Framework

gattc_task.h File Reference
#include "cmn_defs.h"

Enumerations

enum  ATT_ERR {
  ATT_ERR_NO_ERROR = 0x00,
  ATT_ERR_INVALID_HANDLE,
  ATT_ERR_READ_NOT_PERMITTED,
  ATT_ERR_WRITE_NOT_PERMITTED,
  ATT_ERR_INVALID_PDU,
  ATT_ERR_INSUFF_AUTHEN,
  ATT_ERR_REQUEST_NOT_SUPPORTED,
  ATT_ERR_INVALID_OFFSET,
  ATT_ERR_INSUFF_AUTHOR,
  ATT_ERR_PREPARE_QUEUE_FULL,
  ATT_ERR_ATTRIBUTE_NOT_FOUND,
  ATT_ERR_ATTRIBUTE_NOT_LONG,
  ATT_ERR_INSUFF_ENC_KEY_SIZE,
  ATT_ERR_INVALID_ATTRIBUTE_VAL_LEN,
  ATT_ERR_UNLIKELY_ERR,
  ATT_ERR_INSUFF_ENC,
  ATT_ERR_UNSUPP_GRP_TYPE,
  ATT_ERR_INSUFF_RESOURCE,
  ATT_ERR_APP_ERROR = 0x80,
  ATT_ERR_LAST
}
 Attribute Error Code from BT 4.0 specs. More...
 
enum  gattc_msg_id {
  GATTC_CMP_EVT = 0x3000,
  GATTC_EXC_MTU_CMD,
  GATTC_DISC_CMD,
  GATTC_DISC_SVC_IND,
  GATTC_DISC_SVC_INCL_IND,
  GATTC_DISC_CHAR_IND,
  GATTC_DISC_CHAR_DESC_IND,
  GATTC_READ_CMD,
  GATTC_READ_IND,
  GATTC_WRITE_CMD,
  GATTC_EXECUTE_WRITE_CMD,
  GATTC_EVENT_IND,
  GATTC_REG_TO_PEER_EVT_CMD,
  GATTC_SEND_EVT_CMD,
  GATTC_WRITE_CMD_IND,
  GATTC_SEND_SVC_CHANGED_CMD,
  GATTC_SVC_CHANGED_CFG_IND,
  GATTC_WRITE_CMD_CFM
}
 GATT Task messages. More...
 
enum  gattc_operation {
  GATTC_NO_OP = 0x00,
  GATTC_MTU_EXCH,
  GATTC_DISC_ALL_SVC,
  GATTC_DISC_BY_UUID_SVC,
  GATTC_DISC_INCLUDED_SVC,
  GATTC_DISC_ALL_CHAR,
  GATTC_DISC_BY_UUID_CHAR,
  GATTC_DISC_DESC_CHAR,
  GATTC_READ,
  GATTC_READ_LONG,
  GATTC_READ_BY_UUID,
  GATTC_READ_MULTIPLE,
  GATTC_WRITE,
  GATTC_WRITE_NO_RESPONSE,
  GATTC_WRITE_SIGNED,
  GATTC_EXEC_WRITE,
  GATTC_REGISTER,
  GATTC_UNREGISTER,
  GATTC_NOTIFY,
  GATTC_INDICATE,
  GATTC_SVC_CHANGED,
  GATTC_LAST
}
 request operation type - application interface More...
 

Functions

at_ble_events_t gattc_complete_evt_handler (uint16_t src, uint8_t *data, void *params)
 
at_ble_status_t gattc_disc_char_desc_ind_parser (uint16_t src, uint8_t *data, at_ble_descriptor_found_t *params)
 
at_ble_status_t gattc_disc_char_ind_parser (uint16_t src, uint8_t *data, at_ble_characteristic_found_t *params)
 
at_ble_status_t gattc_disc_cmd_handler (uint8_t u8ReqType, uint8_t u8UUIDLen, uint16_t u16StartHdl, uint16_t u16EndHdl, uint8_t *pu8UUID, uint16_t u16ConHdl)
 
at_ble_status_t gattc_disc_svc_incl_ind_parser (uint16_t src, uint8_t *data, at_ble_included_service_found_t *params)
 
at_ble_status_t gattc_disc_svc_ind_parser (uint16_t src, uint8_t *data, at_ble_primary_service_found_t *params)
 
at_ble_events_t gattc_event_ind_parser (uint16_t src, uint8_t *data, void *params)
 
at_ble_status_t gattc_execute_write_cmd_handler (uint8_t u8Execute, uint16_t u16ConHdl)
 
at_ble_status_t gattc_mtu_cmd_handler (uint16_t u16ConHdl)
 
at_ble_status_t gattc_read_cmd_handler_by_uuid (uint16_t u16StartHdl, uint16_t u16EndHdl, uint8_t u8UUIDLen, uint8_t *pu8UUID, uint16_t u16ConHdl)
 
at_ble_status_t gattc_read_cmd_handler_multible (uint16_t *u16Handle_list, uint8_t u8Count, uint16_t *u16Length_list, uint16_t u16ConHdl)
 
at_ble_status_t gattc_read_cmd_handler_simple_read (uint16_t u16Handle, uint16_t u16Offset, uint16_t u16Len, uint16_t u16ConHdl)
 
at_ble_status_t gattc_read_ind_parser (uint16_t src, uint8_t *data, at_ble_characteristic_read_response_t *params)
 
at_ble_status_t gattc_reg_to_peer_handler (uint8_t u8ReqType, uint16_t u16StartHdl, uint16_t u16EndHdl, uint16_t u16ConHdl)
 
at_ble_status_t gattc_send_evt_cmd_handler (uint8_t u8ReqType, uint16_t u16AttHdl, uint16_t u16ConHdl)
 
at_ble_status_t gattc_svc_changed_notification_cmd_handler (uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle)
 
at_ble_status_t gattc_write_cmd_handler (uint8_t u8ReqType, uint8_t u8AutoExec, uint16_t u16AttHdl, uint16_t u16Offset, uint16_t u16Length, uint8_t *pu8Val, uint16_t u16ConHdl)
 
at_ble_status_t gattc_write_cmd_ind (uint16_t src, uint8_t *data, at_ble_characteristic_changed_t *params)
 
at_ble_status_t gattc_write_cmd_ind_handler (uint8_t *msg, uint16_t len)
 

enum ATT_ERR

Attribute Error Code from BT 4.0 specs.

Enumerator
ATT_ERR_NO_ERROR 

0x00: No error

ATT_ERR_INVALID_HANDLE 

0x01: Handle is invalid

ATT_ERR_READ_NOT_PERMITTED 

0x02: Read permission disabled

ATT_ERR_WRITE_NOT_PERMITTED 

0x03: Write permission disabled

ATT_ERR_INVALID_PDU 

0x04: Incorrect PDU

ATT_ERR_INSUFF_AUTHEN 

0x05: Authentication privilege not enough

ATT_ERR_REQUEST_NOT_SUPPORTED 

0x06: Request not supported or not understood

ATT_ERR_INVALID_OFFSET 

0x07: Incorrect offset value

ATT_ERR_INSUFF_AUTHOR 

0x08: Authorization privilege not enough

ATT_ERR_PREPARE_QUEUE_FULL 

0x09: Capacity queue for reliable write reached

ATT_ERR_ATTRIBUTE_NOT_FOUND 

0x0A: Attribute requested not existing

ATT_ERR_ATTRIBUTE_NOT_LONG 

0x0B: Attribute requested not long

ATT_ERR_INSUFF_ENC_KEY_SIZE 

0x0C: Encryption size not sufficient

ATT_ERR_INVALID_ATTRIBUTE_VAL_LEN 

0x0D: Invalid length of the attribute value

ATT_ERR_UNLIKELY_ERR 

0x0E: Operation not fit to condition

ATT_ERR_INSUFF_ENC 

0x0F: Attribute requires encryption before operation

ATT_ERR_UNSUPP_GRP_TYPE 

0x10: Attribute grouping not supported

ATT_ERR_INSUFF_RESOURCE 

0x11: Resources not sufficient to complete the request

ATT_ERR_APP_ERROR 

0x80: Application Error

ATT_ERR_LAST 

Maximum attribute defined errors.

GATT Task messages.

Enumerator
GATTC_CMP_EVT 

Command Complete event.

GATTC_EXC_MTU_CMD 

Server configuration request.

GATTC_DISC_CMD 

Discovery command.

GATTC_DISC_SVC_IND 

Discovery services indication.

GATTC_DISC_SVC_INCL_IND 

Discover included services indication.

GATTC_DISC_CHAR_IND 

Discover characteristic indication.

GATTC_DISC_CHAR_DESC_IND 

Discovery characteristic descriptor indication.

GATTC_READ_CMD 

Read command.

GATTC_READ_IND 

Read response.

GATTC_WRITE_CMD 

Write command request.

GATTC_EXECUTE_WRITE_CMD 

Execute write characteristic request.

GATTC_EVENT_IND 

peer device triggers an event (indication or notification)

GATTC_REG_TO_PEER_EVT_CMD 

Registration to peer device events (Indication/Notification).

GATTC_SEND_EVT_CMD 

send an event to peer device

GATTC_WRITE_CMD_IND 

Write command indicated to upper layers.

GATTC_SEND_SVC_CHANGED_CMD 

Send a Service Changed indication to a device (message structure is struct gattm_svc_changed_ind_req)

GATTC_SVC_CHANGED_CFG_IND 

Inform the application when sending of Service Changed indications has been enabled or disabled.

GATTC_WRITE_CMD_CFM 

Write command confirmation from upper layers.

request operation type - application interface

Enumerator
GATTC_NO_OP 

No operation.

GATTC_MTU_EXCH 

Perform MTU exchange.

GATTC_DISC_ALL_SVC 

Discover all services.

GATTC_DISC_BY_UUID_SVC 

Discover services by UUID.

GATTC_DISC_INCLUDED_SVC 

Discover included services.

GATTC_DISC_ALL_CHAR 

Discover all characteristics.

GATTC_DISC_BY_UUID_CHAR 

Discover characteristic by UUID.

GATTC_DISC_DESC_CHAR 

Discover characteristic descriptor.

GATTC_READ 

Read attribute.

GATTC_READ_LONG 

Read long attribute.

GATTC_READ_BY_UUID 

Read attribute by UUID.

GATTC_READ_MULTIPLE 

Read multiple attribute.

GATTC_WRITE 

Write attribute.

GATTC_WRITE_NO_RESPONSE 

Write no response.

GATTC_WRITE_SIGNED 

Write signed.

GATTC_EXEC_WRITE 

Execute write.

GATTC_REGISTER 

Register to peer device events.

GATTC_UNREGISTER 

Unregister from peer device events.

GATTC_NOTIFY 

Send an attribute notification.

GATTC_INDICATE 

Send an attribute indication.

GATTC_SVC_CHANGED 

Send a service changed indication.

GATTC_LAST 

Last GATT flag.

at_ble_status_t gattc_read_cmd_handler_by_uuid ( uint16_t  u16StartHdl,
uint16_t  u16EndHdl,
uint8_t  u8UUIDLen,
uint8_t *  pu8UUID,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_read_cmd_handler_multible ( uint16_t *  u16Handle_list,
uint8_t  u8Count,
uint16_t *  u16Length_list,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_read_cmd_handler_simple_read ( uint16_t  u16Handle,
uint16_t  u16Offset,
uint16_t  u16Len,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_reg_to_peer_handler ( uint8_t  u8ReqType,
uint16_t  u16StartHdl,
uint16_t  u16EndHdl,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_send_evt_cmd_handler ( uint8_t  u8ReqType,
uint16_t  u16AttHdl,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_svc_changed_notification_cmd_handler ( uint16_t  conn_handle,
uint16_t  start_handle,
uint16_t  end_handle 
)
at_ble_status_t gattc_write_cmd_handler ( uint8_t  u8ReqType,
uint8_t  u8AutoExec,
uint16_t  u16AttHdl,
uint16_t  u16Offset,
uint16_t  u16Length,
uint8_t *  pu8Val,
uint16_t  u16ConHdl 
)
at_ble_status_t gattc_write_cmd_ind_handler ( uint8_t *  msg,
uint16_t  len 
)