Hi Mike,
I am having problems with pairing. When I call the Pair() method, it fails with WCL_E_AUTHENTICATION_FAILED and the call takes a long time after I have entered the code on the phone. Although the error is returned, the pairing is actually successful.
I have to do:
bool paired = false;
dev->GetPaired(*pRadio, paired);
if (paired) {
onStatusChanged (L"Already paired.");
return true;
}
int error = dev->Pair(*pRadio, pin);
if (error != WCL_E_SUCCESS)
{
// verify that it indeed failed?
dev->GetPaired(*pRadio, paired);
if (paired) {
onStatusChanged (L"Pairing succeeded anyway.");
return true;
}
// return error
wclShowError(error);
onError (L"Pairing failed.");
return false;
}
The main problem I am having is that the pair call takes a long time. Although as soon as I have entered the PIN on the phone, a refresh on BluetoothDiscoveryDemo shows me the device is paired...
This is with an 4 yrs or so old laptop with BT 2.0 (I have given you the drivers earlier).
Any suggestions welcome!