Windows 7 (BT 2.1 SSP Auth) - How to pair a Bluetooth Keyboard

Topics: Bluetooth - Microsoft
Feb 22, 2012 at 10:54 PM

Hello,

I would like to pair Bluetooth Keyboard on a Windows 7 (BT 2.1 SSP Auth) tablet. The tablet has BT 2.1 SSP Authorization. I have instantiated the BluetoothWin32Authentication component and listening for the event for Legacy, JustWorksComparison, Numeric and PassKey type auth events.

Once I discover and select the keyboard, I am not sure how to send the pair request to the keyboard device. I think, I should use BluetoothSecurity.PairRequest method, but that method takes a pin. When I try "0000", the pair request is not success.

When I attempt to pair Bluetooth keyboard in Windows 7, it displays dialog with the PIN saying, I should enter the same PIN on the keyboard to successfully pair the keyboard.

I am not sure how to implement this using your API. Thanks a lot for your help.

 

Developer
Feb 23, 2012 at 11:42 PM

http://32feet.codeplex.com/wikipage?title=BluetoothWin32Authentication&referringTitle=Documentation [[

  • It seems that Passkey is "please input the passkey as displayed on the other device", and PasskeyNotification is "here's the passkey to type on the remote device, confirm that".
  • So if it is PasskeyNotification, then the Confirm propery needs to be set.
  • Finally if it is Passkey presumably set ResponseNumberOrPasskey as well as Confirm -- this is untested.

    ]]

    So you're in the second case, you'll likely need to display the passkey provided in the callback args, and definately will need to set e.Confirm on the args.

  • Jan 11, 2013 at 8:55 AM

    I have a similar problem as sgurram. I want to send a SSP request FROM my PC programmatically to a device that has a display and a keyboard to accept the "justworks" configuration.

    All the documentation regarding the callbacks I read on the 32feet , codeplex and inthehand is for the PC to respond when a pairing request is made. My scenario is for the PC to send out the SSP request.. I believe I cannot use the PairRequest ?

    My Dongle and the device I am trying to connect are v2.1 devices that support SSP. And I want the "justworks" configuration to be implemented. It is handled already in the device uC firmware. Need help from the PC side.

    Thanks in advance Alan!

    Developer
    Jan 11, 2013 at 12:37 PM

    Register for the authentication callback as discussed above. Then, since you want to initiate this pairing process call BluetoothSecurity.PairRequest passing a null password.