BT_SSP_USER_PASSKEY_NOTIFICATION_EVENT (Compact 7)
3/12/2014
This structure contains event data for the BT_SSP_USER_PASSKEY_NOTIFICATION event.
Syntax
typedef struct BT_SSP_USER_PASSKEY_NOTIFICATION_EVENT {
UINT Passkey;
} BT_SSP_USER_PASSKEY_NOTIFICATION_EVENT;
Members
- Passkey
A randomly generated, six decimal-digit passkey to display to the user.
Remarks
The BTE_SSP_USER_PASSKEY_NOTIFICATION event provides the randomly generated passkey for display to the user. The application must display the passkey on the local device.
The user must enter the same passkey on the peer Bluetooth device. As the user enters the passkey, the application may receive BTE_SSP_KEYPRESS_NOTIFICATION events. When the user has finished entering the passkey, the stack compares it to the passkey from the Passkey member and sends authentication success or failure events to the application.
This structure is the UserPasskeyNotification member of the BTSSPEvent structure. It is present in the union in BTSSPEvent when BTSSPEvent.BTECode is set to BTE_SSP_USER_PASSKEY_NOTIFICATION.
Example
The following code shows how to access this structure.
Important
For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.
BTEVENT event;
// Insert code to retrieve event from message queue.
ASSERT(event.dwEventId == BTE_SSP_USER_PASSKEY_NOTIFICATION);
BTSSPEvent *pSSPEventData = (BTSSPEvent *) event.baEventData;
BT_SSP_USER_PASSKEY_NOTIFICATION_EVENT passkeyEventData =
pSSPEventData->UserPasskeyNotification;
Requirements
Header |
bt_api.h |
See Also
Reference
Bluetooth Application Development Structures
BthSSPUserPasskeyRequestReply
RequestBluetoothNotifications
StopBluetoothNotifications
Bluetooth Application Development Events