No matter the system, 128-bit UUIDs should not be converted to any byte
order when creating the UUID. Conversion to big/little endian should be
performed when transfering the data over-the-air only. bt_uuid_t should
handle 128-bit UUID on big-endian format (human-readable format).
{
uint32_t data0, data4;
uint16_t data1, data2, data3, data5;
- uint128_t n128, u128;
- uint8_t *val = (uint8_t *) &n128;
+ uint128_t u128;
+ uint8_t *val = (uint8_t *) &u128;
if (sscanf(string, "%08x-%04hx-%04hx-%04hx-%08x%04hx",
&data0, &data1, &data2,
memcpy(&val[10], &data4, 4);
memcpy(&val[14], &data5, 2);
- ntoh128(&n128, &u128);
-
bt_uuid128_create(uuid, u128);
return 0;