- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The author was building a new packet to indicate that the packet is a broadcasting packet. Here he is defining his advertising structure:
/* Define the advertisement data for the broadcast - this includes the
* advertisement flags and the device name advertised. The device name
* used for Broadcasting is different from the device name used when
* we want to connect to another device.
*/
CYBLE_GAPP_DISC_DATA_T myAdvData =
{
{
2, /* Length for Flags field */
1, /* Identifier that following data is Flags field */
4, /* Advertisement Flags - BR/EDR not supported */
17, /* Length for Complete Name field */
0x09, /* Identifier that following data is Complete Name field */
/* Name */
'B', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'e', 'r', ' ', 'O', 'n', 'l', 'y'
},
21 /* Total bytes in the advertisement packet */
};
After the Length of Complete Name field comes the AD Type, which the programmer assigns as 0x09. However, if you go off of the table on Page 52 of the BLE PSoc Creator Component Datasheet, the Use of Local Name should correspond to 0x01, not 0x09, if you go by the position of the AD type within the array. Local Name comes directly under Flags with the first position in the array. Is it correct to associate the listing of the AD types in this table to the numeric index or is there an association made elsewhere that I could not locate that identifies 0x09 with Complete Local Name?
Message was edited by: James Carter
Solved! Go to Solution.
- Labels:
-
BLE
- Tags:
- broadcasting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The array of AD types on Page 52 of the Component Datasheet doesn't tell you the index, enumeration, or numbers associated with the different AD types. It merely lists the different types in a table. I don't know why you would assume that
0x09 is the correct value for the Complete Local Name AD Type. If you open the BLE Component itself and go to the GAP Settings page, selecting the "Local Name" to be advertised will insert the value 0x09 as the AD type value associated with the Complete Local Name. Also, since it is a Bluetooth defined constant, looking at their website:Generic Access Profile | Bluetooth Technology Website
You will see that the Complete Local Name is defined as 0x09 there as well
Hope this helps answer your question (wasn't sure if that was what you were asking)
Epratt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The array of AD types on Page 52 of the Component Datasheet doesn't tell you the index, enumeration, or numbers associated with the different AD types. It merely lists the different types in a table. I don't know why you would assume that
0x09 is the correct value for the Complete Local Name AD Type. If you open the BLE Component itself and go to the GAP Settings page, selecting the "Local Name" to be advertised will insert the value 0x09 as the AD type value associated with the Complete Local Name. Also, since it is a Bluetooth defined constant, looking at their website:Generic Access Profile | Bluetooth Technology Website
You will see that the Complete Local Name is defined as 0x09 there as well
Hope this helps answer your question (wasn't sure if that was what you were asking)
Epratt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would have expected to see as an addition to the table the corresponding index. Since I didn’t see it, I had to assume it, but I also had doubts about it due to another example given. Thanks for the reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No worries. I've made similar assumptions before.
Glad I could help out
Epratt