次の方法で共有


Bluetooth OS Functions (Windows Embedded CE 6.0)

1/6/2010

The functions that you can use when developing your Bluetooth OS design are exported from Btdrt.dll, and are provided to help you develop either a shell or dedicated application functionality in the absence of a WinSock layer. You can call these functions from an application other than the Bluetooth stack layer, in device.exe.

Most of these functions have an equivalent WinSock function, which is the preferred way to access Bluetooth functionality because of convenience and code portability within the Win32 family.

The following table shows the functions that you can use when developing your Bluetooth OS design.

Programming element Description

BthAcceptSCOConnections

This function instructs the Bluetooth stack to accept incoming SCO connections.

BthAnswerPairRequest

This function responds to a request for the personal identification number (PIN) for a Bluetooth device.

BthAuthenticate

This function requests that the existing connection with the peer device be authenticated.

BthCancelInquiry

This function cancels the current inquiry operation.

BthClearInquiryFilter

This function clears the Inquiry Filter.

BthCloseConnection

This function closes the specified baseband connection.

BthCreateACLConnection

This function creates an ACL connection to a device with the specified address.

BthCreateSCOConnection

This function creates an SCO connection to a device with the specified address.

BthEnterHoldMode

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

BthEnterParkMode

This function places the ACL connection to the peer specified by the Bluetooth address in PARK mode.

BthEnterSniffMode

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

BthExitParkMode

This function forces the ACL connection to the peer to leave PARK mode.

BthExitSniffMode

This function forces the ACL connection to the peer to leave SNIFF mode.

BthGetAddress

This function retrieves the Bluetooth address based on the specified connection handle.

BthGetBasebandConnections

This function retrieves baseband connection data for all current connections.

BthGetBasebandHandles

This function retrieves handles of all current connections. This is equivalent to BTH_HCI_IOCTL_GET_BASEBAND_HANDLES HCI IOCTL function.

BthGetCurrentMode

This function retrieves the current mode of the ACL connection to the peer that is specified by the Bluetooth address. This function is equivalent to BTH_HCI_IOCTL_GET_HANDLE_MODE HCI IOCTL.

BthGetHardwareStatus

This function obtains the hardware status.

BthGetLinkKey

This function retrieves the link key for the Bluetooth device.

BthGetPINRequest

This function retrieves the address of the Bluetooth peer device authentication of which requires the personal identification number (PIN) code.

BthGetRemoteCOD

This functions retrieves the COD for a specified device that has a baseband connection with the local device.

BthNsLookupServiceBegin

This function initiates a client query that is constrained by the information contained within a WSAQUERYSET (Bluetooth) structure.

BthNsLookupServiceEnd

This function frees the handle after previous calls to the BthNsLookupServiceBegin and BthNsLookupServiceNext functions.

BthNsLookupServiceNext

This function retrieves the results of an SDP search.

BthNsSetService

This function adds, updates, or removes service records from the local SDP database.

BthPairRequest

This function requests the personal identification number (PIN) for a Bluetooth device.

BthPerformInquiry

This function performs an Inquiry operation.

BthReadAuthenticationEnable

This function reads the value for the authentication setting.

BthReadCOD

This function reads adapter's class of device.

BthReadLinkPolicySettings

This function reads the current link policy for the existing connection with the peer that is specified by its Bluetooth address.

BthReadLocalAddr

This function retrieves the Bluetooth address of the current device.

BthReadLocalVersion

This function Reads the version and capabilities of Host Controller Interface (HCI) and Link Manager Protocol (LMP) stacks on the Bluetooth device.

It is a combination of the following two HCI commands:

  • Read_Local_Version_Information
  • Read_Local_Supported_Features

BthReadPageTimeout

This function retrieves the current page timeout value.

BthReadRemoteVersion

This function reads the version and capabilities of Link Manager Protocol (LMP) stack on the Bluetooth device. It is a combination of the following two HCI commands: Read_Remote_Version_Information and Read_Remote_Supported_Features.

BthReadScanEnableMask

This function reads the adapter's scan mode.

BthRefusePINRequest

This function refuses an outstanding PIN request that is retrieved by BthGetPINRequest function.

BthRemoteNameQuery

This function queries the name of a remote Bluetooth device.

BthRevokeLinkKey

This function removes the link key for a Bluetooth device.

BthRevokePIN

This function revokes the PIN for the Bluetooth device.

BthSetCODInquiryFilter

This function sets the Inquiry Filter to a specified class of device (COD).

BthSetEncryption

This function requests that the encryption mode on an existing connection is switched with the peer device.

BthSetInquiryFilter

This function sets the Inquiry Filter to a specified address.

BthSetLinkKey

This function stores the link key for the Bluetooth device.

BthSetPIN

This function stores the PIN for the Bluetooth device.

BthSetSecurityUI

This function allows an application to provide an event that will be signaled by the stack when a device without a PIN sends a PIN request.

BthTerminateIdleConnections

This function disconnects all idle connections held by the L2CAP layer.

BthWriteAuthenticationEnable

This function sets the value for the authentication setting.

BthWriteCOD

This function sets adapter's class of device.

BthWriteLinkPolicySettings

This function writes the current link policy for the existing connection with the peer specified by its Bluetooth address.

BthWritePageTimeout

This function configures the page timeout.

BthWriteScanEnableMask

This function sets the adapter's scan mode.

**The following table shows the Phone-Extension Component functions of the Audio Gateway service.

Programming element Description

BthAGPhoneExtDeinit

Called by the AG service to deinitialize the Phone Extension module.

BthAGGetLastDialed

Called by the AG service to retrieve the number last dialed on the device.

BthAGGetNameByPhoneNumber

Called by the AG service to retrieve the name of the caller by using the Call Line Identification (CLI).

BthAGGetSpeedDial

Called by the AG service to retrieve the destination number dialed using speed dial.

BthAGPhoneExtInit

Called by the AG service to initialize the Phone-Extension module.

BthAGPhoneExtEvent

Called by the Audio Gateway (AG) service when the specified event occurs on the Bluetooth device.

BthAGOverrideCallIn

Called by the AG service when an incoming call arrives.

BthAGOverrideCallOut

Called by the AG service when a call is placed on the device.

BthAGSetServiceCallback

Called by the AG service to determine whether or not the phone has cellular service.

The following table shows the Network Component functions of the Audio Gateway service.

Programming element Description

BthAGNetworkAnswerCall

Called by the AG to receive an incoming call.

BthAGNetworkDeinit

Called by the AG to deinitialize the Network module.

BthAGNetworkDialNumber

Called by the AG to place an outgoing call.

BthAGNetworkDropCall

Called by the AG to terminate an ongoing call.

BthAGNetworkGetCallState

Called by the Audio Gateway (AG) service to retrieve the current state of the network.

BthAGNetworkHoldCall

Called by the Audio Gateway (AG) service to put an active call on hold.

BthAGNetworkInit

Called by the AG to initialize the Network module.

BthAGNetworkRejectCall

Called by the AG to drop an incoming call.

BthAGNetworkSwapCall

Called by the Audio Gateway (AG) service to change the call status from active to hold and vice versa.

BthAGNetworkTransmitDTMF

Called by the AG to sends DTMF codes.

BthAGNetworkUnholdCall

Called by the Audio Gateway (AG) service to activate a call that is on a hold status.

The following table shows the Audio Gateway Core Component function of the Audio Gateway service.

Programming element Description

BthAGOnNetworkEvent

Called by the Network module when an event occurs.

The following table shows the AT Command Extension Module functions of the Audio Gateway service.

Programming element Description

BthAGATSetCallback

Called by the Audio Gateway (AG) service to determine how to respond to the AT commands sent by a peer Bluetooth device.

BthAGATHandler

Called by the Audio Gateway (AG) service each time an AT command is received from a peer Bluetooth device.

See Also

Reference

Bluetooth OS Reference

Concepts

Audio Gateway Service