- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to advertise the following data
adv[0].len = 16+1;
adv[0].val = ADV_SERVICE_UUID128_COMP; // (AD_TYPE == 0x07)
BT_MEMCPY(&adv[0].data, vendor_service_uuid, 16);
adv[1].len = 10+1;
adv[1].val = ADV_LOCAL_NAME_COMP;
BT_MEMCPY(&adv[1].data[0], local_name, 10);
adv[2].len = 1+1;
adv[2].val = ADV_MANUFACTURER_DATA; // (AD_TYPE == 0xff)
adv[2].data[0] = variable & 0xFF;
But it only advertises ADV_SERVICE_UUID128_COMP and ADV_LOCAL_NAME_COMP, I can not see the manufacturing data.
The total length here is 17+11+2 = 30 bytes.
Any suggestion on why I can't see the manufacturing data?
Solved! Go to Solution.
- Labels:
-
Debug
-
SDK 2.X
-
WICED Sense
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe the problem is adv[2].data[0] = variable && 0xFF;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
also your math is not correct. the length of your data is 33 which does not fit. Over the air it goes Length Type Data. So if data is 16 octets in length this portion of advertisement data taks 1 + 1 + 16 = 18.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That makes it clear, 33 bytes is my length and hence the isue. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Extra & in && looks like a bug as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That was a typo!