The 'adi' part of that member name does not make sense since ADI is
already part of extended header, so we only have 'extended header' and
'advertising data'.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
If handle mapping is enabled, we need to use proper advertising set
handle in HCI event.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Removed the node_rx argument for the BIG create/terminate
functions. The event should not be sent right after the
command, but needs to wait for transmissions of
empty BIS packets or BIG terminate indications.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implements the BIG terminate command that terminates a
BIG and returns the appropriate events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implements handling of the BIG create command in the upper link layer.
Does not yet handle sending any BIS events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Put infrastructure for the following HCI commands/events in place:
* LE Read ISO Link Quality command
* LE Read ISO TX Sync command
* LE Set Host Feature Command
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Fix field names of bt_hci_cp_le_setup_iso_path in le_setup_iso_path to
make CIS central/periphal compile and adjust parameter names for
ll_setup_iso_path accordingly.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Implement HCI commands to read information about supported codecs and
controller delay.
* Read Local Supported Codecs command (v1 and v2)
* Read Local Supported Codec Capabilities command
* Read Local Supported Controller Delay command
The following functions are implemented as "weak" symbols and should
be overridden to fill in vendor-specific information into the above
commands.
* hci_vendor_read_std_codecs
* hci_vendor_read_vs_codecs
* hci_vendor_read_codec_capabilities
* hci_vendor_read_ctlr_delay
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Add implementation of HCI_LE_Set_Connection_CTE_Transmit_Parameters
for Bluetooth 5.1 Direction Finding.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add partial implementation for handling Bluetooth 5.1 Direction
Finding HCI command HCI_LE_Read_Antenna_Information to controller
Upper Link layer.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix node rx buffer leak if extended advertising and/or
periodic sync reports are masked out by the host.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added code comments to explain the reasons to drop
incomplete advertising and sync report.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Extended Advertising Report generation that skipped
population of AD data when there was no extended header.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Put infrastructure for the following HCI commands/events in place:
* LE Setup ISO Data Path command
* LE Remove ISO Data Path command
* Configure Data Path command
* LE Set CIG Parameters Test command
* LE ISO Read Test Counters command
* LE ISO Receive Test command
* LE ISO Test End command
* LE ISO Transmit Test command
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Fix Extended Advertising Data population when there is no
Extended Header to be filled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Instead of guarding the NODE_RX_TYPE_USER cases with
CONFIG_BT_CTLR_USER_EXT we guard them with
CONFIG_BT_CTLR_USER_EVT_RANGE > 0 as that is the actual value that
enables/disables the NODE_RX_TYPE_USER values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of having explicit values for each entry in the enum that
has to be updated for each new entry (thus requiring manual work
which can also be error-prone), the enum will now be
self-incrementing, to make it easier and safer to add new
entries.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Put infrastructure for the following HCI commands/events in place:
* LE Set CIG Parameters command
* LE Remove CIG command
* LE Create CIS command
* LE Accept CIS Request command
* LE Reject CIS Request command
* LE CIS Established event
* LE CIS Request event
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Fix the ll_scan_enable interface signature, place duration
before period parameter to reflect the order as in the HCI
LE Set Extended Scan Enable command.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactoring of conditional compilation related to extended
scanning with duration and period.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove generation of Periodic Sync Lost HCI event generation
that is not needed as per BT Spec. v5.2 Vol.4 Part E.
Section 7.8.69.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added implementation to perform Periodic Sync Terminate,
generation of Sync Lost on terminate and on remote device
termination of Periodic Advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fill the correct local clock accurracy in the Sync Info
structure in the Periodic Advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilations that fail when combinations
of Broadcaster, Observer, Peripheral and/or Central are
selected to build an application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Core 5.2, Vol 4, Part E, section 5.3.1 clarifies that advertising set
handle is assigned by host when advertising set is created and this
happens only on LE Set Extended Advertising Parameters.
An advertising set handle is an arbitrary number within allowed range,
i.e. 0x00-0xEF and not 0..max_supported-1.
This patch adds option to enable advertising set handle mapping from
HCI range as defined by Core specification to zero-based handles used
by LL. If enabled, HCI handle will be remapped to LL handle for each
command, otherwise HCI handle will be used as an LL handle. The latter
effectively skips mapping logic and should be used with Zephyr host
which uses zero based indexes.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
As per Core 5.2, Part B, section 3.1.1 controller should not allow
mixing of legacy and extended advertising commands. Once 1st command
is received from host, we should only allow commands of the same type
and return an error on other commands.
If legacy advertising interface is selected by 1st command received,
we need to make sure that set with handle=0 is created since it's
used by all legacy commands.
When not using external host, we assume that only extended advertising
interface will be used thus all checks can be skipped (optimized and
compiled-out).
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
A lot of commands return CC event with status parameter only, especially
when error is returned. This patch adds a helper to create such event,
similar to cmd_status.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Fill the missing Periodic Advertising interval in the
Extended Advertising Report when Auxiliary PDUs contain
Sync Info fields.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Move implementation of hci_driver.h exposed functions to a common file.
The functions exposed by hci_driver.h header file is implemented in
either hci_core.c, or hci_raw.c. But since these functions would be
identical for both implementations have them in a new file that is
included for both.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Defined struct in node rx for passing event parameters of
Advertising Set Terminated Event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>