![]() |
RAFW Flexible Software Package Documentation
Release v2.0.1
|
|
Functions | |
| ble_status_t | R_BLE_GATTS_Init (uint8_t cb_num) |
| This function initializes the GATT Server and registers the number of the callbacks for GATT Server event. More... | |
| ble_status_t | R_BLE_GATTS_SetDbInst (st_ble_gatts_db_cfg_t *p_db_inst) |
| This function sets GATT Database to host stack. More... | |
| ble_status_t | R_BLE_GATTS_AddDbGroup (st_ble_gatts_db_group_t *p_attr_group) |
| This function adds GATT Database Group to host stack. More... | |
| ble_status_t | R_BLE_GATTS_RemoveDbGroup (st_ble_gatts_db_group_t *p_attr_group) |
| This function remove GATT Database group in host stack. More... | |
| ble_status_t | R_BLE_GATTS_GetCoreServiceHandle (uint8_t attr_index, uint16_t *p_attr_hdl) |
| This function get GAP Service characteristic and descriptor attribute handles in GATT Database group in host stack. More... | |
| ble_status_t | R_BLE_GATTS_SetStoredClientSupportedFeature (uint16_t conn_hdl, uint8_t *p_csf_value, uint8_t csf_length) |
| This function sets Client Supported Feature to host in order to process some feature such robust caching. More... | |
| ble_status_t | R_BLE_GATTS_SetClientAwareDbHash (uint16_t conn_hdl, uint8_t *p_db_hash) |
| This function sets GATT Database Hash value when client became client-aware state to host stack. More... | |
| ble_status_t | R_BLE_GATTS_RegisterCb (ble_gatts_app_cb_t cb, uint8_t priority) |
| This function registers a callback for GATT Server event. More... | |
| ble_status_t | R_BLE_GATTS_DeregisterCb (ble_gatts_app_cb_t cb) |
| This function deregisters the callback function for GATT Server event. More... | |
| ble_status_t | R_BLE_GATTS_Notification (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_ntf_data) |
| This function sends a notification of an attribute's value. More... | |
| ble_status_t | R_BLE_GATTS_MultipleVariableLengthNotfications (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_value_pairs, uint8_t pair_num) |
| This function sends notifications specify attribute handle and attribute's value. More... | |
| ble_status_t | R_BLE_GATTS_Indication (uint16_t conn_hdl, st_ble_gatt_hdl_value_pair_t *p_ind_data) |
| This function sends a indication of an attribute's value. More... | |
| ble_status_t | R_BLE_GATTS_GetAttr (uint16_t conn_hdl, uint16_t attr_hdl, st_ble_gatt_value_t *p_value) |
| This function gets a attribute value from the GATT Database. More... | |
| ble_status_t | R_BLE_GATTS_SetAttr (uint16_t conn_hdl, uint16_t attr_hdl, st_ble_gatt_value_t *p_value) |
| This function sets an attribute value to the GATT Database. More... | |
| ble_status_t | R_BLE_GATTS_SendErrRsp (uint16_t error_code) |
| This function sends an error response to a remote device. More... | |
| ble_status_t | R_BLE_GATTS_RspExMtu (uint16_t conn_hdl, uint16_t mtu) |
| This function replies to a MTU Exchange Request from a remote device. More... | |
| ble_status_t | R_BLE_GATTS_SetPrepareQueue (st_ble_gatt_pre_queue_t *p_pre_queues, uint8_t queue_num) |
| Register prepare queue and buffer in Host Stack. More... | |
Data Structures | |
| struct | st_ble_gatt_value_t |
| Attribute Value. More... | |
| struct | st_ble_gatt_hdl_value_pair_t |
| Attribute handle and attribute Value. More... | |
| struct | st_ble_gatt_queue_att_val_t |
| Queued writes Attribute Value. More... | |
| struct | st_ble_gatt_queue_pair_t |
| Queued writes Attribute Value. More... | |
| struct | st_ble_gatt_queue_elm_t |
| Prepare Write Queue element for long chracteristic. More... | |
| struct | st_ble_gatt_pre_queue_t |
| Prepare Write Queue for long chracteristic. More... | |
| struct | st_ble_gatts_db_params_t |
| Attribute value to be set to or retrieved from the GATT Database and the access type from the GATT Client. More... | |
| struct | st_ble_gatts_db_conn_hdl_t |
| Information about the service or the characteristic that the attribute belongs to. More... | |
| struct | st_ble_gatts_db_access_evt_t |
| This structure notifies that the GATT Database has been accessed from a GATT Client. More... | |
| struct | st_ble_gatts_conn_evt_t |
| This structure notifies that the link with the GATT Client has been established. More... | |
| struct | st_ble_gatts_disconn_evt_t |
| This structure notifies that the link with the GATT Client has been disconnected. More... | |
| struct | st_ble_gatts_db_hash_evt_t |
| This structure notifies that the GATT Database hash Caluculation has been completed. More... | |
| struct | st_ble_gatts_ex_mtu_req_evt_t |
| This structure notifies that a MTU Exchange Request PDU has been received from a GATT Client. More... | |
| struct | st_ble_gatts_cfm_evt_t |
| This structure notifies that a Confirmation PDU has been received from a GATT Client. More... | |
| struct | st_ble_gatts_ntf_evt_t |
| This structure notifies that a Notification process has started on the local host. More... | |
| struct | st_ble_gatts_read_by_type_rsp_evt_t |
| This structure notifies that a Read By Type Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_read_rsp_evt_t |
| This structure notifies that a Read Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_read_blob_rsp_evt_t |
| This structure notifies that a Read Blob Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_read_multi_rsp_evt_t |
| This structure notifies that a Read Multiple Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_read_multiple_variable_rsp_evt_t |
| This structure notifies that a Read Multiple Variable Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_write_rsp_evt_t |
| This structure notifies that a Write Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_prepare_write_rsp_evt_t |
| This structure notifies that a Prepare Write Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_exe_write_rsp_evt_t |
| This structure notifies that a Execute Write Response PDU has been sent from GATT Server. More... | |
| struct | st_ble_gatts_db_uuid_cfg_t |
| A structure that defines the information on the position where UUIDs are used. More... | |
| struct | st_ble_gatts_db_attr_cfg_t |
| A structure that defines the detailed information of the attributes. More... | |
| struct | st_ble_gatts_db_attr_list_t |
| The number of attributes are stored. More... | |
| struct | st_ble_gatts_db_char_cfg_t |
| A structure that defines the detailed information of the characteristics. More... | |
| struct | st_ble_gatts_db_serv_cfg_t |
| A structure that defines the detailed information of the characteristics. More... | |
| struct | st_ble_gatts_db_cfg_t |
| This is the structure of GATT Database that is specified in R_BLE_GATTS_SetDbInst(). More... | |
| struct | st_ble_gatts_db_attr_t |
| st_ble_gatts_db_attr_t configures the attributes of the GATT database. More... | |
| struct | st_ble_gatts_db_group_t |
| st_ble_gatts_db_group_t is the type of data register gatt database to host. More... | |
| struct | st_ble_gatts_evt_data_t |
| st_ble_gatts_evt_data_t is the type of the data notified in a GATT Server Event. More... | |
| struct | e_ble_gatts_core_service_index_t |
| e_ble_gatts_core_service_index_t is the type of the enumration using R_BLE_GATTS_GetCoreServiceHandle More... | |
Macros | |
| #define | BLE_GATT_DEFAULT_MTU |
| GATT Default MTU. | |
| #define | BLE_GATT_16_BIT_UUID_FORMAT |
| GATT Identification for 16-bit UUID Format. | |
| #define | BLE_GATT_128_BIT_UUID_FORMAT |
| GATT Identification for 128-bit UUID Format. | |
| #define | BLE_GATT_16_BIT_UUID_SIZE |
| GATT 16-bit UUID Size. | |
| #define | BLE_GATT_128_BIT_UUID_SIZE |
| GATT 128-bit UUID Size. | |
| #define | BLE_GATT_INVALID_ATTR_HDL_VAL |
| GATT Invalid Attribute Handle Value. | |
| #define | BLE_GATT_ATTR_HDL_START_RANGE |
| GATT Attribute Handle Start Range. | |
| #define | BLE_GATT_ATTR_HDL_END_RANGE |
| GATT Attribute Handle End Range. | |
| #define | BLE_GATTS_CLI_CNFG_NOTIFICATION |
| GATT Client Configuration values. Enable Notification. | |
| #define | BLE_GATTS_CLI_CNFG_INDICATION |
| GATT Client Configuration values. Enable Indication. | |
| #define | BLE_GATTS_CLI_CNFG_DEFAULT |
| GATT Client Configuration values. Default value or disable notification/indication. | |
| #define | BLE_GATTS_CLIENT_SUPPORTED_FEAT_ROBUST_CACHING |
| GATT Client Supported Features values. Supporting Robust Caching. | |
| #define | BLE_GATTS_CLIENT_SUPPORTED_FEAT_EATT |
| GATT Client Supported Features values. Supporting Enhanced ATT Bearer. | |
| #define | BLE_GATTS_CLIENT_SUPPORTED_FEAT_MULTI_NOTIFICATIONS |
| GATT Client Supported Features values. Supporting Multiple Notification. | |
| #define | BLE_GATTS_CLIENT_SUPPORTED_FEAT_LEN |
| GATT Client Supported Features values length. | |
| #define | BLE_GATTS_SERVER_SUPPORTED_FEAT_EATT |
| GATT Server Supported Features values. Supporting Enhanced ATT Bearer. | |
| #define | BLE_GATTS_DATABASE_HASH_LEN |
| GATT Database Hash values length. | |
| #define | BLE_GATTS_SER_CNFG_BROADCAST |
| GATT Server Configuration values. Enable broadcast. | |
| #define | BLE_GATTS_SER_CNFG_DEFAULT |
| GATT Server Configuration values. Default value. | |
| #define | BLE_GATTS_MAX_CB |
| GATT Server Callback Number. | |
| #define | BLE_GATTS_OP_CHAR_VALUE_READ_REQ |
| Characteristic Value Local Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_VALUE_WRITE_REQ |
| Characteristic Value Local Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_VALUE_WRITE_WITHOUT_REQ |
| Characteristic Value Local Write Without Response Operation. | |
| #define | BLE_GATTS_OP_CHAR_CLI_CNFG_READ_REQ |
| Characteristic Client Configuration Local Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_CLI_CNFG_WRITE_REQ |
| Characteristic Client Configuration Local Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_SER_CNFG_READ_REQ |
| Characteristic Server Configuration Local Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_SER_CNFG_WRITE_REQ |
| Characteristic Server Configuration Local Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_READ_REQ |
| Characteristic Value Peer Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_WRITE_REQ |
| Characteristic Value Peer Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_WRITE_CMD |
| Characteristic Value Peer Write Command. | |
| #define | BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_READ_REQ |
| Characteristic Client Configuration Peer Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_CLI_CNFG_WRITE_REQ |
| Characteristic Client Configuration Peer Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_SER_CNFG_READ_REQ |
| Characteristic Server Configuration Peer Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_SER_CNFG_WRITE_REQ |
| Characteristic Server Configuration Peer Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_USR_DESC_READ_REQ |
| Characteristic User Description Peer Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_USR_DESC_WRITE_REQ |
| Characteristic User Description Peer Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_HLD_DESC_READ_REQ |
| Characteristic Higher Layer Defined Descriptor Peer Read Operation. | |
| #define | BLE_GATTS_OP_CHAR_PEER_HLD_DESC_WRITE_REQ |
| Characteristic Higher Layer Defined Descriptor Peer Write Operation. | |
| #define | BLE_GATTS_OP_CHAR_REQ_AUTHOR |
| Operation Required Authorization. | |
| #define | BLE_GATT_DB_READ |
| Allow clients to read. | |
| #define | BLE_GATT_DB_WRITE |
| Allow clients to write. | |
| #define | BLE_GATT_DB_WRITE_WITHOUT_RSP |
| Allow clients to write without response. | |
| #define | BLE_GATT_DB_READ_WRITE |
| Allow clients to access of all. | |
| #define | BLE_GATT_DB_NO_AUXILIARY_PROPERTY |
| No auxiliary properties. | |
| #define | BLE_GATT_DB_FIXED_LENGTH_PROPERTY |
| Fixed length attribute value. | |
| #define | BLE_GATT_DB_AUTHORIZATION_PROPERTY |
| Attributes requiring authorization. | |
| #define | BLE_GATT_DB_ATTR_DISABLED |
| The attribute is disabled. If this value is set, the attribute cannot be found and accessed by a GATT Client. | |
| #define | BLE_GATT_DB_128_BIT_UUID_FORMAT |
| Attribute with 128 bit UUID. | |
| #define | BLE_GATT_DB_PEER_SPECIFIC_VAL_PROPERTY |
| Attribute managed by each GATT Client. | |
| #define | BLE_GATT_DB_CONST_ATTR_VAL_PROPERTY |
| Fixed attribute value. | |
| #define | BLE_GATT_DB_ENABLE_WRITE_WITHOUT_RSP |
| Permit Write Without Response. | |
| #define | BLE_GATT_DB_ONLY_SIGNED_WRITE |
| Signed writes are allowed. | |
| #define | BLE_GATT_DB_SECONN_ONLY_READ |
| LE Secure Connection Pairing and 16 byte encryption key size are required in read access. | |
| #define | BLE_GATT_DB_SECONN_ONLY_WRITE |
| LE Secure Connection Pairing 16 byte encryption key size are required in write access. | |
| #define | BLE_GATT_DB_SER_SECURITY_UNAUTH |
| Unauthenticated pairing(Security Mode1 Security Level 2, Security Mode 2 Security Level 1). Unauthenticated pairing is required to access the service. | |
| #define | BLE_GATT_DB_SER_SECURITY_AUTH |
| Authenticated pairing(Security Mode1 Security Level 3, Security Mode 2 Security Level 2). Authenticated pairing is required to access the service. | |
| #define | BLE_GATT_DB_SER_SECURITY_SECONN |
| Authenticated LE secure connections that generates 16bytes LTK(Security Mode1 Security Level 4). Authenticated LE secure connections pairing that generates 16bytes LTK is required to access the service. If this bit is set, bit24-27 are ignored. | |
| #define | BLE_GATT_DB_SER_SECURITY_ENC |
| Encryption. Encryption by the LTK exchanged in pairing is required to access. | |
| #define | BLE_GATT_DB_SER_NO_SECURITY_PROPERTY |
| No Security(Security Mode1 Security Level 1). | |
| #define | BLE_GATT_DB_SER_ENC_KEY_SIZE_DONT_CARE |
| 7-byte or larger encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_7 |
| 7-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_8 |
| 8-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_9 |
| 9-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_10 |
| 10-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_11 |
| 11-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_12 |
| 12-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_13 |
| 13-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_14 |
| 14-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_15 |
| 15-byte encryption key. | |
| #define | BLE_GATT_DB_SER_ENCRYPT_KEY_SIZE_16 |
| 16-byte encryption key. | |
| #define | BLE_GATT_DB_PERMIT_NONE |
| Set if attribute can not be written and read. | |
| #define | BLE_GATT_DB_PERMIT_WRITE |
| Set if attribute can be written. | |
| #define | BLE_GATT_DB_PERMIT_WRITE_AUTH |
| Set if attribute write requires authentication. | |
| #define | BLE_GATT_DB_PERMIT_WRITE_AUTHORIZ |
| Set if attribute write requires authorization. | |
| #define | BLE_GATT_DB_PERMIT_WRITE_ENC |
| Set if attribute write requires encryption. | |
| #define | BLE_GATT_DB_PERMIT_READ |
| Set if attribute can be read. | |
| #define | BLE_GATT_DB_PERMIT_READ_AUTH |
| Set if attribute read requires authentication. | |
| #define | BLE_GATT_DB_PERMIT_READ_AUTHORIZ |
| Set if attribute read requires authorization. | |
| #define | BLE_GATT_DB_PERMIT_READ_ENC |
| Set if attribute read requires encryption. | |
Typedefs | |
| typedef void(* | ble_gatts_app_cb_t) (uint16_t event_type, ble_status_t event_result, st_ble_gatts_evt_data_t *p_event_data) |
| ble_gatts_app_cb_t is the GATT Server Event callback function type. More... | |
Enumerations | |
| enum | e_r_ble_gatts_evt_t |
| GATT Server Event Identifier. More... | |
| enum | e_ble_gatts_core_service_index_t |
| 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. |
| struct st_ble_gatt_queue_att_val_t |
| struct st_ble_gatt_queue_pair_t |
Queued writes Attribute Value.
| Data Fields | ||
|---|---|---|
| st_ble_gatt_queue_att_val_t | queue_value | Attribute Value for Queued Write. |
| uint16_t | attr_hdl | Attribute Handle. |
| struct st_ble_gatt_queue_elm_t |
Prepare Write Queue element for long chracteristic.
| Data Fields | ||
|---|---|---|
| st_ble_gatt_queue_pair_t | queue_value_pair | Part of Long Characteristic Value and Characteristic Value Handle. |
| uint16_t | offset | Offset that indicates the location to be written. |
| struct st_ble_gatt_pre_queue_t |
Prepare Write Queue for long chracteristic.
| Data Fields | ||
|---|---|---|
| uint8_t * | p_buf_start | Buffer start address for Write Long Characteristic Request. |
| st_ble_gatt_queue_elm_t * | p_queue | Prepare Write Queue for Long Characteristic Value. |
| uint16_t | buffer_len | Buffer length. |
| uint16_t | conn_hdl | Connection Handle. |
| uint16_t | buf_offset | Current buffer offset. |
| uint8_t | queue_size | Number of elements in the prepare write queue. |
| uint8_t | queue_idx | Index of Prepare Write Queue. |
| struct st_ble_gatts_db_params_t |
Attribute value to be set to or retrieved from the GATT Database and the access type from the GATT Client.
| Data Fields | ||
|---|---|---|
| st_ble_gatt_value_t | value | Attribute value to be set to or retrieved from the GATT Database. Note that the address of the value field in the value field is invalid in case of read access. |
| uint16_t | attr_hdl | Attribute handle identifying the attribute to be set or retrieved. |
| uint8_t | db_op |
Type of the access to GATT Database from the GATT Client.
|
| struct st_ble_gatts_db_conn_hdl_t |
Information about the service or the characteristic that the attribute belongs to.
| struct st_ble_gatts_db_access_evt_t |
This structure notifies that the GATT Database has been accessed from a GATT Client.
| Data Fields | ||
|---|---|---|
| st_ble_gatts_db_conn_hdl_t * | p_handle | Information about the service or the characteristic that the attribute belongs to. |
| st_ble_gatts_db_params_t * | p_params | Attribute value to be set to or retrieved from the GATT Database and the access type from the GATT Client. |
| struct st_ble_gatts_conn_evt_t |
This structure notifies that the link with the GATT Client has been established.
| Data Fields | ||
|---|---|---|
| st_ble_dev_addr_t * | p_addr | Address of the GATT Client. |
| struct st_ble_gatts_disconn_evt_t |
This structure notifies that the link with the GATT Client has been disconnected.
| Data Fields | ||
|---|---|---|
| st_ble_dev_addr_t * | p_addr | Address of the GATT Client. |
| struct st_ble_gatts_db_hash_evt_t |
This structure notifies that the GATT Database hash Caluculation has been completed.
| Data Fields | ||
|---|---|---|
| uint8_t | db_hash[BLE_GATTS_DATABASE_HASH_LEN] | GATT database DBHash Value. |
| struct st_ble_gatts_ex_mtu_req_evt_t |
| struct st_ble_gatts_cfm_evt_t |
| struct st_ble_gatts_ntf_evt_t |
| struct st_ble_gatts_read_by_type_rsp_evt_t |
| struct st_ble_gatts_read_rsp_evt_t |
| struct st_ble_gatts_read_blob_rsp_evt_t |
| struct st_ble_gatts_read_multi_rsp_evt_t |
| struct st_ble_gatts_read_multiple_variable_rsp_evt_t |
| struct st_ble_gatts_write_rsp_evt_t |
| struct st_ble_gatts_prepare_write_rsp_evt_t |
This structure notifies that a Prepare Write Response PDU has been sent from GATT Server.
| struct st_ble_gatts_exe_write_rsp_evt_t |
| struct st_ble_gatts_db_uuid_cfg_t |
A structure that defines the information on the position where UUIDs are used.
| Data Fields | ||
|---|---|---|
| uint16_t | offset | The position of the defined UUID is specified by offset value in uuid_table of st_ble_gatts_db_cfg_t. |
| uint16_t | first | The attribute handle that indicates the first position in st_ble_gatts_db_attr_cfg_t for the defined UUID is specified. |
| uint16_t | last | The attribute handle that indicates the last position in st_ble_gatts_db_attr_cfg_t for the defined UUID is specified. |
| struct st_ble_gatts_db_attr_cfg_t |
A structure that defines the detailed information of the attributes.
| Data Fields | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| uint8_t | desc_prop |
The properties of attribute are specified. Set the following properties by a bitwise OR.
| ||||||||||||||||
| uint8_t | aux_prop |
The auxiliary properties of attribute are specified. Set the following properties by a bitwise OR.
| ||||||||||||||||
| uint16_t | length | The length of the attribute value is specified. | ||||||||||||||||
| uint16_t | next | The position of the next attribute with the same UUID as the defined attribute is specified by an attribute handle. | ||||||||||||||||
| uint16_t | uuid_offset |
The storage area of attribute value. UUID of the defined attribute is set by specifying the position of the UUID registered in uuid_table of st_ble_gatts_db_cfg_t with the array offset value. | ||||||||||||||||
| uint8_t * | p_data_offset |
Storage area of attribute value. The address in the array registered in No.1-No.4 is specified to set the attribute value storage area of the defined attribute. | ||||||||||||||||
| struct st_ble_gatts_db_attr_list_t |
| struct st_ble_gatts_db_char_cfg_t |
A structure that defines the detailed information of the characteristics.
| Data Fields | ||
|---|---|---|
| st_ble_gatts_db_attr_list_t | list | The total number of attributes in the defined characteristic is specified. |
| uint16_t | start_hdl | The first attribute handle of the characteristic is specified. |
| uint8_t | service_id | The index of service to which the characteristic belongs is specified. |
| struct st_ble_gatts_db_serv_cfg_t |
A structure that defines the detailed information of the characteristics.
| Data Fields | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| st_ble_gatts_db_attr_list_t | list | The total number of service declarations in the defined service is specified. | ||||||||||||||||||||||||||||||||||||
| uint32_t | desc |
The properties of the defined service are specified. Set the security level, the security mode and the key size with a bitwise OR. The bit0-bit3 are specified as the security level. Select one of the following.
| ||||||||||||||||||||||||||||||||||||
| uint16_t | start_hdl | The start attribute handle of the defined service is specified. | ||||||||||||||||||||||||||||||||||||
| uint16_t | end_hdl | The end attribute handle of the defined service is specified. | ||||||||||||||||||||||||||||||||||||
| uint8_t | char_start_idx | The start index of the characteristic that belongs to the defined service is specified. | ||||||||||||||||||||||||||||||||||||
| uint8_t | char_end_idx | The end index of the characteristic that belongs to the defined service is specified. | ||||||||||||||||||||||||||||||||||||
| struct st_ble_gatts_db_cfg_t |
This is the structure of GATT Database that is specified in R_BLE_GATTS_SetDbInst().
| Data Fields | ||
|---|---|---|
| const uint8_t * | p_uuid_table | The array to register the UUID to be used. |
| uint8_t * | p_attr_val_table | The array to register variable attribute values. |
| const uint8_t * | p_const_attr_val_table | The array to register fixed attribute values. |
| uint8_t * | p_rem_spec_val_table | The array to manage the attribute values handled for each GATT client. |
| const uint8_t * | p_const_rem_spec_val_table | The array to register the default of the attribute value handled by each GATT client. |
| const st_ble_gatts_db_uuid_cfg_t * | p_uuid_cfg | The array to register information on the position where UUIDs are used. |
| const st_ble_gatts_db_attr_cfg_t * | p_attr_cfg | The array to register the detailed information of attributes. |
| const st_ble_gatts_db_char_cfg_t * | p_char_cfg | The array to register the detailed information of characteristics. |
| const st_ble_gatts_db_serv_cfg_t * | p_serv_cfg | The array to register the detailed information of services. |
| uint8_t | serv_cnt | The number of services included in the GATT Database. |
| uint8_t | char_cnt | The number of characteristics included in the GATT Database. |
| uint8_t | uuid_type_cnt | The number of UUIDs included in the GATT Database. |
| uint8_t | peer_spec_val_cnt | The total size of attribute value that needs to be managed for each GATT client. |
| struct st_ble_gatts_db_attr_t |
st_ble_gatts_db_attr_t configures the attributes of the GATT database.
| Data Fields | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| const uint8_t * | p_uuid | Attribute type. | ||||||||||||||||||||||
| uint8_t * | p_value | Attribute value. | ||||||||||||||||||||||
| uint16_t * | p_value_len | Attirubte value length. This parameter is ignored when aux_prop set BLE_GATT_DB_FIXED_LENGTH. | ||||||||||||||||||||||
| const uint16_t | max_value_len | Maximum Attirubte value length. | ||||||||||||||||||||||
| uint32_t | permissions |
Attribute Permisions
| ||||||||||||||||||||||
| uint16_t | aux_prop |
The auxiliary properties of attribute are specified. Set the following properties by a bitwise OR.
| ||||||||||||||||||||||
| struct st_ble_gatts_db_group_t |
st_ble_gatts_db_group_t is the type of data register gatt database to host.
| Data Fields | ||
|---|---|---|
| st_ble_gatts_db_attr_t * | p_attrs | attributes |
| uint16_t | num_of_attr | number of attributes |
| uint16_t | start_hdl | GATT Database Group Start handle register to host stack. |
| uint16_t | actual_start_hdl | Start handle registered GATT Database Group by host stack. This parameter is output parameter and set by host stack. |
| uint16_t | actual_end_hdl | End handle registered GATT Database Group by host stack. This parameter is output parameter and set by host stack. |
| struct st_ble_gatts_evt_data_t |
st_ble_gatts_evt_data_t is the type of the data notified in a GATT Server Event.
| struct e_ble_gatts_core_service_index_t |
e_ble_gatts_core_service_index_t is the type of the enumration using R_BLE_GATTS_GetCoreServiceHandle
| ble_gatts_app_cb_t |
ble_gatts_app_cb_t is the GATT Server Event callback function type.
| [in] | event_type | The type of GATT Server Event. |
| [in] | event_result | The result of GATT Server Event |
| [in] | p_event_data | Data notified by GATT Server Event. |
| enum e_r_ble_gatts_evt_t |
GATT Server Event Identifier.
| Enumerator | |
|---|---|
| BLE_GATTS_EVENT_EX_MTU_REQ | MTU Exchange Request has been received. This event notifies the application layer that a MTU Exchange Request PDU has been received from a GATT Client. Need to reply to the request by R_BLE_GATTS_RspExMtu(). Event Code: 0x3002Event Data:st_ble_gatts_ex_mtu_req_evt_tBLE_GATTS_EVENT_EX_MTU_REQ |
| BLE_GATTS_EVENT_READ_BY_TYPE_RSP_COMP | Read By Type Response has been sent. This event notifies the application layer that a Read By Type Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x3009Event Data:st_ble_gatts_read_by_type_rsp_evt_tBLE_GATTS_EVENT_READ_BY_TYPE_RSP_COMP |
| BLE_GATTS_EVENT_READ_RSP_COMP | Read Response has been sent. This event notifies the application layer that a Read Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x300BEvent Data:st_ble_gatts_read_rsp_evt_tBLE_GATTS_EVENT_READ_RSP_COMP |
| BLE_GATTS_EVENT_READ_BLOB_RSP_COMP | Read Blob Response has been sent. This event notifies the application layer that a Read Blob Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x300DEvent Data:st_ble_gatts_read_blob_rsp_evt_tBLE_GATTS_EVENT_READ_BLOB_RSP_COMP |
| BLE_GATTS_EVENT_READ_MULTI_RSP_COMP | Read Multiple Response has been sent. This event notifies the application layer that a Read Multiple Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x300FEvent Data:st_ble_gatts_read_multi_rsp_evt_tBLE_GATTS_EVENT_READ_MULTI_RSP_COMP |
| BLE_GATTS_EVENT_READ_MULTIPLE_VARIABLE_RSP_COMP | Read Multiple Response has been sent. This event notifies the application layer that a Read Multiple Variable Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x3021Event Data:st_ble_gatts_read_multiple_variable_rsp_evt_tBLE_GATTS_EVENT_READ_MULTIPLE_VARIABLE_RSP_COMP |
| BLE_GATTS_EVENT_WRITE_RSP_COMP | Write Response has been sent. This event notifies the application layer that a Write Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x3013Event Data:st_ble_gatts_write_rsp_evt_tBLE_GATTS_EVENT_WRITE_RSP_COMP |
| BLE_GATTS_EVENT_PREPARE_WRITE_RSP_COMP | Prepare Write Response has been sent. This event notifies the application layer that a Prepare Write Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x3017Event Data:st_ble_gatts_prepare_write_rsp_evt_tBLE_GATTS_EVENT_PREPARE_WRITE_RSP_COMP |
| BLE_GATTS_EVENT_EXE_WRITE_RSP_COMP | Execute Write Response has been sent. This event notifies the application layer that a Execute Write Response PDU has been sent from GATT Server to the GATT Client. Event Code: 0x3019Event Data:st_ble_gatts_exe_write_rsp_evt_tBLE_GATTS_EVENT_EXE_WRITE_RSP_COMP |
| BLE_GATTS_EVENT_HDL_VAL_CNF | Confirmation has been received. This event notifies the application layer that a Confirmation PDU has been received from a GATT Client. Event Code: 0x301EEvent Data:st_ble_gatts_cfm_evt_tBLE_GATTS_EVENT_HDL_VAL_CNF |
| BLE_GATTS_EVENT_HDL_VAL_NTF_COMP | Notification process has started. This event notifies the application layer that a Notification process has started on the local host. Event Code: 0x301BEvent Data:st_ble_gatts_ntf_evt_tBLE_GATTS_EVENT_HDL_VAL_NTF_COMP |
| BLE_GATTS_EVENT_HDL_VAL_MULTIPLE_NTF_COMP | Multiple Notification process has started. This event notifies the application layer that a Multiple Notification process has started on the local host. Event Code: 0x3023Event Data:noneBLE_GATTS_EVENT_HDL_VAL_MULTIPLE_NTF_COMP |
| BLE_GATTS_EVENT_DB_ACCESS_IND | The GATT Database has been accessed from a GATT Client. This event notifies the application layer that the GATT Database has been accessed from a GATT Client. Event Code: 0x3040Event Data:st_ble_gatts_db_access_evt_tBLE_GATTS_EVENT_DB_ACCESS_IND |
| BLE_GATTS_EVENT_CONN_IND | A connection has been established. This event notifies the application layer that the link with the GATT Client has been established. Event Code: 0x3081Event Data:st_ble_gatts_conn_evt_tBLE_GATTS_EVENT_CONN_IND |
| BLE_GATTS_EVENT_DISCONN_IND | A connection has been disconnected. This event notifies the application layer that the link with the GATT Client has been disconnected. Event Code: 0x3082Event Data:st_ble_gatts_disconn_evt_tBLE_GATTS_EVENT_DISCONN_IND |
| BLE_GATTS_EVENT_DB_HASH_CAL_COMP | GATT Database Hash calculation has been completed. Event Code: 0x3083Event Data:st_ble_gatts_db_hash_evt_tBLE_GATTS_EVENT_DB_HASH_CAL_COMP |
| BLE_GATTS_EVENT_DB_HASH_AWARENESS_IND | DBHash when the client becomes change-aware. Event Code: 0x3084Event Data:st_ble_gatts_db_hash_evt_tBLE_GATTS_EVENT_DB_HASH_AWARENESS_IND |
| BLE_GATTS_EVENT_INVALID | Invalid GATT Server Event. Event Code: 0x30FFEvent Data:noneBLE_GATTS_EVENT_INVALID |
| ble_status_t R_BLE_GATTS_Init | ( | uint8_t | cb_num | ) |
This function initializes the GATT Server and registers the number of the callbacks for GATT Server event.
Specify the cb_num parameter to a value between 1 and BLE_GATTS_MAX_CB.
R_BLE_GATTS_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_GATTS_SetDbInst | ( | st_ble_gatts_db_cfg_t * | p_db_inst | ) |
This function sets GATT Database to host stack.
The result of this API call is returned by a return value.
| [in] | p_db_inst | GATT Database to be set. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows.
|
| ble_status_t R_BLE_GATTS_AddDbGroup | ( | st_ble_gatts_db_group_t * | p_attr_group | ) |
This function adds GATT Database Group to host stack.
The result of this API call is returned by a return value.
| [in] | p_attr_group | GATT Database to be set. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows.
|
| BLE_ERR_MEM_ALLOC_FAILED(0x000C) | memory allocation failure for GATT Database group. |
| ble_status_t R_BLE_GATTS_RemoveDbGroup | ( | st_ble_gatts_db_group_t * | p_attr_group | ) |
This function remove GATT Database group in host stack.
The result of this API call is returned by a return value.
| [in] | p_attr_group | GATT Database to be removed. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows.
|
| BLE_ERR_NOT_FOUND(0x000D) | Specified GATT Database group is not registed in host stack. |
| ble_status_t R_BLE_GATTS_GetCoreServiceHandle | ( | uint8_t | attr_index, |
| uint16_t * | p_attr_hdl | ||
| ) |
This function get GAP Service characteristic and descriptor attribute handles in GATT Database group in host stack.
The result of this API call is returned by a return value.
| [in] | attr_index | core service attribute index refer e_ble_gatts_core_service_index_t; |
| [out] | p_attr_hdl | handle information |
| BLE_SUCCESS(0x0000) | Success |
| ble_status_t R_BLE_GATTS_SetStoredClientSupportedFeature | ( | uint16_t | conn_hdl, |
| uint8_t * | p_csf_value, | ||
| uint8_t | csf_length | ||
| ) |
This function sets Client Supported Feature to host in order to process some feature such robust caching.
This function sets to the host stack the value of Client Supported Feature that a bonded client wrote before disconnecting. The result of this API call is returned by a return value.
| [in] | conn_hdl | Connection handle identifying the remote device to be set the client supported feature. |
| [in] | p_csf_value | Client Supported Feature value. |
| [in] | csf_length | Client Supported Feature value length. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows.
|
| BLE_ERR_INVALID_ARG(0x0003) | The csf_length is not adapted. |
| BLE_ERR_INVALID_HDL(0x000E) | The remote device specified by conn_hdl was not found. |
| R_BLE_GATTS_SetClientAwareDbHash | ( | uint16_t | conn_hdl, |
| uint8_t * | p_db_hash | ||
| ) |
This function sets GATT Database Hash value when client became client-aware state to host stack.
The host stack compares this db_hash value with the hash value of the current GATT database to determine the value of the client's Client Aware State at the time of connection. If the db_hash value matches the current GATT database value, the host stack determines that the client is in a Client-Aware State. If they do not match, the host stack determines that the client is in a Client-Unaware State. The result of this API call is returned by a return value.
| [in] | conn_hdl | Connection handle identifying the remote device to be set the db_hash. |
| [in] | p_db_hash | GATT Database Hash value. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The reason for this error is as follows.
|
| BLE_ERR_INVALID_HDL(0x000E) | The remote device specified by conn_hdl was not found. |
| ble_status_t R_BLE_GATTS_RegisterCb | ( | ble_gatts_app_cb_t | cb, |
| uint8_t | priority | ||
| ) |
This function registers a callback for GATT Server event.
The number of the callback that may be registered by this function is the value specified by R_BLE_GATTS_Init().
The result of this API call is returned by a return value.
| [in] | cb | Callback function for GATT Server event. |
| [in] | priority | The priority of the callback function. Valid range is 1 <= priority <= BLE_GATTS_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_GATTS_DeregisterCb | ( | ble_gatts_app_cb_t | cb | ) |
This function deregisters the callback function for GATT Server 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_GATTS_Notification | ( | uint16_t | conn_hdl, |
| st_ble_gatt_hdl_value_pair_t * | p_ntf_data | ||
| ) |
This function sends a notification of an attribute's value.
The maximum length of the attribute value that can be sent with notification is MTU-3.
The result of this API call is returned by a return value. BLE_GATTS_EVENT_HDL_VAL_NTF_COMP event notifies the application that notification process has started.
| [in] | conn_hdl | Connection handle identifying the remote device to be sent the notification. |
| [in] | p_ntf_data | The attribute value to send. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_ntf_data parameter or the value field in the value field in the p_ntf_data parameter is NULL. |
| BLE_ERR_INVALID_ARG(0x0003) | The value_len field in the value field in the p_ntf_data parameter is 0 or the attr_hdl field in the p_ntf_data parameters is 0. |
| 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 remote device specified by conn_hdl was not found. |
| ble_status_t R_BLE_GATTS_MultipleVariableLengthNotfications | ( | uint16_t | conn_hdl, |
| st_ble_gatt_hdl_value_pair_t * | p_value_pairs, | ||
| uint8_t | pair_num | ||
| ) |
This function sends notifications specify attribute handle and attribute's value.
The maximum length of the attribute value that can be sent with notification is MTU-3.
The result of this API call is returned by a return value. BLE_GATTS_EVENT_HDL_VAL_MULTIPLE_NTF_COMP event notifies the application that notification process has started.
| [in] | conn_hdl | Connection handle identifying the remote device to be sent the notification. |
| [in] | p_value_pairs | The attribute value handle pair to send. |
| [in] | pair_num | The number of attribute to send. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_ntf_data parameter or the value field in the value field in the p_ntf_data parameter is NULL. |
| BLE_ERR_INVALID_ARG(0x0003) | The value_len field in the value field in the p_ntf_data parameter is 0 or the attr_hdl field in the p_ntf_data parameters is 0. |
| 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 remote device specified by conn_hdl was not found. |
| ble_status_t R_BLE_GATTS_Indication | ( | uint16_t | conn_hdl, |
| st_ble_gatt_hdl_value_pair_t * | p_ind_data | ||
| ) |
This function sends a indication of an attribute's value.
The maximum length of the attribute value that can be sent with indication is MTU-3.
The result of this API call is returned by a return value.
The remote device that receives a indication sends a confirmation.
BLE_GATTS_EVENT_HDL_VAL_CNF event notifies the application layer that the confirmation has been received.
| [in] | conn_hdl | Connection handle identifying the remote device to be sent the indication. |
| [in] | p_ind_data | The attribute value to send. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_ind_data parameter or the value field in the value field in the p_ind_data parameter is NULL. |
| BLE_ERR_INVALID_ARG(0x0003) | The value_len field in the value field in the p_ind_data parameter is 0 or the attr_hdl field in the p_ind_data parameters is 0. |
| 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 remote device specified by conn_hdl was not found. |
| ble_status_t R_BLE_GATTS_GetAttr | ( | uint16_t | conn_hdl, |
| uint16_t | attr_hdl, | ||
| st_ble_gatt_value_t * | p_value | ||
| ) |
This function gets a attribute value from the GATT Database.
The result of this API call is returned by a return value.
| [in] | conn_hdl | If the attribute value that has information about the remote device is retrieved, specify the remote device with the conn_hdl parameter. When information about the remote device is not required, set the conn_hdl parameter to BLE_GAP_INVALID_CONN_HDL. |
| [in] | attr_hdl | The attribute handle of the attribute value to be retrieved. |
| [out] | p_value | The attribute value to be retrieved. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_value parameter is specified as NULL. |
| BLE_ERR_INVALID_ARG(0x0003) | The attr_hdl parameter is 0 or larger than the last attribute handle of GATT Database. |
| BLE_ERR_INVALID_STATE(0x0008) | The attribute is not in a state to be read. |
| BLE_ERR_INVALID_OPERATION(0x0009) | The attribute cannot be read. |
| BLE_ERR_NOT_FOUND(0x000D) | The attribute specified by the attr_hdl parameter is not belonging to any services or characteristics. |
| BLE_ERR_INVALID_HDL(0x000E) | The remote device specified by the conn_hdl parameter was not found. |
| ble_status_t R_BLE_GATTS_SetAttr | ( | uint16_t | conn_hdl, |
| uint16_t | attr_hdl, | ||
| st_ble_gatt_value_t * | p_value | ||
| ) |
This function sets an attribute value to the GATT Database.
The result of this API call is returned by a return value.
| [in] | conn_hdl | If the attribute value that has information about the remote device is retrieved, specify the remote device with the conn_hdl parameter. When information about the remote device is not required, set the conn_hdl parameter to BLE_GAP_INVALID_CONN_HDL. |
| [in] | attr_hdl | The attribute handle of the attribute value to be set. |
| [in] | p_value | The attribute value to be set. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_value parameter is specified as NULL. |
| BLE_ERR_INVALID_DATA(0x0002) | The write size is larger than the length of the attribute value. |
| BLE_ERR_INVALID_ARG(0x0003) | The attr_hdl parameter is 0 or larger than the last attribute handle of GATT Database. |
| BLE_ERR_INVALID_STATE(0x0008) | The attribute is not in a state to be written. |
| BLE_ERR_INVALID_OPERATION(0x0009) | The attribute cannot be written. |
| BLE_ERR_NOT_FOUND(0x000D) | The attribute specified by the attr_hdl parameter is not belonging to any services or characteristics. |
| BLE_ERR_INVALID_HDL(0x000E) | The remote device specified by the conn_hdl parameter was not found. |
| ble_status_t R_BLE_GATTS_SendErrRsp | ( | uint16_t | error_code | ) |
This function sends an error response to a remote device.
The result is returned from the API.
The error code specified in the callback is notified as Error Response to the remote device.
The result of this API call is returned by a return value.
| [in] | error_code | The error codes to be notified the client. It is a bitwise OR of GATT Error Group ID : 0x3000 and the following error codes defined in Core Spec and Core Spec Supplement.
|
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_ARG(0x0003) | The Group ID of the error_code parameter is not 0x3000, or it is 0x3000. |
| BLE_ERR_INVALID_OPERATION(0x0009) | While processing other error response,this function was called. |
| ble_status_t R_BLE_GATTS_RspExMtu | ( | uint16_t | conn_hdl, |
| uint16_t | mtu | ||
| ) |
This function replies to a MTU Exchange Request from a remote device.
BLE_GATTS_EVENT_EX_MTU_REQ event notifies the application layer that a MTU Exchange Request has been received. Therefore when the callback has received the event, call this function.
The new MTU is the minimum of the mtu parameter specified by this function and the mtu field in BLE_GATTS_EVENT_EX_MTU_REQ 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 remote device to be sent MTU Exchange Response. |
| [in] | mtu | The maximum size(in bytes) of the GATT PDU that GATT Server 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) | 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 remote device specified by conn_hdl was not found. |
| ble_status_t R_BLE_GATTS_SetPrepareQueue | ( | st_ble_gatt_pre_queue_t * | p_pre_queues, |
| uint8_t | queue_num | ||
| ) |
Register prepare queue and buffer in Host Stack.
This function registers the prepare queue and buffer for long chracteristic write and reliable writes. The result of this API call is returned by a return value.
| [in] | p_pre_queues | The prepare write queues to be registered. |
| [in] | queue_num | The number of prepare write queues to be registered. |
| BLE_SUCCESS(0x0000) | Success |
| BLE_ERR_INVALID_PTR(0x0001) | The p_pre_queue parameter is specified as NULL. |