Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]

Detailed Description

Enumerations

enum  e_r_ble_gattc_evt_t {
  BLE_GATTC_EVENT_ERROR_RSP = 0x4001,
  BLE_GATTC_EVENT_EX_MTU_RSP = 0x4003,
  BLE_GATTC_EVENT_CHAR_READ_BY_UUID_RSP = 0x4009,
  BLE_GATTC_EVENT_CHAR_READ_RSP = 0x400B,
  BLE_GATTC_EVENT_CHAR_PART_READ_RSP = 0x400D,
  BLE_GATTC_EVENT_MULTI_CHAR_READ_RSP = 0x400F,
  BLE_GATTC_EVENT_CHAR_WRITE_RSP = 0x4013,
  BLE_GATTC_EVENT_CHAR_PART_WRITE_RSP = 0x4017,
  BLE_GATTC_EVENT_HDL_VAL_NTF = 0x401B,
  BLE_GATTC_EVENT_HDL_VAL_IND = 0x401D,
  BLE_GATTC_EVENT_CONN_IND = 0x4081,
  BLE_GATTC_EVENT_DISCONN_IND = 0x4082,
  BLE_GATTC_EVENT_PRIM_SERV_16_DISC_IND = 0x40E0,
  BLE_GATTC_EVENT_PRIM_SERV_128_DISC_IND = 0x40E1,
  BLE_GATTC_EVENT_ALL_PRIM_SERV_DISC_COMP = 0x40E2,
  BLE_GATTC_EVENT_PRIM_SERV_DISC_COMP = 0x40E3,
  BLE_GATTC_EVENT_SECOND_SERV_16_DISC_IND = 0x40E4,
  BLE_GATTC_EVENT_SECOND_SERV_128_DISC_IND = 0x40E5,
  BLE_GATTC_EVENT_ALL_SECOND_SERV_DISC_COMP = 0x40E6,
  BLE_GATTC_EVENT_INC_SERV_16_DISC_IND = 0x40E7,
  BLE_GATTC_EVENT_INC_SERV_128_DISC_IND = 0x40E8,
  BLE_GATTC_EVENT_INC_SERV_DISC_COMP = 0x40E9,
  BLE_GATTC_EVENT_CHAR_16_DISC_IND = 0x40EA,
  BLE_GATTC_EVENT_CHAR_128_DISC_IND = 0x40EB,
  BLE_GATTC_EVENT_ALL_CHAR_DISC_COMP = 0x40EC,
  BLE_GATTC_EVENT_CHAR_DISC_COMP = 0x40ED,
  BLE_GATTC_EVENT_CHAR_DESC_16_DISC_IND = 0x40EE,
  BLE_GATTC_EVENT_CHAR_DESC_128_DISC_IND = 0x40EF,
  BLE_GATTC_EVENT_ALL_CHAR_DESC_DISC_COMP = 0x40F0,
  BLE_GATTC_EVENT_LONG_CHAR_READ_COMP = 0x40F1,
  BLE_GATTC_EVENT_LONG_CHAR_WRITE_COMP = 0x40F2,
  BLE_GATTC_EVENT_RELIABLE_WRITES_TX_COMP = 0x40F3,
  BLE_GATTC_EVENT_RELIABLE_WRITES_COMP = 0x40F4,
  BLE_GATTC_EVENT_INVALID = 0x40FF
}
 GATT Client Event Identifier. More...
 

Enumeration Type Documentation

◆ e_r_ble_gattc_evt_t

GATT Client Event Identifier.

Enumerator
BLE_GATTC_EVENT_ERROR_RSP 

This event notifies the application layer that a problem has occurred in the GATT Server while processing a request from GATT Client.

When GATT Client has received a Error Response PDU from a GATT Server, BLE_GATTC_EVENT_ERROR_RSP event is notified the application layer.

Event Code: 0x4001

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_err_rsp_evt_t

BLE_GATTC_EVENT_EX_MTU_RSP 

This event notifies the application layer that a MTU Exchange Response PDU has been received from a GATT Server.

Event Code: 0x4003

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a Exchange MTU Response since GATT Client sent a Exchange MTU Request PDU to the GATT Server.

Event Data:

st_ble_gattc_ex_mtu_rsp_evt_t

BLE_GATTC_EVENT_CHAR_READ_BY_UUID_RSP 

When the read of Characteristic specified by UUID has been completed, this event is notified to the application layer.

Event Code: 0x4009

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a read response since GATT Client sent a request for read by R_BLE_GATTC_ReadCharUsingUuid() to the GATT Server.

Event Data:

st_ble_gattc_rd_char_evt_t

BLE_GATTC_EVENT_CHAR_READ_RSP 

When the read of Characteristic/Characteristic Descriptor has been completed, this event is notified to the application layer.

Event Code: 0x400B

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a read response since GATT Client sent a request for read by R_BLE_GATTC_ReadChar() to the GATT Server.

Event Data:

st_ble_gattc_rd_char_evt_t

BLE_GATTC_EVENT_CHAR_PART_READ_RSP 

After calling R_BLE_GATTC_ReadLongChar(), this event notifies the application layer that the partial contents of Long Characteristic/Long Characteristic Descriptor has been received from the GATT Server.

Event Code: 0x400D

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a read response since GATT Client sent a request for read by R_BLE_GATTC_ReadLongChar() to the GATT Server.

Event Data:

st_ble_gattc_rd_char_evt_t

BLE_GATTC_EVENT_MULTI_CHAR_READ_RSP 

This event notifies the application layer that the read of multiple Characteristics has been completed.

Event Code: 0x400F

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a read response since GATT Client sent a request for read by R_BLE_GATTC_ReadMultiChar() to the GATT Server.

Event Data:

st_ble_gattc_rd_multi_char_evt_t

BLE_GATTC_EVENT_CHAR_WRITE_RSP 

This event notifies the application layer that the write of Characteristic/Characteristic Descriptor has been completed.

Event Code: 0x4013

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a write response since GATT Client sent a request for write by R_BLE_GATTC_WriteChar() to the GATT Server.

Event Data:

st_ble_gattc_wr_char_evt_t

BLE_GATTC_EVENT_CHAR_PART_WRITE_RSP 

This event notifies the application layer of the one of the following.

  • A segmentation to be written to Long Characteristic/Long Characteristic Descriptor has been sent to the GATT Server.
  • The data written to one Characteristic by Reliable Writes has been sent to the GATT Server.

Event Code: 0x4017

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a response since GATT Client sent a request for segmentation write by R_BLE_GATTC_WriteLongChar(), or 1 Characteristic write by R_BLE_GATTC_ReliableWrites() to the GATT Server.

Event Data:

st_ble_gattc_char_part_wr_evt_t

BLE_GATTC_EVENT_HDL_VAL_NTF 

This event notifies the application layer that a Notification has been received from a GATT Server.

Event Code: 0x401B

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_ntf_evt_t

BLE_GATTC_EVENT_HDL_VAL_IND 

This event notifies the application layer that a Indication has been received from a GATT Server.

When the GATT Client has received a Indication, host stack automatically sends a Confirmation to the GATT Server.

Event Code: 0x401D

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_MEM_ALLOC_FAILED(0x000C) Insufficient resource is needed to generate the confirmation packet.

Event Data:

st_ble_gattc_ind_evt_t

BLE_GATTC_EVENT_CONN_IND 

This event notifies the application layer that the link with the GATT Server has been established.

Event Code: 0x4081

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_conn_evt_t

BLE_GATTC_EVENT_DISCONN_IND 

This event notifies the application layer that the link with the GATT Server has been disconnected.

Event Code: 0x4082

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_disconn_evt_t

BLE_GATTC_EVENT_PRIM_SERV_16_DISC_IND 

This event notifies the application layer that 16-bit UUID Primary Service has been discovered.

Event Code: 0x40E0

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_serv_16_evt_t

BLE_GATTC_EVENT_PRIM_SERV_128_DISC_IND 

This event notifies the application layer that 128-bit UUID Primary Service has been discovered.

Event Code: 0x40E1

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_serv_128_evt_t

BLE_GATTC_EVENT_ALL_PRIM_SERV_DISC_COMP 

When the Primary Service discovery by R_BLE_GATTC_DiscAllPrimServ() has been completed, this event is notified to the application layer.

Event Code: 0x40E2

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_PRIM_SERV_DISC_COMP 

When the Primary Service discovery by R_BLE_GATTC_DiscPrimServ() has been completed, this event is notified to the application layer.

Event Code: 0x40E3

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_SECOND_SERV_16_DISC_IND 

This event notifies the application layer that 16-bit UUID Secondary Service has been discovered.

Event Code: 0x40E4

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_serv_16_evt_t

BLE_GATTC_EVENT_SECOND_SERV_128_DISC_IND 

This event notifies the application layer that 128-bit UUID Secondary Service has been discovered.

Event Code: 0x40E5

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_serv_128_evt_t

BLE_GATTC_EVENT_ALL_SECOND_SERV_DISC_COMP 

When the Primary Service discovery by R_BLE_GATTC_DiscAllSecondServ() has been completed, this event is notified to the application layer.

Event Code: 0x40E6

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_INC_SERV_16_DISC_IND 

This event notifies the application layer that Included Service that includes 16-bit UUID Service has been discovered.

Event Code: 0x40E7

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_inc_serv_16_evt_t

BLE_GATTC_EVENT_INC_SERV_128_DISC_IND 

This event notifies the application layer that Included Service that includes 128-bit UUID Service has been discovered.

Event Code: 0x40E8

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_inc_serv_128_evt_t

BLE_GATTC_EVENT_INC_SERV_DISC_COMP 

When the Included Service discovery by R_BLE_GATTC_DiscIncServ() has been completed, this event is notified to the application layer.

Event Code: 0x40E9

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_CHAR_16_DISC_IND 

This event notifies the application layer that 16-bit UUID Characteristic has been discovered.

Event Code: 0x40EA

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_char_16_evt_t

BLE_GATTC_EVENT_CHAR_128_DISC_IND 

This event notifies the application layer that 128-bit UUID Characteristic has been discovered.

Event Code: 0x40EB

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_char_128_evt_t

BLE_GATTC_EVENT_ALL_CHAR_DISC_COMP 

When the Characteristic discovery by R_BLE_GATTC_DiscAllChar() has been completed, this event is notified to the application layer.

Event Code: 0x40EC

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_CHAR_DISC_COMP 

When the Characteristic discovery by R_BLE_GATTC_DiscCharByUuid() has been completed, this event is notified to the application layer.

Event Code: 0x40ED

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_CHAR_DESC_16_DISC_IND 

This event notifies the application layer that 16-bit UUID Characteristic Descriptor has been discovered.

Event Code: 0x40EE

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_char_desc_16_evt_t

BLE_GATTC_EVENT_CHAR_DESC_128_DISC_IND 

This event notifies the application layer that 128-bit UUID Characteristic Descriptor has been discovered.

Event Code: 0x40EF

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gattc_char_desc_128_evt_t

BLE_GATTC_EVENT_ALL_CHAR_DESC_DISC_COMP 

When the Characteristic Descriptor discovery by R_BLE_GATTC_DiscAllCharDesc() has been completed, this event is notified to the application layer.

Event Code: 0x40F0

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_LONG_CHAR_READ_COMP 

After calling R_BLE_GATTC_ReadLongChar(), this event notifies the application layer that all of the contents of the Characteristic/Long Characteristic Descriptor has been received from the GATT Server.

Event Code: 0x40F1

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_LONG_CHAR_WRITE_COMP 

This event notifies that the application layer that the write of Long Characteristic/Long Characteristic Descriptor has been completed.

Event Code: 0x40F2

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a response since GATT Client sent a request for write by R_BLE_GATTC_WriteLongChar() to the GATT Server.

Event Data:

none

BLE_GATTC_EVENT_RELIABLE_WRITES_TX_COMP 

This event notifies that the application layer that the GATT Server has received the data to be written to the Characteristics.

Event Code: 0x40F3

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GATTC_EVENT_RELIABLE_WRITES_COMP 

This event notifies the application layer that the Reliable Writes has been completed.

Event Code: 0x40F4

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_RSP_TIMEOUT(0x0011) 30 seconds or more have passed without receiving a response since GATT Client sent a request for execute write by R_BLE_GATTC_ReliableWrites() or R_BLE_GATTC_ExecWrite() to the GATT Server.

Event Data:

st_ble_gattc_reliable_writes_comp_evt_t

BLE_GATTC_EVENT_INVALID 

Invalid GATT Client Event.

Event Code: 0x40FF

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none