Currently i am working on heart rate monitor and i found that "2A37" is uuid which is used for getting heart rates data from hrm device. Then i searched a lot but i don't find, why i should use "2A37" and not other for getting heart rates data.
I have gone through the information of below link of bluetooth site but still i am confused.
https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx.
Can anyone please make me understand how can i decide different uuids for diffrent services.
Example: Suppose i need to get battery data from hrm device then, from Bluetooth services information how can i find UUID of battery services data.
Thanks in advance.
A Universally Unique Identifier (UUID) is a globally unique 128-bit (16-byte) number that is used to identify profiles, services, and data types in a Generic Attribute (GATT) profile. For efficiency, the Bluetooth® Low Energy (BLE) specification adds support for shortened 16-bit UUIDs.
To find BLE devices, you use the startScan() method. This method takes a ScanCallback as a parameter. You must implement this callback, because that is how scan results are returned.
Every single Bluetooth device has a unique 48-bit address, commonly abbreviated BD_ADDR. This will usually be presented in the form of a 12-digit hexadecimal value. The most-significant half (24 bits) of the address is an organization unique identifier (OUI), which identifies the manufacturer.
0x2A37 is the UUID for the Heart Rate Measurement characteristic. You use that number because the spec says that is what it is. The heart rate service is 0x180D. The page you linked to has the numbers in the table. Battery service is 0x180F. What you will need to read is the battery level characteristic which is 0x2A19. You just have to click the battery service and then click the battery characteristic to find the relevant page with all the details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With