I am using an RPi3 to control a machine which will be able to communicate with android and other bluetooth devices. I used the Rfcomm Bluetooth chat example to establish bluetooth communication. The issue that I am facing right now is that my android app cannot connect to windows app until the two devices pair and I need to go on the windows device portal to accept the pairing request for the RPi. Is there a way to automate this programmatically so that the windows app can accept all inbound pairing requests?
1 Answers
0
votes
You could programmatically pair/unpair request on RPi3 running with windows IoT. Please refer to scenarios 8 and 9 in this uwp sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing.
It seems that windows 10/ Windows 10 IoT Core does not support DevicePairingKinds.None.I have tested to pair with parameter as DevicePairingKinds.None,it is failed. You can set as DevicePairingKinds.ConfirmOnly to work around.
deviceInfoDisp.DeviceInformation.Pairing.Custom.PairAsync(DevicePairingKinds.ConfirmOnly);