I am using the BluetoothLE module for an app in a school. There are lots of Bluetooth devices (phones in pockets, etc.), so I want to use ScanForService to find the right devices but that's not working. I can find and connect to a device using a generic scan, and when I connect to the device the SupportedServices list includes the ServiceUUID I am expecting.
This code is functionally nonsensical, but I put it together to demonstrate the issue:
After connecting to the device from a generic scan, I parse the SupportServices, disconnect, and then try scanning for one of the ServiceUUIDs. This does not find the device. However, this does work for an older generation of the device.
Why does ScanForService not find services that show up in the SupportedServices block?