That's correct. The sum of the total bytes of the advertisement packets should be less than 31 bytes. However you can use Scan response if you want to advertise more data.
Here's another blog for advertising:
Can you explain more about using scan response as we want to advertise more data? Thanks a lot.
Further more, as i see some description for the scan response as following:
The scan response comes with a catch. If scan responses are enabled in a peripheral device, the device has to keep the radio in RX mode after it sent the advertisement to be able to receive the scan request packet. This has to be done even if there is no device out there that will actually send one (because the peripheral doesn’t know who is really out there). This means more energy consumed. For very low power applications, consider disabling the scan response if not absolutely needed.
can we implement this scan response in WICED SDK for BCM20737S?is this possible for us to implement?
It is true that the receiver of the peripheral device has to remain "on" so as to get itself ready to receive a scan_req, regardless if there is any. The above is also known as active scanning because the scanner will have to probe actively (sending scan_req) instead of passive listening.
Refer to userc_19497's blog, under "Starting Advertisement", use blecm_StartAdv to implement this scheme.
Yes, you can implement the scan response in WICED SDK.
We actually have functions that you can call to easily implement it.
The implementation is essentially the same as regular advertisements using the API.
Here is an example of manipulating both regular advertisement and scan request.
// advertise first vendor specific service
if(sizeof(tag4_uuid_main_service) > 1)
// total length should be less than 31 bytes
// Scan Request
adv.len = 1 + 1;
adv.val = ADV_FLAGS;
adv.data = LE_LIMITED_DISCOVERABLE | BR_EDR_NOT_SUPPORTED;
// Manufacturer Data & Device Type
adv.len = 2 + 1;
adv.val = ADV_MANUFACTURER_DATA; // (AD_TYPE == 0xff)
adv.data = 0x0f; // Broadcom (Company Identifier 2 bytes)
adv.data = 0x00;
// Scan request
scr.len = strlen(bleprofile_p_cfg->local_name) + 1;
scr.val = ADV_LOCAL_NAME_COMP;
memcpy(scr.data, bleprofile_p_cfg->local_name, scr.len - 1);
} //@end makeADVData
Then you can call this function in create function before you start advertising.
Let us know if this helped.
It works, thanks a lot.