Hi again,
With unpaired/unbonded BLE device:
Beacons Demo shows some frames from our BLE device in Monitoring; the Name, the Service UUID, a short uuid, ....
Re-Testing Discovery today it found the BLE device too - must have been bad karma the other day.
Still unpaired/unbonded:
Connect works, gettings services and getting characteristics from the specific service works.
Subscribe to an IsIndicatable characteristic returns no error.
But the WriteClientConfiguration returns a WCL_E_BLUETOOTH_LE_INSUFFICIENT_AUTHENTICATION
Writing to a IsWritable characteristic also returns 0x00051004
if (m_creditTx.IsIndicatable)
{
success = m_client.Subscribe(m_creditTx);
success = m_client.WriteClientConfiguration(m_creditTx, true, wclGattOperationFlag.goNone, wclGattProtectionLevel.plNone);
if (success != wclErrors.WCL_E_SUCCESS)
{
throw new Exception();
}
}
When the device is paired in Windows - there is no PIN no Passphrase no nothing - the above code works like a charm.
For your other question regarding pairing:
I am using the same procedure as for classic devices except for one difference.
Registering all Events in the Manager and call RemotePair. Connect the wclRfCommClient and wait for the Events to authenticate the device and check the Error in OnAuthenticationCompleted.
For BLE I need to wait prior to Connect the wclGattClient because the Connect aborts the process; but the Error in OnAuthenticationCompleted is mostly WCL_E_BLUETOOTH_LE_AUTH_REJECTED_BY_HANDLER