zephyr
zephyr copied to clipboard
samples: Bluetooth: Added multiple broadcaster and Extended Advertising chain PDU validation
Added Extended Advertising multiple advertising set broadcaster sample. Which is used to manually verify that AD data PDU chaining is functional.
Added implementation to Observer sample so that when Extended Advertising feature is enabled, it can receive Extended Advertising Reports, and hence receive long AD data from peer Extended Advertising Broadcaster Multiple sample.
Fix Extended Advertising and Periodic Advertising's parent PDU's aux ptr field to contain correct aux offset value to its chain PDU.
Uninitialized pointer reference to aux ptr in the parent PDU was used before the pointer reference was returned by the function adding the aux ptr fields in the parent PDU.
Use local variable to update current PDU's Common Extended Header Format flags instead of updating it directly in the PDU buffer. This is required to be able to non-destructively be able to manipulate the PDU's header flags and contents many time before a final commit of the updated PDU.
In order to calculate overflowed AD data length, PDU is manipulated couple of times to determine the overflow length and next to be able to add aux ptr field when chain PDU is appended.
The changes are now consistent with how Periodic Advertising PDU's Common Extended Header Format is manipulated.
Signed-off-by: Vinayak Kariappa Chettimada [email protected]
@Thalley please re-review