Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Service Discovery (SDP) Functions. More...

Functions

wiced_bool_t wiced_bt_sdp_db_init (uint8_t *p_sdp_db, uint16_t size)
 Function wiced_bt_sdp_db_init. More...
 
wiced_bool_t wiced_bt_sdp_init_discovery_db (wiced_bt_sdp_discovery_db_t *p_db, uint32_t len, uint16_t num_uuid, wiced_bt_uuid_t *p_uuid_list, uint16_t num_attr, uint16_t *p_attr_list)
 Function wiced_bt_sdp_init_discovery_db. More...
 
wiced_bool_t wiced_bt_sdp_cancel_service_search (wiced_bt_sdp_discovery_db_t *p_db)
 Function wiced_bt_sdp_cancel_service_search. More...
 
wiced_bool_t wiced_bt_sdp_service_search_request (uint8_t *p_bd_addr, wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_sdp_discovery_complete_cback_t *p_cb)
 Function wiced_bt_sdp_service_search_request. More...
 
wiced_bool_t wiced_bt_sdp_service_search_attribute_request (uint8_t *p_bd_addr, wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_sdp_discovery_complete_cback_t *p_cb)
 Function wiced_bt_sdp_service_search_attribute_request. More...
 
wiced_bt_sdp_discovery_record_twiced_bt_sdp_find_attribute_in_db (wiced_bt_sdp_discovery_db_t *p_db, uint16_t attr_id, wiced_bt_sdp_discovery_record_t *p_start_rec)
 Function wiced_bt_sdp_find_attribute_in_db. More...
 
wiced_bt_sdp_discovery_attribute_twiced_bt_sdp_find_attribute_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t attr_id)
 Function wiced_bt_sdp_find_attribute_in_rec. More...
 
wiced_bt_sdp_discovery_record_twiced_bt_sdp_find_service_in_db (wiced_bt_sdp_discovery_db_t *p_db, uint16_t service_uuid, wiced_bt_sdp_discovery_record_t *p_start_rec)
 Function wiced_bt_sdp_find_service_in_db. More...
 
wiced_bt_sdp_discovery_record_twiced_bt_sdp_find_service_uuid_in_db (wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_uuid_t *p_uuid, wiced_bt_sdp_discovery_record_t *p_start_rec)
 Function wiced_bt_sdp_find_service_uuid_in_db. More...
 
wiced_bool_t wiced_bt_sdp_find_protocol_list_elem_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t layer_uuid, wiced_bt_sdp_protocol_elem_t *p_elem)
 Function wiced_bt_sdp_find_protocol_list_elem_in_rec. More...
 
wiced_bool_t wiced_bt_sdp_find_protocol_lists_elem_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t layer_uuid, wiced_bt_sdp_protocol_elem_t *p_elem)
 Function wiced_bt_sdp_find_protocol_lists_elem_in_rec. More...
 
wiced_bool_t wiced_bt_sdp_find_profile_version_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t profile_uuid, uint16_t *p_version)
 Function wiced_bt_sdp_find_profile_version_in_rec. More...
 
wiced_bool_t wiced_bt_sdp_find_service_uuid_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, wiced_bt_uuid_t *p_uuid)
 Function wiced_bt_sdp_find_service_uuid_in_rec. More...
 

Detailed Description

Service Discovery (SDP) Functions.

Function Documentation

wiced_bool_t wiced_bt_sdp_cancel_service_search ( wiced_bt_sdp_discovery_db_t p_db)

Function wiced_bt_sdp_cancel_service_search.

Cancel service search request

Parameters
[in]p_db: Discovery database of the request being cancelled
Returns
TRUE if discovery cancelled, FALSE if a matching activity is not found.
wiced_bool_t wiced_bt_sdp_db_init ( uint8_t *  p_sdp_db,
uint16_t  size 
)

Function wiced_bt_sdp_db_init.

Initialize local SDP server database

Parameters
[in]p_sdp_dbFirst element in database array
[in]sizesize (in bytes) of SDP database
Returns
TRUE if successful, FALSE otherwise
wiced_bt_sdp_discovery_record_t* wiced_bt_sdp_find_attribute_in_db ( wiced_bt_sdp_discovery_db_t p_db,
uint16_t  attr_id,
wiced_bt_sdp_discovery_record_t p_start_rec 
)

Function wiced_bt_sdp_find_attribute_in_db.

Parse results from service search. Look next record in discovery database containing attribute ID.

Parameters
[in]p_db: Discovery results database
[in]attr_id: Attribute ID to find
[in]p_start_rec: Starting record to search from (if NULL, start from beginning of database)
Returns
Pointer to matching record, or NULL
wiced_bt_sdp_discovery_attribute_t* wiced_bt_sdp_find_attribute_in_rec ( wiced_bt_sdp_discovery_record_t p_rec,
uint16_t  attr_id 
)

Function wiced_bt_sdp_find_attribute_in_rec.

Parse SDP record. Look for requested attribute in the service record.

Parameters
[in]p_rec: Service record
[in]attr_id: Attribute ID to find
Returns
Pointer to matching attribute entry, or NULL
wiced_bool_t wiced_bt_sdp_find_profile_version_in_rec ( wiced_bt_sdp_discovery_record_t p_rec,
uint16_t  profile_uuid,
uint16_t *  p_version 
)

Function wiced_bt_sdp_find_profile_version_in_rec.

Parse SDP record. Look for version of requested profile.

Parameters
[in]p_rec: Service record
[in]profile_uuidProfile to find
[out]p_version: Major/minor version of profile (if found)
Returns
TRUE if found, FALSE if not
wiced_bool_t wiced_bt_sdp_find_protocol_list_elem_in_rec ( wiced_bt_sdp_discovery_record_t p_rec,
uint16_t  layer_uuid,
wiced_bt_sdp_protocol_elem_t p_elem 
)

Function wiced_bt_sdp_find_protocol_list_elem_in_rec.

Parse SDP record. Look for requested protocol list element in the service record.

Parameters
[in]p_rec: Service record
[in]layer_uuid: protocol list element to find
[out]p_elem: protocol list element (if found)
Returns
TRUE if found, else FALSE
wiced_bool_t wiced_bt_sdp_find_protocol_lists_elem_in_rec ( wiced_bt_sdp_discovery_record_t p_rec,
uint16_t  layer_uuid,
wiced_bt_sdp_protocol_elem_t p_elem 
)

Function wiced_bt_sdp_find_protocol_lists_elem_in_rec.

Parse SDP record. Look for requested protocol lists element in the service record.

Parameters
[in]p_rec: Service record
[in]layer_uuid: protocol lists element to find
[out]p_elem: protocol lists element (if found)
Returns
TRUE if found, else FALSE
wiced_bt_sdp_discovery_record_t* wiced_bt_sdp_find_service_in_db ( wiced_bt_sdp_discovery_db_t p_db,
uint16_t  service_uuid,
wiced_bt_sdp_discovery_record_t p_start_rec 
)

Function wiced_bt_sdp_find_service_in_db.

Parse results from service search. Look next record in discovery database containing requested service UUID (specified using uint16_t)

Parameters
[in]p_db: Discovery results database
[in]service_uuidService to find
[in]p_start_rec: Starting record to search from (if NULL, start from beginning of database)
Returns
Pointer to matching record, or NULL
wiced_bt_sdp_discovery_record_t* wiced_bt_sdp_find_service_uuid_in_db ( wiced_bt_sdp_discovery_db_t p_db,
wiced_bt_uuid_t p_uuid,
wiced_bt_sdp_discovery_record_t p_start_rec 
)

Function wiced_bt_sdp_find_service_uuid_in_db.

Parse results from service search. Look next record in discovery database containing requested service UUID (specified using wiced_bt_uuid_t structure)

Parameters
[in]p_db: Discovery results database
[in]p_uuid: Service to find
[in]p_start_rec: Starting record to search from (if NULL, start from beginning of database)
Returns
Pointer to matching record, or NULL
wiced_bool_t wiced_bt_sdp_find_service_uuid_in_rec ( wiced_bt_sdp_discovery_record_t p_rec,
wiced_bt_uuid_t p_uuid 
)

Function wiced_bt_sdp_find_service_uuid_in_rec.

Parse SDP record. Look for service UUID

Parameters
[in]p_rec: Service record
[out]p_uuid: Service UUID of the record
Returns
TRUE if found, FALSE if not
wiced_bool_t wiced_bt_sdp_init_discovery_db ( wiced_bt_sdp_discovery_db_t p_db,
uint32_t  len,
uint16_t  num_uuid,
wiced_bt_uuid_t p_uuid_list,
uint16_t  num_attr,
uint16_t *  p_attr_list 
)

Function wiced_bt_sdp_init_discovery_db.

Initialize discovery database prior to performing service discovery (using wiced_bt_sdp_service_search_request or wiced_bt_sdp_service_search_request).

Provides a list of UUIDs and/or attribute IDs to search for.

Parameters
[in]p_db: Discovery database to initialize
[in]len: size of discovery database
[in]num_uuid: Number of UUIDs in p_uuid_list
[in]p_uuid_list: UUIDs to add to discovery database
[in]num_attr: Number of attributes in p_attr_list
[in]p_attr_list: Attributes to add to discovery database
Returns
TRUE if successful, FALSE if one or more parameters are bad
wiced_bool_t wiced_bt_sdp_service_search_attribute_request ( uint8_t *  p_bd_addr,
wiced_bt_sdp_discovery_db_t p_db,
wiced_bt_sdp_discovery_complete_cback_t p_cb 
)

Function wiced_bt_sdp_service_search_attribute_request.

Initiate combined service search and attribute request on remote device

Parameters
[in]p_bd_addr: Remote device address
[in]p_db: Discovery database of UUIDs and attribute IDs to search for (intialized using wiced_bt_sdp_init_discovery_db)
[in]p_cb: Callback for discovery results
Returns
TRUE if discovery started, FALSE if failed.
wiced_bool_t wiced_bt_sdp_service_search_request ( uint8_t *  p_bd_addr,
wiced_bt_sdp_discovery_db_t p_db,
wiced_bt_sdp_discovery_complete_cback_t p_cb 
)

Function wiced_bt_sdp_service_search_request.

Initiate service search on remote device

Parameters
[in]p_bd_addr: Remote device address
[in]p_db: Discovery database of UUIDs and attribute IDs to search for (intialized using wiced_bt_sdp_init_discovery_db)
[in]p_cb: Callback for discovery results
Returns
TRUE if discovery started, FALSE if failed.