Hi there,
after updating from 6.7.6.0 to 6.11.2.0 I'm not able to pair anymore.
I use this code:
switch( this.m_btDevice.Radio.API )
{
case wclBluetoothAPI.baMicrosoft:
case wclBluetoothAPI.baBlueSoleil:
m_authenticator.Radio = this.m_btDevice.Radio;
m_authenticator.Open();
m_authenticator.OnPINRequest += new wclPINRequestEventHandler( this.OnPINRequest );
bSilentAuthentification = true;
break;
}
// is paired ??
bool bPaired = false;
this.m_btDevice.Device.GetPaired(this.m_btDevice.Radio, ref bPaired);
if( bPaired == false )
{
if( bSilentAuthentification == false )
{
//show some message box
}
m_BTState = BTConnectionState.Pairing;
int iPaired = this.m_btDevice.Device.Pair(this.m_btDevice.Radio);
MessageBox.Show(wclErrors.wclGetErrorMessage(iPaired));
}
// connection timeout in milliseconds
// m_client.ConnectTimeout = 20000;
m_client.BluetoothParams.Address = this.m_btDevice.Device.Address;
if (m_client.BluetoothParams.Radio == null)
{
m_client.BluetoothParams.Radio = this.m_btDevice.Radio;
}
m_client.BluetoothParams.Service = wcl.wclUUIDs.SerialPortServiceClass_UUID;
m_client.Transport = wcl.wclClientTransport.ctBluetooth;
m_BTState = BTConnectionState.Starting;
m_client.Connect();
private void OnPINRequest( object sender, wclPINRequestEventArgs e )
{
e.PIN = "the PIN";
}
I had to remove the PIN from Pair() when updating. Pair now returns "Authenticator is already active" (200) while e.Error in OnConnection returns "Access denied" (33).
The demos "AuthenticatorDemo" and "BluetoothClientDemo" will return 33 as well.
Any ideas?
Thanks in advance,
Flo