Removing the AD flags from the advertising packet

3 posts / 0 new
Last post
oren
Offline
Last seen:1 year 7 months ago
Expert
加入:2014-06-28 22:03
Removing the AD flags from the advertising packet

OK, this is going to be a strange request, but I want to check if it's possible.
Thegapm_start_advertise_cmdstruct contains agapm_adv_hoststruct, which contains theadv_data_lenand theadv_data:

/// Advertising data length - maximum 28 bytes, 3 bytes are reserved to set
/// Advertising AD type flags, shall not be set in advertising data
uint8_t adv_data_len;
/// Advertising data
uint8_t adv_data[ADV_DATA_LEN-3];

As stated in the comment, 3 more bytes are sent in addition to theadv_data- an ad-structure of: 0x02, 0x01, flags-byte (length, ad-type of "flags", value).
Is it possible to remove this ad-structure and control the whole 31 bytes directly?

The reason I'm requesting this feature is that I want to advertise an iBeacon packet, similar to:http://stackoverflow.com/questions/18906988/what-is-the-ibeacon-bluetoot...
(the first 3-bytes ad-structure 0x02, 0x01, 0x1A is not really necessary - iOS detects the iBeacon even without it).

The 27 bytes that the iBeacon format requires leaves me exactly 4 bytes to send additional data: 2 bytes for the ad-structure header (0x03, 0x08 for "shortened local name") and 2 bytes of value.

Obviously, I can send the additional information in the scan-response packet, but this reduces the probability that the additional information is received.

I know that I may not be following the BLE\GAP\GATT standards...

PY_Dialog
Offline
Last seen:2 years 10 months ago
Staff
加入:2014-08-25 09:59
Hi Oren,

Hi Oren,

Our stack on DA14580 follows the standard BLE stack and can not compose and sending out illegal packet, which will be prohibit by our kernel. So please use the scan response to carry out more information you hope to deliver.

Regards!
Percy Yu

toughworld
Offline
Last seen:3 years 3 months ago
加入:2015-05-12 09:55
hi,PY_Dialog

hi,PY_Dialog
BLUETOOTH SPECIFICATION permit no flag AD,please reconsider the unneccesary limit.
“ The Flags AD type shall be included in the advertising data if any of the bits are non-zero. The Flags AD type may be omitted from the advertising data if all of the bits are zero.”
so is there a way i can remove the ad flag?