I am writting console Application using C# and 32feet library. I want connect via bluetooth to phone device. I was following this code : link I came across a problem while pairing two devices. I am using this line to request connection:
bool isPaired = BluetoothSecurity.PairRequest(device.DeviceAddress, DEVICE_PIN);
Now auth request shows up on my phone, but there is a problem, becouse auth-code on phone is slighlty different than DEVICE_PIN. Computer trying to connect with phone, but after few minutes I get "Connection failed" info. This is my method to pair
public void pair(int index)
{
BluetoothClient client = new BluetoothClient();
devices = client.DiscoverDevices();
BluetoothDeviceInfo device = devices[index];
bool isPaired = BluetoothSecurity.PairRequest(device.DeviceAddress, "8080");
if (isPaired)
{
Console.WriteLine("Paired: ");
}
else
{
Console.WriteLine("Not paired: ");
}
}