I have a question for how to define BLE 128 bit service UUID in arduino.
I can see 16 bit UUID in example like this:
define SERVICE_UUID_BATTERY (0x180F)
but how to define the 128 bit UUID in arduino?
Thanks
I have a question for how to define BLE 128 bit service UUID in arduino.
I can see 16 bit UUID in example like this:
but how to define the 128 bit UUID in arduino?
Thanks
It can be defined this way:
/* 00000000-ABCD-FEED-F00D-012345678900 decided as custom ID. */
uint8_t UUID[] = { 0x00, 0x89, 0x67, 0x45, 0x23, 0x01, 0x0D,0xF0, 0xED, 0xFE, 0xCD, 0xAB, 0x00, 0x00, 0x00, 0x00 };
As Arduino is based on C++, I don't think this is possible because :
GCC does have an uint128_t/int128_t type, starting from version 4.something (not sure here). I do seem to recall, however, that there was a __int128_t def before that.
But you can try to have a look at this thread : Representing 128-bit numbers in C++
Maybe you can use this librairie in Arduino...