简体   繁体   中英

What UUID(bluetooth LE) should I use to connect between my android app and lightblue app?

In this case, I hope to use LightBlue app to simulate as a "Heart Rate" Virtual Peripherals.

And wish to write the android app to connect this Virtual Peripherals.

But I really do not know that how to test read/write/... function between my app and LightBlue.

I try to use General's UUID in "Heart Rate" to filter the device I find, but it always return nothing.

What UUID should press in "startLeScan(UUID, callback)" function?

Where can I find it in LightBlue?

Then, there are some service UUID have only 16bits, how can I use it?

what should I do in callback function that function can help me to get the value on my LightBlue?

this is the code that I reference to.

and this code

UUID HUMIDITY_SERVICE = UUID.fromString("f000aa20-0451-4000-b000-000000000000");

UUID HUMIDITY_DATA_CHAR = UUID.fromString("f000aa21-0451-4000-b000-000000000000");

UUID HUMIDITY_CONFIG_CHAR = UUID.fromString("f000aa22-0451-4000-b000-000000000000");

For one sensor, he use three UUID for SERVICE, DATA, CONFIG, it really confuses me!

how should I find all about that by LightBlue?

Please give me some suggestion.

Thanks a lot!

Devin

The assigned service UUIDs are available here . The Heart Rate Service is 0x180D. The characteristics are listed on this page . The heart rate characteristics are 0x2A39, 0x2A8D and 0x2A37.

You should refer to the Heart Rate Service specification for details on the use of the characteristics

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM