Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: How to define 128bit UUID

$
0
0

Something like this:

static const uint8 c_char_uuid_SerialNo[16] =
{ 0x7b, 0xcc, 0x71, 0x7a, 0xba, 0xc5, 0x42, 0xdb, 0x89, 0xec, 0xb5, 0xf4, 0x85, 0x1f, 0x1f, 0x15 };

static const uint8 c_char_uuid_myService[16] =
{ 0x7b, 0xcc, 0x71, 0x7a, 0xba, 0xc5, 0x42, 0xdb, 0x89, 0xec, 0xb5, 0xf4, 0x85, 0x1f, 0x1f, 0x16 };

static const gattAttrType_t myProfileService = { ATT_UUID_SIZE, c_char_uuid_myService };

static gattAttribute_t myProfileAttrTbl[] =
{
// Simple Profile Service
{
{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */
GATT_PERMIT_READ, /* permissions */
0, /* handle */
(uint8 *)&myProfileService /* pValue */
},

// Serial number
{ { ATT_BT_UUID_SIZE, characterUUID }, GATT_PERMIT_READ, 0, &charProps_RO },
{ { ATT_UUID_SIZE, c_char_uuid_SerialNo }, GATT_PERMIT_READ | GATT_PERMIT_WRITE, 0, NULL },

};


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>