Accessing SDP Service Information

After a profile driver submits a Service Discovery Protocol (SDP) record to advertise its services with SDP, other devices can discover these services by either searching specifically for the record or by browsing to find it.

To search for SDP records, a client profile driver must first use IOCTL_BTH_SDP_CONNECT to connect to the SDP service of the remote device.

A profile driver can then use one of the following IOCTLs to perform the actual SDP record search:

Profile drivers can use IOCTL_BTH_SDP_SERVICE_SEARCH and IOCTL_BTH_SDP_ATTRIBUTE_SEARCH to reduce the amount of SDP traffic transmitted across a Bluetooth link and can extract necessary information by using a small number of maximum transfer units (MTUs). If neither of these issues is of great concern, it can be more convenient for profile drivers to call IOCTL_BTH_SDP_SERVICE_ATTRIBUTE_SEARCH.

After the profile driver has obtained the dynamic protocol/service multiplexer (PSM) for the desired service, it can connect to the remote service by using the BRB_L2CA_OPEN_CHANNEL BRB.

Note  If the service has a fixed PSM, which many do, L2CAP client profile drivers do not need to use SDP to obtain the PSM. However, L2CAP client profile drivers can still use SDP to get the SDP server attributes.

When the profile driver finishes searching, it should use IOCTL_BTH_SDP_DISCONNECT to disconnect from the remote SDP server.



Send comments about this topic to Microsoft