RA Flexible Software Package Documentation
Release v5.2.0
|
|
Functions | |
ble_status_t | R_BLE_GATTC_Init (uint8_t cb_num) |
This function initializes the GATT Client and registers the number of the callbacks for GATT Client event. More... | |
ble_status_t | R_BLE_GATTC_RegisterCb (ble_gattc_app_cb_t cb, uint8_t priority) |
This function registers a callback function for GATT Client event. More... | |
ble_status_t | R_BLE_GATTC_DeregisterCb (ble_gattc_app_cb_t cb) |
This function deregisters the callback function for GATT Client event. More... | |
ble_status_t | R_BLE_GATTC_ReqExMtu (uint16_t conn_hdl, uint16_t mtu) |
This function sends a MTU Exchange Request PDU to a GATT Server in order to change the current MTU. More... | |
ble_status_t | R_BLE_GATTC_DiscAllPrimServ (uint16_t conn_hdl) |
This function discovers all Primary Services in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscPrimServ (uint16_t conn_hdl, uint8_t *p_uuid, uint8_t uuid_type) |
This function discovers Primary Service specified by p_uuid in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscAllSecondServ (uint16_t conn_hdl) |
This function discovers all Secondary Services in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscIncServ (uint16_t conn_hdl, st_ble_gatt_hdl_range_t *p_range) |
This function discovers Included Services within the specified attribute handle range in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscAllChar (uint16_t conn_hdl, st_ble_gatt_hdl_range_t *p_range) |
This function discovers Characteristic within the specified attribute handle range in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscCharByUuid (uint16_t conn_hdl, uint8_t *p_uuid, uint8_t uuid_type, st_ble_gatt_hdl_range_t *p_range) |
This function discovers Characteristic specified by uuid within the specified attribute handle range in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_DiscAllCharDesc (uint16_t conn_hdl, st_ble_gatt_hdl_range_t *p_range) |
This function discovers Characteristic Descriptor within the specified attribute handle range in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_ReadChar (uint16_t conn_hdl, uint16_t value_hdl) |
This function reads a Characteristic/Characteristic Descriptor in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_ReadCharUsingUuid (uint16_t conn_hdl, uint8_t *p_uuid, uint8_t uuid_type, st_ble_gatt_hdl_range_t *p_range) |
This function reads a Characteristic in a GATT Server using a specified UUID. More... | |
ble_status_t | R_BLE_GATTC_ReadLongChar (uint16_t conn_hdl, uint16_t value_hdl, uint16_t offset) |
This function reads a Long Characteristic in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_ReadMultiChar (uint16_t conn_hdl, st_ble_gattc_rd_multi_req_param_t *p_list) |
This function reads multiple Characteristics in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_WriteCharWithoutRsp (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_write_data) |
This function writes a Characteristic in a GATT Server without response. More... | |
ble_status_t | R_BLE_GATTC_SignedWriteChar (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_write_data) |
This function writes Signed Data to a Characteristic in a GATT Server without response. More... | |
ble_status_t | R_BLE_GATTC_WriteChar (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_write_data) |
This function writes a Characteristic in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_WriteLongChar (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_write_data, uint16_t offset) |
This function writes a Long Characteristic in a GATT Server. More... | |
ble_status_t | R_BLE_GATTC_ReliableWrites (uint16_t conn_hdl, st_ble_gattc_reliable_writes_char_pair_t *p_char_pair, uint8_t pair_num, uint8_t auto_flag) |
This function performs the Reliable Writes procedure described in GATT Specification. More... | |
ble_status_t | R_BLE_GATTC_ExecWrite (uint16_t conn_hdl, uint8_t exe_flag) |
If the auto execute of Reliable Writes is not specified by R_BLE_GATTC_ReliableWrites(), this function is used to execute a write to Characteristic. More... | |
Data Structures | |
struct | st_ble_gatt_hdl_range_t |
Attribute handle range. More... | |
struct | st_ble_gattc_reliable_writes_char_pair_t |
This is used in R_BLE_GATTC_ReliableWrites() to specify the pair of Characteristic Value and Characteristic Value Handle. More... | |
struct | st_ble_gattc_conn_evt_t |
This structure notifies that the link with the GATT Server has been established. More... | |
struct | st_ble_gattc_disconn_evt_t |
This structure notifies that the link with the GATT Server has been disconnected. More... | |
struct | st_ble_gattc_ex_mtu_rsp_evt_t |
This structure notifies that a MTU Exchange Response PDU has been received from a GATT Server. More... | |
struct | st_ble_gattc_serv_16_evt_t |
This structure notifies that a 16-bit UUID Service has been discovered. More... | |
struct | st_ble_gattc_serv_128_evt_t |
This structure notifies that a 128-bit UUID Service has been discovered. More... | |
struct | st_ble_gattc_inc_serv_16_evt_t |
This structure notifies that a 16-bit UUID Included Service has been discovered. More... | |
struct | st_ble_gattc_inc_serv_128_evt_t |
This structure notifies that a 128-bit UUID Included Service has been discovered. More... | |
struct | st_ble_gattc_char_16_evt_t |
This structure notifies that a 16-bit UUID Characteristic has been discovered. More... | |
struct | st_ble_gattc_char_128_evt_t |
This structure notifies that a 128-bit UUID Characteristic has been discovered. More... | |
struct | st_ble_gattc_char_desc_16_evt_t |
This structure notifies that a 16-bit UUID Characteristic Descriptor has been discovered. More... | |
struct | st_ble_gattc_char_desc_128_evt_t |
This structure notifies that a 128-bit UUID Characteristic Descriptor has been discovered. More... | |
struct | st_ble_gattc_err_rsp_evt_t |
This structure notifies that a Error Response PDU has been received from a GATT Server. More... | |
struct | st_ble_gattc_ntf_evt_t |
This structure notifies that a Notification PDU has been received from a GATT Server. More... | |
struct | st_ble_gattc_ind_evt_t |
This structure notifies that a Indication PDU has been received from a GATT Server. More... | |
struct | st_ble_gattc_rd_char_evt_t |
This structure notifies that read response to R_BLE_GATTC_ReadChar() or R_BLE_GATTC_ReadCharUsingUuid() has been received from a GATT Server. More... | |
struct | st_ble_gattc_wr_char_evt_t |
This structure notifies that write response to R_BLE_GATTC_WriteChar() has been received from a GATT Server. More... | |
struct | st_ble_gattc_rd_multi_char_evt_t |
This structure notifies that read response to R_BLE_GATTC_ReadMultiChar() has been received from a GATT Server. More... | |
struct | st_ble_gattc_char_part_wr_evt_t |
This structure notifies that write response to R_BLE_GATTC_WriteLongChar() or R_BLE_GATTC_ReliableWrites() has been received from a GATT Server. More... | |
struct | st_ble_gattc_reliable_writes_comp_evt_t |
This structure notifies that a response to R_BLE_GATTC_ExecWrite() has been received from a GATT Server. More... | |
struct | st_ble_gattc_rd_multi_req_param_t |
This is used in R_BLE_GATTC_ReadMultiChar() to specify multiple Characteristics to be read. More... | |
struct | st_ble_gattc_evt_data_t |
st_ble_gattc_evt_data_t is the type of the data notified in a GATT Client Event. More... | |
struct | st_ble_gatt_value_t |
Attribute Value. More... | |
struct | st_ble_gatt_hdl_value_pair_t |
Attribute handle and attribute Value. More... | |
Macros | |
#define | BLE_GATTC_EXECUTE_WRITE_CANCEL_FLAG |
#define | BLE_GATTC_EXECUTE_WRITE_EXEC_FLAG |
#define | BLE_GATTC_MAX_CB |
GATT Client Callback Number. | |
#define | BLE_GATTC_EXEC_AUTO |
Auto execution. | |
#define | BLE_GATTC_EXEC_NOT_AUTO |
Not auto execution. | |
#define | BLE_GATTC_RELIABLE_WRITES_MAX_CHAR_PAIR |
Length of the Queue used with Prepare Write procedure to write a characteristic whose size is larger than MTU. | |
Typedefs | |
typedef void(* | ble_gattc_app_cb_t) (uint16_t event_type, ble_status_t event_result, st_ble_gattc_evt_data_t *p_event_data) |
ble_gattc_app_cb_t is the GATT Client Event callback function type. More... | |
Enumerations | |
enum | e_r_ble_gattc_evt_t |
GATT Client Event Identifier. More... | |
struct st_ble_gatt_hdl_range_t |
struct st_ble_gattc_reliable_writes_char_pair_t |
This is used in R_BLE_GATTC_ReliableWrites() to specify the pair of Characteristic Value and Characteristic Value Handle.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_value_pair_t | write_data | Pair of Characteristic Value and Characteristic Value Handle. |
uint16_t | offset |
Offset that indicates the location to be written. Normally, set 0 to this parameter. |
struct st_ble_gattc_conn_evt_t |
This structure notifies that the link with the GATT Server has been established.
Data Fields | ||
---|---|---|
st_ble_dev_addr_t * | p_addr | Address of the GATT Server. |
struct st_ble_gattc_disconn_evt_t |
This structure notifies that the link with the GATT Server has been disconnected.
Data Fields | ||
---|---|---|
st_ble_dev_addr_t * | p_addr | Address of the GATT Server. |
struct st_ble_gattc_ex_mtu_rsp_evt_t |
struct st_ble_gattc_serv_16_evt_t |
This structure notifies that a 16-bit UUID Service has been discovered.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_range_t | range | Attribute handle range of the 16-bit UUID service. |
uint16_t | uuid_16 | Service UUID. |
struct st_ble_gattc_serv_128_evt_t |
This structure notifies that a 128-bit UUID Service has been discovered.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_range_t | range | Attribute handle range of the 128-bit UUID service. |
uint8_t | uuid_128[BLE_GATT_128_BIT_UUID_SIZE] | Service UUID. |
struct st_ble_gattc_inc_serv_16_evt_t |
This structure notifies that a 16-bit UUID Included Service has been discovered.
Data Fields | ||
---|---|---|
uint16_t | decl_hdl | Service Declaration handle of the 16-bit UUID Included Service. |
st_ble_gattc_serv_16_evt_t | service | The contents of the Included Service. |
struct st_ble_gattc_inc_serv_128_evt_t |
This structure notifies that a 128-bit UUID Included Service has been discovered.
Data Fields | ||
---|---|---|
uint16_t | decl_hdl | Service Declaration handle of the 128-bit UUID Included Service. |
st_ble_gattc_serv_128_evt_t | service | The contents of the Included Service. |
struct st_ble_gattc_char_16_evt_t |
This structure notifies that a 16-bit UUID Characteristic has been discovered.
struct st_ble_gattc_char_128_evt_t |
This structure notifies that a 128-bit UUID Characteristic has been discovered.
Data Fields | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uint16_t | decl_hdl | Attribute Handle of Characteristic Declaration. | ||||||||||||||||||
uint8_t | cproperty |
Characteristic Properties. It is a bitwise OR of the following values.
| ||||||||||||||||||
uint16_t | value_hdl | Value Handle of the Characteristic. | ||||||||||||||||||
uint8_t | uuid_128[BLE_GATT_128_BIT_UUID_SIZE] | Characteristic UUID. |
struct st_ble_gattc_char_desc_16_evt_t |
struct st_ble_gattc_char_desc_128_evt_t |
This structure notifies that a 128-bit UUID Characteristic Descriptor has been discovered.
Data Fields | ||
---|---|---|
uint16_t | desc_hdl | Attribute Handle of Characteristic Descriptor. |
uint8_t | uuid_128[BLE_GATT_128_BIT_UUID_SIZE] | Characteristic Descriptor UUID. |
struct st_ble_gattc_err_rsp_evt_t |
This structure notifies that a Error Response PDU has been received from a GATT Server.
Data Fields | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uint8_t | op_code |
The op code of the ATT Request that causes the Error Response.
| ||||||||||||||||||||||||||||||||||||||||||||||||
uint16_t | attr_hdl | Attribute handle that is target for the request. | ||||||||||||||||||||||||||||||||||||||||||||||||
uint16_t | rsp_code |
The error codes notified from the GATT Server. It is a bitwise OR of GATT Error Group ID : 0x3000 and the following error codes defined in Core Spec and Core Spec Supplement.
|
struct st_ble_gattc_ntf_evt_t |
This structure notifies that a Notification PDU has been received from a GATT Server.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_value_pair_t | data | Characteristic that causes the Notification. |
struct st_ble_gattc_ind_evt_t |
This structure notifies that a Indication PDU has been received from a GATT Server.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_value_pair_t | data | Characteristic that causes the Indication. |
struct st_ble_gattc_rd_char_evt_t |
This structure notifies that read response to R_BLE_GATTC_ReadChar() or R_BLE_GATTC_ReadCharUsingUuid() has been received from a GATT Server.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_value_pair_t | read_data | The contents of the Characteristic that has been read. |
struct st_ble_gattc_wr_char_evt_t |
This structure notifies that write response to R_BLE_GATTC_WriteChar() has been received from a GATT Server.
Data Fields | ||
---|---|---|
uint16_t | value_hdl | Value Handle of the Characteristic/Characteristic Descriptor that has been written. |
struct st_ble_gattc_rd_multi_char_evt_t |
This structure notifies that read response to R_BLE_GATTC_ReadMultiChar() has been received from a GATT Server.
Data Fields | ||
---|---|---|
uint16_t | value_hdl_num | The number of Value Handles of the Characteristics that has been read. |
st_ble_gatt_value_t | multi_char_val | The contents of multiple Characteristics that have been read. |
struct st_ble_gattc_char_part_wr_evt_t |
This structure notifies that write response to R_BLE_GATTC_WriteLongChar() or R_BLE_GATTC_ReliableWrites() has been received from a GATT Server.
Data Fields | ||
---|---|---|
st_ble_gatt_hdl_value_pair_t | write_data | The data to be written to the Characteristic/Long Characteristic/Long Characteristic Descriptor. |
uint16_t | offset | Offset that indicates the location to be written. |
struct st_ble_gattc_reliable_writes_comp_evt_t |
This structure notifies that a response to R_BLE_GATTC_ExecWrite() has been received from a GATT Server.
Data Fields | ||||||||
---|---|---|---|---|---|---|---|---|
uint8_t | exe_flag |
This field indicates the command of the Execute Write that has been done.
|
struct st_ble_gattc_rd_multi_req_param_t |
This is used in R_BLE_GATTC_ReadMultiChar() to specify multiple Characteristics to be read.
Data Fields | ||
---|---|---|
uint16_t * | p_hdl_list | List of Value Handles that point the Characteristics to be read. |
uint16_t | list_count | The number of Value Handles included in the hdl_list parameter. |
struct st_ble_gattc_evt_data_t |
st_ble_gattc_evt_data_t is the type of the data notified in a GATT Client Event.
Data Fields | ||
---|---|---|
uint16_t | conn_hdl | Connection handle identifying the GATT Server. |
uint16_t | param_len | The size of GATT Client Event parameters. |
void * | p_param | GATT Client Event parameters. This parameter differs in each GATT Client Event. |
struct st_ble_gatt_value_t |
struct st_ble_gatt_hdl_value_pair_t |
Attribute handle and attribute Value.
Data Fields | ||
---|---|---|
uint16_t | attr_hdl | Attribute Handle. |
st_ble_gatt_value_t | value | Attribute Value. |
#define BLE_GATTC_EXECUTE_WRITE_CANCEL_FLAG |
GATT Execute Write Cancel Flag.
#define BLE_GATTC_EXECUTE_WRITE_EXEC_FLAG |
GATT Execute Write Execute Flag.
ble_gattc_app_cb_t |
ble_gattc_app_cb_t is the GATT Client Event callback function type.
[in] | event_type | The type of GATT Client Event. |
[in] | event_result | The result of GATT Client Event |
[in] | p_event_data | Data notified by GATT Client Event. |
enum 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: 0x4001result:
Event Data:st_ble_gattc_err_rsp_evt_tBLE_GATTC_EVENT_ERROR_RSP | ||||
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: 0x4003result:
Event Data:st_ble_gattc_ex_mtu_rsp_evt_tBLE_GATTC_EVENT_EX_MTU_RSP | ||||
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: 0x4009result:
Event Data:st_ble_gattc_rd_char_evt_tBLE_GATTC_EVENT_CHAR_READ_BY_UUID_RSP | ||||
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: 0x400Bresult:
Event Data:st_ble_gattc_rd_char_evt_tBLE_GATTC_EVENT_CHAR_READ_RSP | ||||
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: 0x400Dresult:
Event Data:st_ble_gattc_rd_char_evt_tBLE_GATTC_EVENT_CHAR_PART_READ_RSP | ||||
BLE_GATTC_EVENT_MULTI_CHAR_READ_RSP | This event notifies the application layer that the read of multiple Characteristics has been completed. Event Code: 0x400Fresult:
Event Data:st_ble_gattc_rd_multi_char_evt_tBLE_GATTC_EVENT_MULTI_CHAR_READ_RSP | ||||
BLE_GATTC_EVENT_CHAR_WRITE_RSP | This event notifies the application layer that the write of Characteristic/Characteristic Descriptor has been completed. Event Code: 0x4013result:
Event Data:st_ble_gattc_wr_char_evt_tBLE_GATTC_EVENT_CHAR_WRITE_RSP | ||||
BLE_GATTC_EVENT_CHAR_PART_WRITE_RSP | This event notifies the application layer of the one of the following.
Event Code: 0x4017result:
Event Data:st_ble_gattc_char_part_wr_evt_tBLE_GATTC_EVENT_CHAR_PART_WRITE_RSP | ||||
BLE_GATTC_EVENT_HDL_VAL_NTF | This event notifies the application layer that a Notification has been received from a GATT Server. Event Code: 0x401Bresult:
Event Data:st_ble_gattc_ntf_evt_tBLE_GATTC_EVENT_HDL_VAL_NTF | ||||
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: 0x401Dresult:
Event Data:st_ble_gattc_ind_evt_tBLE_GATTC_EVENT_HDL_VAL_IND | ||||
BLE_GATTC_EVENT_CONN_IND | This event notifies the application layer that the link with the GATT Server has been established. Event Code: 0x4081result:
Event Data:st_ble_gattc_conn_evt_tBLE_GATTC_EVENT_CONN_IND | ||||
BLE_GATTC_EVENT_DISCONN_IND | This event notifies the application layer that the link with the GATT Server has been disconnected. Event Code: 0x4082result:
Event Data:st_ble_gattc_disconn_evt_tBLE_GATTC_EVENT_DISCONN_IND | ||||
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: 0x40E0result:
Event Data:st_ble_gattc_serv_16_evt_tBLE_GATTC_EVENT_PRIM_SERV_16_DISC_IND | ||||
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: 0x40E1result:
Event Data:st_ble_gattc_serv_128_evt_tBLE_GATTC_EVENT_PRIM_SERV_128_DISC_IND | ||||
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: 0x40E2result:
Event Data:noneBLE_GATTC_EVENT_ALL_PRIM_SERV_DISC_COMP | ||||
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: 0x40E3result:
Event Data:noneBLE_GATTC_EVENT_PRIM_SERV_DISC_COMP | ||||
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: 0x40E4result:
Event Data:st_ble_gattc_serv_16_evt_tBLE_GATTC_EVENT_SECOND_SERV_16_DISC_IND | ||||
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: 0x40E5result:
Event Data:st_ble_gattc_serv_128_evt_tBLE_GATTC_EVENT_SECOND_SERV_128_DISC_IND | ||||
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: 0x40E6result:
Event Data:noneBLE_GATTC_EVENT_ALL_SECOND_SERV_DISC_COMP | ||||
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: 0x40E7result:
Event Data:st_ble_gattc_inc_serv_16_evt_tBLE_GATTC_EVENT_INC_SERV_16_DISC_IND | ||||
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: 0x40E8result:
Event Data:st_ble_gattc_inc_serv_128_evt_tBLE_GATTC_EVENT_INC_SERV_128_DISC_IND | ||||
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: 0x40E9result:
Event Data:noneBLE_GATTC_EVENT_INC_SERV_DISC_COMP | ||||
BLE_GATTC_EVENT_CHAR_16_DISC_IND | This event notifies the application layer that 16-bit UUID Characteristic has been discovered. Event Code: 0x40EAresult:
Event Data:st_ble_gattc_char_16_evt_tBLE_GATTC_EVENT_CHAR_16_DISC_IND | ||||
BLE_GATTC_EVENT_CHAR_128_DISC_IND | This event notifies the application layer that 128-bit UUID Characteristic has been discovered. Event Code: 0x40EBresult:
Event Data:st_ble_gattc_char_128_evt_tBLE_GATTC_EVENT_CHAR_128_DISC_IND | ||||
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: 0x40ECresult:
Event Data:noneBLE_GATTC_EVENT_ALL_CHAR_DISC_COMP | ||||
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: 0x40EDresult:
Event Data:noneBLE_GATTC_EVENT_CHAR_DISC_COMP | ||||
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: 0x40EEresult:
Event Data:st_ble_gattc_char_desc_16_evt_tBLE_GATTC_EVENT_CHAR_DESC_16_DISC_IND | ||||
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: 0x40EFresult:
Event Data:st_ble_gattc_char_desc_128_evt_tBLE_GATTC_EVENT_CHAR_DESC_128_DISC_IND | ||||
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: 0x40F0result:
Event Data:noneBLE_GATTC_EVENT_ALL_CHAR_DESC_DISC_COMP | ||||
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: 0x40F1result:
Event Data:noneBLE_GATTC_EVENT_LONG_CHAR_READ_COMP | ||||
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: 0x40F2result:
Event Data:noneBLE_GATTC_EVENT_LONG_CHAR_WRITE_COMP | ||||
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: 0x40F3result:
Event Data:noneBLE_GATTC_EVENT_RELIABLE_WRITES_TX_COMP | ||||
BLE_GATTC_EVENT_RELIABLE_WRITES_COMP | This event notifies the application layer that the Reliable Writes has been completed. Event Code: 0x40F4result:
Event Data:st_ble_gattc_reliable_writes_comp_evt_tBLE_GATTC_EVENT_RELIABLE_WRITES_COMP | ||||
BLE_GATTC_EVENT_INVALID | Invalid GATT Client Event. Event Code: 0x40FFresult:
Event Data:noneBLE_GATTC_EVENT_INVALID |
ble_status_t R_BLE_GATTC_Init | ( | uint8_t | cb_num | ) |
This function initializes the GATT Client and registers the number of the callbacks for GATT Client event.
Specify the cb_num parameter to a value between 1 and BLE_GATTC_MAX_CB.
R_BLE_GATTC_RegisterCb() registers the callback.
The result of this API call is returned by a return value.
[in] | cb_num | The number of callbacks to be registered. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | The cb_num parameter is out of range. |
ble_status_t R_BLE_GATTC_RegisterCb | ( | ble_gattc_app_cb_t | cb, |
uint8_t | priority | ||
) |
This function registers a callback function for GATT Client event.
The number of the callback that may be registered by this function is the value specified by R_BLE_GATTC_Init().
The result of this API call is returned by a return value.
[in] | cb | Callback function for GATT Client event. |
[in] | priority | The priority of the callback function. Valid range is 1 <= priority <= BLE_GATTC_MAX_CB. A lower priority number means a higher priority level. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The cb parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The priority parameter is out of range. |
BLE_ERR_CONTEXT_FULL(0x000B) | Host stack has already registered the maximum number of callbacks. |
ble_status_t R_BLE_GATTC_DeregisterCb | ( | ble_gattc_app_cb_t | cb | ) |
This function deregisters the callback function for GATT Client event.
The result of this API call is returned by a return value.
[in] | cb | The callback function to be deregistered. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The cb parameter is specified as NULL. |
BLE_ERR_NOT_FOUND(0x000D) | The callback has not been registered. |
ble_status_t R_BLE_GATTC_ReqExMtu | ( | uint16_t | conn_hdl, |
uint16_t | mtu | ||
) |
This function sends a MTU Exchange Request PDU to a GATT Server in order to change the current MTU.
MTU Exchange Response is notified by BLE_GATTC_EVENT_EX_MTU_RSP event.
The new MTU is the minimum value of the mtu parameter specified by this function and the mtu field in BLE_GATTC_EVENT_EX_MTU_RSP event. Default MTU size is 23 bytes.
The result of this API call is returned by a return value.
[in] | conn_hdl | Connection handle identifying the GATT Server to be sent. |
[in] | mtu | The maximum size(in bytes) of the GATT PDU that GATT Client can receive. Valid range is 23 <= mtu <= 247. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | The mtu parameter is out of range. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscAllPrimServ | ( | uint16_t | conn_hdl | ) |
This function discovers all Primary Services in a GATT Server.
When 16-bit UUID Primary Service has been discovered, BLE_GATTC_EVENT_PRIM_SERV_16_DISC_IND event is notified to the application layer.
When 128-bit UUID Primary Service has been discovered, BLE_GATTC_EVENT_PRIM_SERV_128_DISC_IND event is notified to the application layer.
When the Primary Service discovery has been completed, BLE_GATTC_EVENT_ALL_PRIM_SERV_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_OPERATION(0x0009) | This function was called while processing other request. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscPrimServ | ( | uint16_t | conn_hdl, |
uint8_t * | p_uuid, | ||
uint8_t | uuid_type | ||
) |
This function discovers Primary Service specified by p_uuid in a GATT Server.
When Primary Service whose uuid is the same as the specified uuid has been discovered, BLE_GATTC_EVENT_PRIM_SERV_16_DISC_IND event or BLE_GATTC_EVENT_PRIM_SERV_128_DISC_IND event is notified to the application layer.
When the Primary Service discovery has been completed, BLE_GATTC_EVENT_PRIM_SERV_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. | ||||||
[in] | p_uuid | UUID of Primary Service to be discovered. | ||||||
[in] | uuid_type | UUID type(16-bit or 128-bit).
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_uuid parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The uuid_type parameter is out of range. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscAllSecondServ | ( | uint16_t | conn_hdl | ) |
This function discovers all Secondary Services in a GATT Server.
When a 16-bit UUID Secondary Service has been discovered, BLE_GATTC_EVENT_SECOND_SERV_16_DISC_IND event is notified to the application layer.
When a 128-bit UUID Secondary Service has been discovered, BLE_GATTC_EVENT_SECOND_SERV_128_DISC_IND event is notified to the application layer.
When the Secondary Service discovery has been completed, BLE_GATTC_EVENT_ALL_SECOND_SERV_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscIncServ | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_range_t * | p_range | ||
) |
This function discovers Included Services within the specified attribute handle range in a GATT Server.
When Included Service that includes 16-bit UUID Service has been discovered, BLE_GATTC_EVENT_INC_SERV_16_DISC_IND event is notified to the application layer.
When Included Service that includes 128-bit UUID Service has been discovered, BLE_GATTC_EVENT_INC_SERV_128_DISC_IND event is notified to the application layer.
When the Included Service discovery has been completed, BLE_GATTC_EVENT_INC_SERV_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. |
[in] | p_range | Retrieval range of Included Service. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_range parameter is specified as NULL. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscAllChar | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_range_t * | p_range | ||
) |
This function discovers Characteristic within the specified attribute handle range in a GATT Server.
When 16-bit UUID Characteristic has been discovered, BLE_GATTC_EVENT_CHAR_16_DISC_IND event is notified to the application layer.
When 128-bit UUID Characteristic has been discovered, BLE_GATTC_EVENT_CHAR_128_DISC_IND event is notified to the application layer.
When the Characteristic discovery has been completed, BLE_GATTC_EVENT_ALL_CHAR_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. |
[in] | p_range | Retrieval range of Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_range parameter is specified as NULL. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscCharByUuid | ( | uint16_t | conn_hdl, |
uint8_t * | p_uuid, | ||
uint8_t | uuid_type, | ||
st_ble_gatt_hdl_range_t * | p_range | ||
) |
This function discovers Characteristic specified by uuid within the specified attribute handle range in a GATT Server.
When 16-bit UUID Characteristic has been discovered, BLE_GATTC_EVENT_CHAR_16_DISC_IND event is notified to the application layer.
When 128-bit UUID Characteristic has been discovered, BLE_GATTC_EVENT_CHAR_128_DISC_IND event is notified to the application layer.
When the Characteristic discovery has been completed, BLE_GATTC_EVENT_CHAR_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. | ||||||
[in] | p_uuid | UUID of Characteristic to be discovered. | ||||||
[in] | uuid_type | UUID type of Characteristic to be discovered.
| ||||||
[in] | p_range | Retrieval range of Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_uuid parameter or the p_range parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The uuid_type parameter is out of range. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_DiscAllCharDesc | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_range_t * | p_range | ||
) |
This function discovers Characteristic Descriptor within the specified attribute handle range in a GATT Server.
When 16-bit UUID Characteristic Descriptor has been discovered, BLE_GATTC_EVENT_CHAR_DESC_16_DISC_IND event is notified to the application layer. When 128-bit UUID Characteristic Descriptor has been discovered, BLE_GATTC_EVENT_CHAR_DESC_128_DISC_IND event is notified to the application layer. When the Characteristic Descriptor discovery has been completed, BLE_GATTC_EVENT_ALL_CHAR_DESC_DISC_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be discovered. |
[in] | p_range | Retrieval range of Characteristic Descriptor. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_range parameter is specified as NULL. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ReadChar | ( | uint16_t | conn_hdl, |
uint16_t | value_hdl | ||
) |
This function reads a Characteristic/Characteristic Descriptor in a GATT Server.
The result of the read is notified in BLE_GATTC_EVENT_CHAR_READ_RSP event.
[in] | conn_hdl | Connection handle identifying the GATT Server to be read. |
[in] | value_hdl | Value handle of the Characteristic/Characteristic Descriptor to be read. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | 0 is specified in the value_hdl parameter. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ReadCharUsingUuid | ( | uint16_t | conn_hdl, |
uint8_t * | p_uuid, | ||
uint8_t | uuid_type, | ||
st_ble_gatt_hdl_range_t * | p_range | ||
) |
This function reads a Characteristic in a GATT Server using a specified UUID.
The result of the read is notified in BLE_GATTC_EVENT_CHAR_READ_BY_UUID_RSP event.
[in] | conn_hdl | Connection handle that identifies Characteristic to be read to GATT Server. | ||||||
[in] | p_uuid | UUID of the Characteristic to be read. | ||||||
[in] | uuid_type | UUID type of the Characteristic to be read.
| ||||||
[in] | p_range | Retrieval range of Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_uuid parameter or the p_range parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The uuid_type parameter is out of range. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ReadLongChar | ( | uint16_t | conn_hdl, |
uint16_t | value_hdl, | ||
uint16_t | offset | ||
) |
This function reads a Long Characteristic in a GATT Server.
The contents of the Long Characteristic that has been read is notified every MTU-1 bytes to the application layer by BLE_GATTC_EVENT_CHAR_READ_RSP event.
When all of the contents has been received in GATT Client, BLE_GATTC_EVENT_LONG_CHAR_READ_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be read. |
[in] | value_hdl | Value handle of the Long Characteristic to be read. |
[in] | offset | Offset that indicates the location to be read. Normally, set 0 to this parameter. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | 0 is specified in the value_hdl parameter. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ReadMultiChar | ( | uint16_t | conn_hdl, |
st_ble_gattc_rd_multi_req_param_t * | p_list | ||
) |
This function reads multiple Characteristics in a GATT Server.
The contents of the multiple Characteristics that has been read is notified to the application layer by BLE_GATTC_EVENT_MULTI_CHAR_READ_RSP event.
[in] | conn_hdl | Connection handle that identifies Characteristic to be read to GATT Server. |
[in] | p_list | List of Value Handles that point the Characteristics to be read. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_list parameter or the p_hdl_list field in the p_list parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | 0 is specified in the list_count field in the p_list parameter. |
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_WriteCharWithoutRsp | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_value_pair_t * | p_write_data | ||
) |
This function writes a Characteristic in a GATT Server without response.
The result is returned from the API.
[in] | conn_hdl | Connection handle that identifies Characteristic to be read to GATT Server. |
[in] | p_write_data | Value to be written to the Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_write_data parameter or the p_value field in the value field in the p_write_data parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The reason for this error is as follows:
|
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_SignedWriteChar | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_value_pair_t * | p_write_data | ||
) |
This function writes Signed Data to a Characteristic in a GATT Server without response.
The result of this API call is returned by a return value.
[in] | conn_hdl | Connection handle identifying the GATT Server to be written. |
[in] | p_write_data | Signed Data to be written to the Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_write_data parameter or the p_value field in the value field in the p_write_data parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The reason for this error is as follows:
|
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function or Signed Data. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_WriteChar | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_value_pair_t * | p_write_data | ||
) |
This function writes a Characteristic in a GATT Server.
The result of the write is notified in BLE_GATTC_EVENT_CHAR_WRITE_RSP event.
[in] | conn_hdl | Connection handle identifying the GATT Server to be written. |
[in] | p_write_data | Value to be written to the Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_write_data parameter or the p_value field in the value field in the p_write_data parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The reason for this error is as follows:
|
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_WriteLongChar | ( | uint16_t | conn_hdl, |
st_ble_gatt_hdl_value_pair_t * | p_write_data, | ||
uint16_t | offset | ||
) |
This function writes a Long Characteristic in a GATT Server.
The result of a write that has been done every segmentation is notified to the application layer in BLE_GATTC_EVENT_CHAR_PART_WRITE_RSP event.
The maximum writable size to a Long Characteristic with this function is 512 bytes.
When all of the contents has been written to the Long Characteristic, BLE_GATTC_EVENT_LONG_CHAR_WRITE_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be written. |
[in] | p_write_data | Value to be written to the Long Characteristic. |
[in] | offset | Offset that indicates the location to be written. Normally, set 0 to this parameter. If this parameter sets to a value other than 0, adjust the offset parameter and the length of the value to be written not to exceed the length of the Long Characteristic. |
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The p_write_data parameter or the p_value field in the value field in the p_write_data parameter is specified as NULL. |
BLE_ERR_INVALID_ARG(0x0003) | The reason for this error is as follows:
|
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ReliableWrites | ( | uint16_t | conn_hdl, |
st_ble_gattc_reliable_writes_char_pair_t * | p_char_pair, | ||
uint8_t | pair_num, | ||
uint8_t | auto_flag | ||
) |
This function performs the Reliable Writes procedure described in GATT Specification.
When the data written to the Characteristic has been transmitted, BLE_GATTC_EVENT_CHAR_PART_WRITE_RSP event is notified to the application layer.
If the data included in the event is different from the data that GATT Client has sent, host stack automatically cancels the Reliable Writes.
After all of the contents has been sent to the GATT Server, if the auto_flag parameter has been set to BLE_GATTC_EXEC_AUTO, the GATT Server automatically writes the data to the Characteristic.
If the auto_flag parameter has been set to BLE_GATTC_EXEC_NOT_AUTO, BLE_GATTC_EVENT_RELIABLE_WRITES_TX_COMP event notifies the application layer in GATT Client that all of the contents has been sent to the GATT Server. Then GATT Client requests for writing the data to the Characteristic to the GATT Server with R_BLE_GATTC_ExecWrite().
When the write has been done, BLE_GATTC_EVENT_RELIABLE_WRITES_COMP event is notified to the application layer.
[in] | conn_hdl | Connection handle identifying the GATT Server to be written. | ||||||
[in] | p_char_pair | Pair of Characteristic Value and Characteristic Value Handle identifying the Characteristic to be written by Reliable Writes. | ||||||
[in] | pair_num | The number of the pairs specified by the p_char_pair parameter. Valid range is 0 < pair_num <= BLE_GATTC_RELIABLE_WRITES_MAX_CHAR_PAIR. | ||||||
[in] | auto_flag | The flag that indicates whether auto execution or not.
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows:
|
BLE_ERR_INVALID_ARG(0x0003) | The reason for this error is as follows:
|
BLE_ERR_INVALID_OPERATION(0x0009) | While processing other request, this function was called. |
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function or to store the temporary write data. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |
ble_status_t R_BLE_GATTC_ExecWrite | ( | uint16_t | conn_hdl, |
uint8_t | exe_flag | ||
) |
If the auto execute of Reliable Writes is not specified by R_BLE_GATTC_ReliableWrites(), this function is used to execute a write to Characteristic.
When all of the contents has been sent to the GATT Server, BLE_GATTC_EVENT_RELIABLE_WRITES_TX_COMP event notifies the application layer.
After this event has been received, execute the write by this function.
The result of the write is notified by BLE_GATTC_EVENT_RELIABLE_WRITES_COMP event.
[in] | conn_hdl | Connection handle identifying the target GATT Server. | ||||||
[in] | exe_flag | The flag that indicates whether execution or cancellation.
|
BLE_SUCCESS(0x0000) | Success |
BLE_ERR_INVALID_ARG(0x0003) | The exe_flag parameter is out of range. |
BLE_ERR_INVALID_OPERATION(0x0009) | The reason for this error is as follows:
|
BLE_ERR_MEM_ALLOC_FAILED(0x000C) | Insufficient memory is needed to generate this function. |
BLE_ERR_INVALID_HDL(0x000E) | The GATT Server specified by conn_hdl was not found. |