BthEnterSniffMode (Windows CE 5.0)

Send Feedback

This function places the ACL connection to the peer in SNIFF mode.

Note   To preserve Win32 compatibility, consider using the Winsock equivalent of this function. To do so, pass SO_BTH_ENTER_SNIFF_MODE as the optname value in setsockopt.

int BthEnterSniffMode(  BT_ADDR*pba,  unsigned short sniff_mode_max,  unsigned short sniff_mode_min,  unsigned short sniff_attempt,  unsigned short sniff_timeout,  unsigned short* pinterval);

Parameters

  • pba
    [in] Pointer to the Bluetooth address of the peer.
  • sniff_mode_max
    [in] The maximum acceptable number of Baseband slots between each sniff period. The time length is equal to N * 0.625 msec, or 1 Baseband slot. The valid range for N is 0x0001 to 0xFFFF. The valid time range is 0.625 msec to 40.9 seconds.
  • sniff_mode_min
    [in] The minimum acceptable number of Baseband slots between each sniff period. The time length is equal to N * 0.625 msec, or 1 Baseband slot. The valid range for N is 0x0001 to 0xFFFF. The valid time range is 0.625 msec to 40.9 seconds.
  • sniff_attempt
    [in] The number of Baseband receive slots for sniff attempt. The length is equal to (2 * N –1) * 0.625 msec. The valid range for N is 0x0001 to 0x7FFF. The valid time range is 0.625 msec to 40.9 seconds.
  • sniff_timeout
    [in] number of Baseband receive slots for sniff timeout. If N is greater than 0, the length is equal to (2 * N –1) * 0.625 msec. If N is equal to 0, then the length is equal to 0 msec. The valid range for N is 0x0000 to 0x7FFF. The valid time range is 0 msec to 40.9 seconds.
  • pinterval
    [out] The number of Baseband slots between sniff intervals.

Return Values

This function returns ERROR_SUCCESS when it completes successfully.

A return value of ERROR_SERVICE_NOT_ACTIVE indicates that the hardware is not inserted or that the Bluetooth stack is not present.

A return value of ERROR_NOT_FOUND indicates that an active ACL connection to the peer that is specified by the Bluetooth address does not exist.

Other standard error codes may be returned as appropriate.

Remarks

For more information about this function, see the Sniff_Mode part of the Bluetooth Core Specification.

Requirements

OS Versions: Windows CE.NET 4.2 and later.
Header: Bt_api.h.
Link Library: Btdrt.lib.

See Also

Bluetooth OS Functions | Bluetooth Application Development | BthExitSniffMode

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.