BthSetCODInquiryFilter (Compact 2013)

3/26/2014

This function sets the inquiry filter to a specified class of device (COD).

Syntax

int BthSetCODInquiryFilter (
  unsigned int cod,
  unsigned int codMask
);

Parameters

  • cod
    [in] Indicates the COD filter to be used in the inquiry filter. Potential values are defined in the Bluetooth Assigned Numbers documents on the Bluetooth web site.
  • codMask
    [in] Masks the bits from the cod parameter that are not part of the filter you are specifying.

Return Values

The following table shows the possible return values.

Value

Description

ERROR_SUCCESS

Success.

ERROR_SERVICE_NOT_ACTIVE

The Bluetooth stack is not present.

Other standard HRESULT error codes may be returned as appropriate.

Remarks

This function sends an HCI command to the Bluetooth Baseband that sets the inquiry filter to return only devices that match the specified COD. Future calls to make an inquiry return only devices that match the inquiry filter; see BthPerformInquiry.

Inquiry filters are combined if this function is called multiple times; see the Core Specification v2.1 + EDR on the Bluetooth web site. According to this specification, the number of filters that can be stored in the Baseband depends on implementation. If there is a contradiction between event filters, the latest filter overrides earlier ones. This logic is handled in the controller and not in the software stack. You can clear the filter by calling BthClearInquiryFilter. A similar function is BthSetInquiryFilter, which sets an inquiry filter based on the Bluetooth address.

Requirements

Header

bt_api.h

Library

Btdrt.lib

See Also

Reference

Bluetooth API Management Functions
Bluetooth AG Service Functions
BthClearInquiryFilter
BthWriteCOD