bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

16bits UUID byte format on macos is different from other platforms.

Open nobonobo opened this issue 4 years ago • 3 comments

DIS service discovered UUID on macos: 180a0000-0000-0000-0000-000000000000

DIS service discovered UUID on others: 0000180a-0000-1000-8000-00805f9b34fb

specification: 128_bit_value = 16_bit_value * 2^96 + Bluetooth_Base_UUID

nobonobo avatar Jun 18 '21 08:06 nobonobo

Seems related to https://github.com/JuulLabs-OSS/cbgo/pull/3 what do you think @nobonobo?

deadprogram avatar Jun 20 '21 09:06 deadprogram

Perhaps this line will convert the UUID of unknown length to a string and parse it. As a result, I think I got a UUID byte string that is different from other platforms.

https://github.com/tinygo-org/bluetooth/blob/28f9f4e69ea8116eb3f180ec9c050cf9d27aa82c/gattc_darwin.go#L28

May be, We will need support 32bits UUID format for JuulLabs-OSS/cbgo#3.

nobonobo avatar Jul 02 '21 00:07 nobonobo

This has now been fixed in #113

Thanks for helping out @nobonobo

I will marked it to be closed after the next release.

deadprogram avatar Aug 30 '22 19:08 deadprogram

The fix for this has been released, so now closing. Thank you!

deadprogram avatar Oct 27 '22 20:10 deadprogram