Nice intro to advertising Jaakko Looking forward to the following more detailed articles and how the nuances are supported in the SiLabs devices.
I often see devices that somehow manage to embed both a fairly long name and 128bit UUIDs, thus going past the 31 bytes limit of advertisement packets. Is there a trick they use for doing this? Such as picking different contents for each advertisement, or another mechanism?
For instance, a device I work with uses a 17 byte UUID packet + 16 byte 0x09 'complete name + header...
Right now I am trying to achieve the same on a BGM-111 device powered by bgscript, any advice on how to do this?
@elafargue you can put additional data in scan responses. The advertising payload is 31 bytes and the scan response is another 31 bytes.
You can initialize the advertising and scan response data explicitly using the cmd_le_gap_set_adv_data API command. The parameter scan_rsp selects which data set you are updating. See BGAPI reference manual for more info.
Alternatively, you can just let the stack fill the adv data and scan responses. The logic how this works is explained in the BGAPI ref.manual, see command cmd_le_gap_set_mode.
EDIT: active and passive scanning concepts are explained in following document:
Thanks for your reply! I did exactly this and it works great, getting a full name + proper UUID in the advertising + scan response packets now, so that we can use filtering on service when scanning for the devices, makes it a lot simpler for users.
Will there be an article on using custom advertising data? I need to put in some extra data in manufaturer specific data to be able to separate devices from each other as or complete device names does not fit in the advertising packet.