Bluetooth SDP Profile
- group BT_SDP
Provide BT SDP profile interfaces.
Functions
-
bool bt_sdp_discov_start(uint8_t bd_addr[6], T_BT_SDP_UUID_TYPE uuid_type, T_BT_SDP_UUID_DATA uuid_data)
Start SDP discovery.
- Parameters:
bd_addr – [in] Bluetooth address of remote device.
uuid_type – [in] Type of UUID to discovery.
BT_SDP_UUID16
UUID in 16 bits.BT_SDP_UUID32
UUID in 32 bits.BT_SDP_UUID128
UUID in 128 bits.
uuid_data – [in] Discovery SDP UUID data corresponding to uuid_type.
- Return values:
true – SDP discovery was started successfully.
false – SDP discovery was failed to start.
- Returns:
The status of starting SDP discovery.
-
bool bt_sdp_discov_stop(uint8_t bd_addr[6])
Stop SDP discovery.
- Parameters:
bd_addr – [in] Bluetooth address of remote device.
- Return values:
true – SDP discovery was stopped successfully.
false – SDP discovery was failed to stop.
- Returns:
The status of stopping SDP discovery.
-
bool bt_did_discov_start(uint8_t bd_addr[6])
Start DID discovery.
- Parameters:
bd_addr – [in] Bluetooth address of remote device.
- Return values:
true – DID discovery was started successfully.
false – DID discovery was failed to start.
- Returns:
The status of starting DID discovery.
-
bool bt_sdp_record_add(void *p_buf)
Add an SDP record to BT stack.
- Parameters:
p_buf – [in] Address of SDP record buffer.
- Return values:
true – SDP record was added successfully.
false – SDP record was failed to add.
- Returns:
The status of adding an SDP record.
-
bool bt_sdp_record_delete(void *p_buf)
Delete an SDP record from BT stack.
- Parameters:
p_buf – [in] Address of SDP record buffer.
- Return values:
true – SDP record was deleted successfully.
false – SDP record was failed to delete.
- Returns:
The status of deleting an SDP record.
-
uint8_t *bt_sdp_attr_find(uint8_t *buf, uint16_t len, uint32_t attr_value)
Find an attribute of the given value in an SDP record data.
- Parameters:
buf – [in] Buffer address of the SDP record data.
len – [in] Length of the SDP record data.
attr_value – [in] Attribute value to search for.
- Returns:
The address of the attribute.
-
uint32_t bt_sdp_value_get(uint8_t *buf, uint16_t len)
Get an attribute value in an SDP element.
- Parameters:
buf – [in] Buffer address of the SDP element.
len – [in] Length of the SDP element.
- Returns:
The value of the attribute.
-
bool bt_sdp_uuid_value_get(uint8_t *buf, uint16_t len, T_BT_SDP_UUID_TYPE *p_type, T_BT_SDP_UUID_DATA *p_data)
Get an UUID data value in an SDP element.
- Parameters:
buf – [in] Buffer address of the SDP element.
len – [in] Length of the SDP element.
p_type – [out] The address to put in UUID data format.
p_data – [out] The address to put in UUID data value.
- Returns:
The result of getting UUID value.
-
uint8_t *bt_sdp_elem_access(uint8_t *buf, uint16_t len, uint16_t index)
Get the address of SDP data element in an SDP element.
- Parameters:
buf – [in] Buffer address of the SDP element.
len – [in] Length of the SDP element.
index – [in] Data element index number.
- Returns:
The address of found SDP data element.
-
uint8_t *bt_sdp_elem_decode(uint8_t *buf, uint16_t length, uint32_t *p_len, uint8_t *p_type)
Decode SDP data element in an SDP element.
- Parameters:
buf – [in] Buffer address of the SDP element.
length – [in] Length of the SDP element.
p_len – [out] The address to put in UUID data length.
p_type – [out] The address to put in UUID data format.
- Returns:
The address of SDP data element.
-
bool bt_sdp_discov_start(uint8_t bd_addr[6], T_BT_SDP_UUID_TYPE uuid_type, T_BT_SDP_UUID_DATA uuid_data)