Modules#
sl_bt_evt_gatt_characteristic_value
sl_bt_evt_gatt_descriptor_value
sl_bt_evt_gatt_procedure_completed
GATT Client#
GATT Client.
The commands and events in this class are used to browse and manage attributes in a remote GATT server.
Enumerations#
These values indicate which attribute request or response has caused the event.
These values define whether the client is to receive notifications or indications from a remote GATT server.
These values define whether the GATT server is to cancel all queued writes or commit all queued writes to a remote database.
Functions#
Macros#
Enumeration Documentation#
sl_bt_gatt_att_opcode_t#
sl_bt_gatt_att_opcode_t
These values indicate which attribute request or response has caused the event.
Enumerator | |
---|---|
sl_bt_gatt_read_by_type_request | (0x8) Read by type request |
sl_bt_gatt_read_by_type_response | (0x9) Read by type response |
sl_bt_gatt_read_request | (0xa) Read request |
sl_bt_gatt_read_response | (0xb) Read response |
sl_bt_gatt_read_blob_request | (0xc) Read blob request |
sl_bt_gatt_read_blob_response | (0xd) Read blob response |
sl_bt_gatt_read_multiple_request | (0xe) Read multiple request |
sl_bt_gatt_read_multiple_response | (0xf) Read multiple response |
sl_bt_gatt_write_request | (0x12) Write request |
sl_bt_gatt_write_response | (0x13) Write response |
sl_bt_gatt_write_command | (0x52) Write command |
sl_bt_gatt_prepare_write_request | (0x16) Prepare write request |
sl_bt_gatt_prepare_write_response | (0x17) Prepare write response |
sl_bt_gatt_execute_write_request | (0x18) Execute write request |
sl_bt_gatt_execute_write_response | (0x19) Execute write response |
sl_bt_gatt_handle_value_notification | (0x1b) Notification |
sl_bt_gatt_handle_value_indication | (0x1d) Indication |
7577
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_client_config_flag_t#
sl_bt_gatt_client_config_flag_t
These values define whether the client is to receive notifications or indications from a remote GATT server.
Enumerator | |
---|---|
sl_bt_gatt_disable | (0x0) Disable notifications and indications |
sl_bt_gatt_notification | (0x1) Notification |
sl_bt_gatt_indication | (0x2) Indication |
7604
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_execute_write_flag_t#
sl_bt_gatt_execute_write_flag_t
These values define whether the GATT server is to cancel all queued writes or commit all queued writes to a remote database.
Enumerator | |
---|---|
sl_bt_gatt_cancel | (0x0) Cancel all queued writes |
sl_bt_gatt_commit | (0x1) Commit all queued writes |
7616
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
Function Documentation#
sl_bt_gatt_set_max_mtu#
sl_status_t sl_bt_gatt_set_max_mtu (uint16_t max_mtu, uint16_t * max_mtu_out)
[in] | max_mtu | Maximum size of Message Transfer Units (MTU) allowed
Default: 247 |
[out] | max_mtu_out | The maximum ATT_MTU selected by the system if this command succeeds |
Set the maximum size of ATT Message Transfer Units (MTU). Functionality is the same as sl_bt_gatt_server_set_max_mtu and this setting applies to both GATT client and server. If the given value is too large according to the maximum BGAPI payload size, the system will select the maximum possible value as the maximum ATT_MTU. If the maximum ATT_MTU is larger than 23, the GATT client in the stack will automatically send an MTU exchange request after a Bluetooth connection has been established.
Returns
SL_STATUS_OK if successful. Error code otherwise.
7854
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_primary_services#
sl_status_t sl_bt_gatt_discover_primary_services (uint8_t connection)
[in] | connection | Connection handle |
Discover all primary services of a remote GATT database. This command generates a unique gatt_service event for every discovered primary service. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure has successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_service - Discovered service from remote GATT database
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7874
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_primary_services_by_uuid#
sl_status_t sl_bt_gatt_discover_primary_services_by_uuid (uint8_t connection, size_t uuid_len, const uint8_t * uuid)
[in] | connection | Connection handle |
[in] | uuid_len | Length of data in |
[in] | uuid | Service UUID in little endian format |
Discover primary services with the specified UUID in a remote GATT database. This command generates unique gatt_service event for every discovered primary service. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_service - Discovered service from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7896
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_find_included_services#
sl_status_t sl_bt_gatt_find_included_services (uint8_t connection, uint32_t service)
[in] | connection | Connection handle |
[in] | service | GATT service handle. This value is normally received from the gatt_service event. |
Find the services that are included by a service in a remote GATT database. This command generates a unique gatt_service event for each included service. The received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_service - Discovered service from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7920
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_characteristics#
sl_status_t sl_bt_gatt_discover_characteristics (uint8_t connection, uint32_t service)
[in] | connection | Connection handle |
[in] | service | GATT service handle. This value is normally received from the gatt_service event. |
Discover all characteristics of a GATT service from a remote GATT database. This command generates a unique gatt_characteristic event for every discovered characteristic. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic - Discovered characteristic from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7944
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_characteristics_by_uuid#
sl_status_t sl_bt_gatt_discover_characteristics_by_uuid (uint8_t connection, uint32_t service, size_t uuid_len, const uint8_t * uuid)
[in] | connection | Connection handle |
[in] | service | GATT service handle. This value is normally received from the gatt_service event. |
[in] | uuid_len | Length of data in |
[in] | uuid | Characteristic UUID in little endian format |
Discover all characteristics of a GATT service in a remote GATT database having the specified UUID. This command generates a unique gatt_characteristic event for every discovered characteristic having the specified UUID. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic - Discovered characteristic from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7971
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_descriptors#
sl_status_t sl_bt_gatt_discover_descriptors (uint8_t connection, uint16_t characteristic)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
Discover all descriptors in a remote GATT database starting from handle. It generates a unique gatt_descriptor event for every discovered descriptor. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure has successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_descriptor - Discovered descriptor from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
7996
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_discover_characteristic_descriptors#
sl_status_t sl_bt_gatt_discover_characteristic_descriptors (uint8_t connection, uint16_t start, uint16_t end)
[in] | connection | Connection handle |
[in] | start | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | end | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
Discover all descriptors of a GATT characteristic in a remote GATT database. It generates a unique gatt_descriptor event for every discovered descriptor. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure has successfully completed or failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_descriptor - Discovered descriptor from remote GATT database.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8021
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_set_characteristic_notification#
sl_status_t sl_bt_gatt_set_characteristic_notification (uint8_t connection, uint16_t characteristic, uint8_t flags)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | flags | Enum sl_bt_gatt_client_config_flag_t. Characteristic client configuration flags. Values:
|
Enable or disable the notifications and indications sent from a remote GATT server. This procedure discovers a characteristic client configuration descriptor and writes the related configuration flags to a remote GATT database. A received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or that it failed with an error.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
sl_bt_evt_gatt_characteristic_value - If an indication or notification has been enabled for a characteristic, this event is triggered whenever an indication or notification is sent by the remote GATT server. The triggering conditions of the GATT server are defined by an upper level, for example by a profile. As a result, it is possible that no values are ever received, or that it may take time, depending on how the server is configured.
8057
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_send_characteristic_confirmation#
sl_status_t sl_bt_gatt_send_characteristic_confirmation (uint8_t connection)
[in] | connection | Connection handle |
Send a confirmation to a remote GATT server after receiving a characteristic indication. The sl_bt_evt_gatt_characteristic_value event carries the att_opcode
containing sl_bt_gatt_handle_value_indication (0x1d), which reveals that an indication has been received and must be confirmed with this command. The confirmation needs to be sent within 30 seconds, otherwise further GATT transactions are not allowed by the remote side.
Returns
SL_STATUS_OK if successful. Error code otherwise.
8075
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_read_characteristic_value#
sl_status_t sl_bt_gatt_read_characteristic_value (uint8_t connection, uint16_t characteristic)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
Read the value of a characteristic from a remote GATT database. A single sl_bt_evt_gatt_characteristic_value is generated if the characteristic value fits in one ATT PDU. Otherwise, more than one sl_bt_evt_gatt_characteristic_value event is generated because the firmware will automatically use the Read Long Characteristic Values procedure. A received sl_bt_evt_gatt_procedure_completed event indicates that all data was read successfully or that an error response was received.
Note that the GATT client does not verify if the requested attribute is a characteristic value. Therefore, before calling this command, ensure that the attribute handle is for a characteristic value, for example, by performing characteristic discovery.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic_value - Contains the data of a characteristic sent by the GATT Server.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8105
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_read_characteristic_value_from_offset#
sl_status_t sl_bt_gatt_read_characteristic_value_from_offset (uint8_t connection, uint16_t characteristic, uint16_t offset, uint16_t maxlen)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | offset | Offset of the characteristic value |
[in] | maxlen | Maximum bytes to read. If this parameter is 0, all characteristic values starting at a given offset will be read. |
Read a partial characteristic value with a specified offset and maximum length from a remote GATT database. It is equivalent to sl_bt_gatt_read_characteristic_value if both the offset and maximum length parameters are 0. A single sl_bt_evt_gatt_characteristic_value event is generated if the value to read fits in one ATT PDU. Otherwise, more than one sl_bt_evt_gatt_characteristic_value events are generated because the firmware will automatically use the Read Long Characteristic Values procedure. A received sl_bt_evt_gatt_procedure_completed event indicates that all data was read successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic_value - Contains data of a characteristic sent by the GATT Server.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8136
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_read_multiple_characteristic_values#
sl_status_t sl_bt_gatt_read_multiple_characteristic_values (uint8_t connection, size_t characteristic_list_len, const uint8_t * characteristic_list)
[in] | connection | Connection handle |
[in] | characteristic_list_len | Length of data in |
[in] | characteristic_list | List of uint16 characteristic handles each in little endian format. |
Read values of multiple characteristics from a remote GATT database at once. The GATT server returns values in one ATT PDU as the response. If the total set of values is greater than (ATT_MTU - 1) bytes in length, only the first (ATT_MTU - 1) bytes are included. A single sl_bt_evt_gatt_characteristic_value event is generated, in which the characteristic is set to 0 and data in the value parameter is a concatenation of characteristic values in the order they were requested. The received sl_bt_evt_gatt_procedure_completed event indicates either that this GATT procedure was successfully completed or failed with an error.
Use this command only for characteristics values that have a known fixed size, except the last one that could have variable length.
When the remote GATT server is from Silicon Labs Bluetooth stack, the server returns ATT Invalid PDU (0x04) if this command only reads one characteristic value. The server returns ATT Application Error 0x80 if this command reads the value of a user-type characteristic.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic_value - A concatenation of characteristic values in the order they were requested
sl_bt_evt_gatt_procedure_completed - Procedure was either successfully completed or failed with an error.
8175
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_read_characteristic_value_by_uuid#
sl_status_t sl_bt_gatt_read_characteristic_value_by_uuid (uint8_t connection, uint32_t service, size_t uuid_len, const uint8_t * uuid)
[in] | connection | Connection handle |
[in] | service | GATT service handle. This value is normally received from the gatt_service event. |
[in] | uuid_len | Length of data in |
[in] | uuid | Characteristic UUID in little endian format |
Read characteristic values of a service from a remote GATT database by giving the UUID of the characteristic and the handle of the service containing this characteristic. If multiple characteristic values are received in one ATT PDU, one sl_bt_evt_gatt_characteristic_value event is generated for each value. If the first characteristic value does not fit in one ATT PDU, the firmware automatically uses the Read Long Characteristic Values procedure and generate more sl_bt_evt_gatt_characteristic_value events until the value has been completely read. A received sl_bt_evt_gatt_procedure_completed event indicates that all data was read successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_characteristic_value - Contains the data of a characteristic sent by the GATT Server.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8207
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_write_characteristic_value#
sl_status_t sl_bt_gatt_write_characteristic_value (uint8_t connection, uint16_t characteristic, size_t value_len, const uint8_t * value)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | value_len | Length of data in |
[in] | value | Characteristic value |
Write the value of a characteristic in a remote GATT database. If the value length is greater than (ATT_MTU - 3) and does not fit in one ATT PDU, "write long" GATT procedure is used automatically. Received sl_bt_evt_gatt_procedure_completed event indicates that all data was written successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8233
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_write_characteristic_value_without_response#
sl_status_t sl_bt_gatt_write_characteristic_value_without_response (uint8_t connection, uint16_t characteristic, size_t value_len, const uint8_t * value, uint16_t * sent_len)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | value_len | Length of data in |
[in] | value | Characteristic value |
[out] | sent_len | The length of data sent to the remote GATT server |
Write the value of a characteristic in a remote GATT server. It does not generate an event. All failures on the server are ignored silently. For example, if an error is generated in the remote GATT server and the given value is not written into the database, no error message will be reported to the local GATT client. Note that this command can't be used to write long values. At most ATT_MTU - 3 amount of data can be sent once.
Returns
SL_STATUS_OK if successful. Error code otherwise.
8257
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_prepare_characteristic_value_write#
sl_status_t sl_bt_gatt_prepare_characteristic_value_write (uint8_t connection, uint16_t characteristic, uint16_t offset, size_t value_len, const uint8_t * value, uint16_t * sent_len)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | offset | Offset of the characteristic value |
[in] | value_len | Length of data in |
[in] | value | Value to write into the specified characteristic of the remote GATT database |
[out] | sent_len | The length of data sent to the remote GATT server |
Add a characteristic value to the write queue of a remote GATT server. It can be used when long attributes need to be written or a set of values needs to be written atomically. At most ATT_MTU - 5 amount of data can be sent at one time. Writes are executed or canceled with the sl_bt_gatt_execute_characteristic_value_write command. Whether the writes succeed or not is indicated in the response of the sl_bt_gatt_execute_characteristic_value_write command.
In all use cases where the amount of data to transfer fits into the BGAPI payload, use the command sl_bt_gatt_write_characteristic_value to write long values because it transparently performs the prepare_write and execute_write commands.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8294
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_prepare_characteristic_value_reliable_write#
sl_status_t sl_bt_gatt_prepare_characteristic_value_reliable_write (uint8_t connection, uint16_t characteristic, uint16_t offset, size_t value_len, const uint8_t * value, uint16_t * sent_len)
[in] | connection | Connection handle |
[in] | characteristic | GATT characteristic handle. This value is normally received from the gatt_characteristic event. |
[in] | offset | Offset of the characteristic value |
[in] | value_len | Length of data in |
[in] | value | Value to write into the specified characteristic of the remote GATT database |
[out] | sent_len | The length of data sent to the remote GATT server |
Add a characteristic value to the write queue of a remote GATT server and verify whether the value was correctly received by the server. Received sl_bt_evt_gatt_procedure_completed event indicates that this GATT procedure was successfully completed or failed with an error. Specifically, error code 0x0194 (data_corrupted) will be returned if the value received from the GATT server's response fails to pass the reliable write verification. At most, ATT_MTU - 5 amount of data can be sent at one time. Writes are executed or canceled with the sl_bt_gatt_execute_characteristic_value_write command. Whether the writes succeed or not is indicated in the response of the sl_bt_gatt_execute_characteristic_value_write command.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8330
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_execute_characteristic_value_write#
sl_status_t sl_bt_gatt_execute_characteristic_value_write (uint8_t connection, uint8_t flags)
[in] | connection | Connection handle |
[in] | flags | Enum sl_bt_gatt_execute_write_flag_t. Execute write flag. Values:
|
Commit or cancel previously queued writes to a long characteristic of a remote GATT server. Writes are sent to the queue with sl_bt_gatt_prepare_characteristic_value_write command. Content, offset, and length of queued values are validated by this procedure. A received sl_bt_evt_gatt_procedure_completed event indicates that all data was written successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8359
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_read_descriptor_value#
sl_status_t sl_bt_gatt_read_descriptor_value (uint8_t connection, uint16_t descriptor)
[in] | connection | Connection handle |
[in] | descriptor | GATT characteristic descriptor handle |
Read the descriptor value of a characteristic in a remote GATT database. A single sl_bt_evt_gatt_descriptor_value event is generated if the descriptor value fits in one ATT PDU. Otherwise, more than one sl_bt_evt_gatt_descriptor_value events are generated because the firmware automatically uses the Read Long Characteristic Values procedure. A received sl_bt_evt_gatt_procedure_completed event indicates that all data was read successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_descriptor_value - Descriptor value received from the remote GATT server.
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8384
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_gatt_write_descriptor_value#
sl_status_t sl_bt_gatt_write_descriptor_value (uint8_t connection, uint16_t descriptor, size_t value_len, const uint8_t * value)
[in] | connection | Connection handle |
[in] | descriptor | GATT characteristic descriptor handle |
[in] | value_len | Length of data in |
[in] | value | Descriptor value |
Write the value of a characteristic descriptor in a remote GATT database. If the value length is greater than ATT_MTU - 3 and does not fit in one ATT PDU, "write long" GATT procedure is used automatically. Received sl_bt_evt_gatt_procedure_completed event indicates either that all data was written successfully or that an error response was received.
Returns
SL_STATUS_OK if successful. Error code otherwise.
Events
sl_bt_evt_gatt_procedure_completed - Procedure was successfully completed or failed with an error.
8407
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
Macro Definition Documentation#
sl_bt_cmd_gatt_set_max_mtu_id#
#define sl_bt_cmd_gatt_set_max_mtu_idValue:
0x00090020
7530
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_primary_services_id#
#define sl_bt_cmd_gatt_discover_primary_services_idValue:
0x01090020
7531
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_primary_services_by_uuid_id#
#define sl_bt_cmd_gatt_discover_primary_services_by_uuid_idValue:
0x02090020
7532
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_find_included_services_id#
#define sl_bt_cmd_gatt_find_included_services_idValue:
0x10090020
7533
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_characteristics_id#
#define sl_bt_cmd_gatt_discover_characteristics_idValue:
0x03090020
7534
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_characteristics_by_uuid_id#
#define sl_bt_cmd_gatt_discover_characteristics_by_uuid_idValue:
0x04090020
7535
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_descriptors_id#
#define sl_bt_cmd_gatt_discover_descriptors_idValue:
0x06090020
7536
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_discover_characteristic_descriptors_id#
#define sl_bt_cmd_gatt_discover_characteristic_descriptors_idValue:
0x14090020
7537
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_set_characteristic_notification_id#
#define sl_bt_cmd_gatt_set_characteristic_notification_idValue:
0x05090020
7538
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_send_characteristic_confirmation_id#
#define sl_bt_cmd_gatt_send_characteristic_confirmation_idValue:
0x0d090020
7539
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_read_characteristic_value_id#
#define sl_bt_cmd_gatt_read_characteristic_value_idValue:
0x07090020
7540
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_read_characteristic_value_from_offset_id#
#define sl_bt_cmd_gatt_read_characteristic_value_from_offset_idValue:
0x12090020
7541
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_read_multiple_characteristic_values_id#
#define sl_bt_cmd_gatt_read_multiple_characteristic_values_idValue:
0x11090020
7542
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_read_characteristic_value_by_uuid_id#
#define sl_bt_cmd_gatt_read_characteristic_value_by_uuid_idValue:
0x08090020
7543
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_write_characteristic_value_id#
#define sl_bt_cmd_gatt_write_characteristic_value_idValue:
0x09090020
7544
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_write_characteristic_value_without_response_id#
#define sl_bt_cmd_gatt_write_characteristic_value_without_response_idValue:
0x0a090020
7545
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_prepare_characteristic_value_write_id#
#define sl_bt_cmd_gatt_prepare_characteristic_value_write_idValue:
0x0b090020
7546
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_prepare_characteristic_value_reliable_write_id#
#define sl_bt_cmd_gatt_prepare_characteristic_value_reliable_write_idValue:
0x13090020
7547
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_execute_characteristic_value_write_id#
#define sl_bt_cmd_gatt_execute_characteristic_value_write_idValue:
0x0c090020
7548
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_read_descriptor_value_id#
#define sl_bt_cmd_gatt_read_descriptor_value_idValue:
0x0e090020
7549
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_cmd_gatt_write_descriptor_value_id#
#define sl_bt_cmd_gatt_write_descriptor_value_idValue:
0x0f090020
7550
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_set_max_mtu_id#
#define sl_bt_rsp_gatt_set_max_mtu_idValue:
0x00090020
7551
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_primary_services_id#
#define sl_bt_rsp_gatt_discover_primary_services_idValue:
0x01090020
7552
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_primary_services_by_uuid_id#
#define sl_bt_rsp_gatt_discover_primary_services_by_uuid_idValue:
0x02090020
7553
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_find_included_services_id#
#define sl_bt_rsp_gatt_find_included_services_idValue:
0x10090020
7554
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_characteristics_id#
#define sl_bt_rsp_gatt_discover_characteristics_idValue:
0x03090020
7555
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_characteristics_by_uuid_id#
#define sl_bt_rsp_gatt_discover_characteristics_by_uuid_idValue:
0x04090020
7556
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_descriptors_id#
#define sl_bt_rsp_gatt_discover_descriptors_idValue:
0x06090020
7557
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_discover_characteristic_descriptors_id#
#define sl_bt_rsp_gatt_discover_characteristic_descriptors_idValue:
0x14090020
7558
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_set_characteristic_notification_id#
#define sl_bt_rsp_gatt_set_characteristic_notification_idValue:
0x05090020
7559
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_send_characteristic_confirmation_id#
#define sl_bt_rsp_gatt_send_characteristic_confirmation_idValue:
0x0d090020
7560
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_read_characteristic_value_id#
#define sl_bt_rsp_gatt_read_characteristic_value_idValue:
0x07090020
7561
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_read_characteristic_value_from_offset_id#
#define sl_bt_rsp_gatt_read_characteristic_value_from_offset_idValue:
0x12090020
7562
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_read_multiple_characteristic_values_id#
#define sl_bt_rsp_gatt_read_multiple_characteristic_values_idValue:
0x11090020
7563
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_read_characteristic_value_by_uuid_id#
#define sl_bt_rsp_gatt_read_characteristic_value_by_uuid_idValue:
0x08090020
7564
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_write_characteristic_value_id#
#define sl_bt_rsp_gatt_write_characteristic_value_idValue:
0x09090020
7565
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_write_characteristic_value_without_response_id#
#define sl_bt_rsp_gatt_write_characteristic_value_without_response_idValue:
0x0a090020
7566
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_prepare_characteristic_value_write_id#
#define sl_bt_rsp_gatt_prepare_characteristic_value_write_idValue:
0x0b090020
7567
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_prepare_characteristic_value_reliable_write_id#
#define sl_bt_rsp_gatt_prepare_characteristic_value_reliable_write_idValue:
0x13090020
7568
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_execute_characteristic_value_write_id#
#define sl_bt_rsp_gatt_execute_characteristic_value_write_idValue:
0x0c090020
7569
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_read_descriptor_value_id#
#define sl_bt_rsp_gatt_read_descriptor_value_idValue:
0x0e090020
7570
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h
sl_bt_rsp_gatt_write_descriptor_value_id#
#define sl_bt_rsp_gatt_write_descriptor_value_idValue:
0x0f090020
7571
of file /mnt/raid/workspaces/ws.SZ9MaSA5u/overlay/gsdk/protocol/bluetooth/build_debug/bt_api/sw/bgapi/inc/sl_bt_api.h