I am learning to program with Bluetooth LE Devices and writing a simple mobile app. Here is my entry-level question:
Say I only want to connect to a certain type of Bluetooth LE device (like a blood pressure device), but when I do a scan it could return more than one result if there are other Bluetooth LE device present in range. So I might get the following results:
Device 1 RSSI, Device 1 Name, Device 1 Address;
Device 2 RSSI, Device 2 Name, Device 2 Address ...
How can I tell the code to pick up the type of device that I want (in this case, the blood pressure device)? Does the device address get assigned by the vendor of the product and are they unique enough and following a scheme that I can use to identify this type of device? If not, what other option do I have for the app to automatically recognize a certain type of Bluetooth device?
The above code won't work. You will have to scan the device, connect to it, and discover the services. A heart rate device has a specific service characteristic. Here is a link for that: https://developer.bluetooth.org/TechnologyOverview/Pages/HRP.aspx
check out this link of an answer I have that demonstates heart rate device: https://stackoverflow.com/a/29548205/862382