Add connectionless CTE RX feature to list of features supported
by controller. Add direction finding initialization in hci_core
if the feature is enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Before thic commit the bluetooth/df unit tests subdirectory contained
connectionless CTE TX verification. Due to the implementation of
connectionless CTE RX new set of tests will be provided.
The new functionality requires different: configuration and common
setup code. Because of that, current test code was moved to
connectionless_cte_tx subdirectory.
Code shared by all DF tests is moved to common subdirectory.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Disable of CTE sampling for periodic advertising sync PDUs may be
interrupted by radio event. In such situation, TX thread will be
handled before RX thread delivers IQ samples report to host. In
this case RX thread would deliver IQ samples report after CTE
sampling was disabled.
To avoid such situation RX thread has to check if:
- CTE sampling is not disabled,
- CTE sampling was not requested to be disabled after start of radio
event.
CTE sampling configuration is double buffered. Updated configuration is
swapped at the beginning of radio event.
If CTE sampling is diabled or requested to disable (next radio event
didn't start), the IQ samples report should be dropped by RX thread
and should not be delivered to host.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add reporing of IQ samples collected for CTE attached to periodic
advertising PDUs with bad CRC.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Kconfig option that will enable possiblity to sample CTE attached to
PDUs that have bard CRC. Sampling is based on CTEInfo field available
in received PDU. If radio is able to parse the field correclty then
it will start sampling even the CRC is wrong.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add function that enables or disables CTE sampling attached to received
periodic advertising PDUs.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
ULL may request LLL to start receiving and sampling CTE attached to
end of periodic advertising PDUs. When the CTE is successfully sampled,
LLL should report collected samples to ULL.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Nordic Radio perihperal provides possiblity to get value of CTEInfo
field parsed from received PDU. It is faster to get the information
from Radio register than parse a PDU content.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add function to enable CTE receive and sampling. The function
is aimed to be used by code in lll_sync.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To enable or disable CTE sampling during periodic advertising sync evnet
it is requireq to change the event duration. To make it possible new
function was added that handles the operation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
lll_sync object is used to store information for LLL to enable
or disable CTE sampling. The commit adds initialization of
lll_df_sync member of lll_sync.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To enable or disable CTE sampling in periodic advertising scanner LLL
implementation lll_sync is extended by lll_df_sync member.
The lll_df_sync is a double buffer for lll_df_sync_cfg.
It will be used by LL thread to enable or disable CTE sampling and
provide configuration for sampling CTE in AoA mode.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add handling of Direction Finding node_rx_iq_report type in ULL.
This is required to correctly deliver IQ samples collected by
LLL during receive of PDU including CTE.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
CTE sampling enable or disable requests should be provided to LLL.
Double buffer of lll_df_sync_cfg is added to lll_sync for that purpose
Thanks to that:
- there is no need to synchronize LLL with LL thread
- LLL has always access to valid configuration (new or former)
The configuration is stored in double buffer as instances
of lll_df_sync_cfg, not as pointers. This is the only
difference between double buffer pattern used to store adverising PDU.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new structure lll_df_sync_cfg to store DF configuration
for periodic advertising synchronization.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add functions that will allow to mangage IQ reports memory pool
e.g. allocate or relase new IQ report nodes.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new kind of node_rx type that will store IQ samples report.
The structure includes node_rx_hdr and may be used by the same
queues that are used to forward regular node_rx_pdu objects
between LLL and ULL.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add HCI_LE_Connectionless_IQ_Report event that will allow controller
to report received CTE and provide collected IQ samples to host.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new command HCI_LE_Set_Connectionless_IQ_Sampling_Enable that
will allow host to enable CTE sampling in controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
All commands are put in the file according to OpCode Command Field
increasing order. bt_hci_cp_le_set_cl_cte_tx_enable was written in
wrong position. This commit moves it to correct one.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction Finding support requires possibility to receive and sample CTE
attached to periodic advertising PDUs. New option will be used to enable
or disable the functionality. New option is introduced to avoid using
double statements checking if BT_CTLR_DF_CTE_RX and BT_CTLR_SYNC_-
-PERIODIC are enabled.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To avid enabling HCI drived debugging, like in other controller source
files, Direction Finding has its own option BT_CTLR_DF_DEBUG_ENABLE.
This gives fine grained control deubgging output.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Set to disabled not yet implemented Direction Finding features.
The features will be enabled by default when they are implemented.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
IQ samples report requires information about antenna switch pattern
that was used to measure RSSI. RSSI is measured during PDU receive.
For Nordic Radio peripheral the PDU antenna is selected by first antenna
switch pattern set in SWITCHPATTERN register. That pattern is providded
by device tree. This information is already available in radio_df.c.
The information is required by LLL, that has access to functions
provided in radio_df.c. New function was provided to return PDU antenna
switch pattern.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
This commit updates the revision of hal_nordic component
and introduces necessary changes to the IEEE 802.15.4 driver
to match latest nRF IEEE 802.15.4 radio driver API.
Signed-off-by: Jedrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Added SAMPLE_MODULE_LOG_LEVEL_DBG as an exception. Define is used
in the log_api test suite.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add panic_mode flag reset to log_core_init(). It allows full logging
reinitialization which is useful for testing.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Previously, when no overwrite mode was used and there was no space
no packet was dropped. However, it should be allowed to drop skip
packet that may be added as padding at the end of the buffer.
Extended dropping scheme to drop skip packets in no overwrite mode.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added early return from mpsc_pbuf_alloc when requested size
exceed the buffer capacity. Previously, in that case buffer
was falling into endless loop.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Check whether the preempt event matches with the head of the
pipeline before aborting the currently active event.
This is required to avoid preemption of events that became
active due to done event and there has been a race in
stopping the preempt ticker.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Check whether the preempt event matches with the head of the
pipeline before aborting the currently active event.
This is required to avoid preemption of events that became
active due to done event and there has been a race in
stopping the preempt ticker.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Sync up with missing LLL changes done related to moving the
handling of pipeline handling into LLL.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added arduino gpios, and the typically used aliases for
arduino_spi, arduino serial and arduino_i2c
Signed-off-by: Kim Bøndergaard <kim.boendergaard@escoglobal.com>
Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>