Added implementation to support setting of legacy
Advertising Data and Scan Response Data using Extended
Advertising Data set functions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Differentiate call to ll_adv_params_set, whether used by
legacy LE Set Advertising Parameters or LE Set Extended
Advertising Parameters.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enable Advertising Extensions features in the controller
when enabled in the Host in combined host+controller based
applications.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update implementation of periodic advertiser's LLL to
correctly handle event counter values when latencies
introduced due to sync events cancelled by active events
operating in unreserved time space.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilation of advertising extensions and
periodic advertising do that platforms with not support in
their LLL can be built without advertising extensions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilation of piggy back implementation.
This code should be deleted once periodic advertising
implementation is complete.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor to reuse common repeated code in ISR that reset
status, and performed abort, done and cleanup.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation to support ADV_EXT_IND PDU with AuxPtr.
Changes in this commit only prepares the ADV_EXT_IND PDU
in the primary channel.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added debug information print outs in HCI code related to
Advertising Extensions events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add support for Bluetooth Controller GPIO Debug Pins for
nRF5340 PDK board. GPIO Pin toggling can be captured on the
P3 pinhead of the PDK.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Port advanced scheduling implementation from legacy
controller.
This implementation schedules
- non-overlapping scan window when there are simulataneous
central connections active
- central connection establishment with similar connection
intervals be placed in a non-overlapping group, temporally
- connection parameter request with calculated window offset
hints to have non-overlapping BLE radio events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add a function to reset the variable holding the connection
context of the currently active Connection Parameter Request
Procedure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Address the nRF5340 Engineering A Errata 16, RADIO: POWER
register is not functional.
This affects the dependency of controller's HAL
implementation that expected correct reset values being
set in the Radio peripheral.
As the SUBSCRIBE_TXEN and SUBSCRIBE_RXEN where not in their
reset value, Radio transmission and reception start using
DPPI was broken.
Fixes#25942.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Implemented an intermediate decrypt buffer to cover the CCM
overrun under CRC error conditions. The workaround is
applicable to nRF52832 SoC only, which is missing the
MAXPACKETSIZE register in the NRF_CCM peripheral.
Fixes#21107 for nRF52832 SoC.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix missing assignment of NRF_CCM->MAXPACKETSIZE register
for PDU sizes smaller than 251 bytes. If there is CRC errors
causing PDU length fields to be higher than configured PDU
buffer sizes in the controller, without the MAXPACKETSIZE
register set to correct PDU size, CCM module could overrun
the PDU buffer and cause memory corruption. This fix is
applicable for all nRF52 Series SoCs except nRF52832 SoC.
Fixes#21107.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The existing feature exchange procedure does not give the proper
response as specified in the BT core spec 5.0.
The old behaviour is that the feature-response returns the logical and
of the features for both peers.
The behaviour implemented here is that the feature-response returns the
featureset of the peer, except for octet 0 which is the logical and of
the supported features.
Tested by using the bt shell, and having different featuresets
on the 2 peers.
This fixes#25483
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Fix missing transmit buffer demutiplexing before checking if
slave latency needs to be maintained or cancelled.
This bug was detected when new transmit buffer was enqueued
overlapping with on-air radio transmission of empty PDU
preceding the handling of radio event done.
Symptoms of this bug being data transmission latency of upto
slave latency plus one times connection interval.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit adds support for bluetooth in nRF52820 SoC.
Bluetooth radio related files created and added to Zephyr.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
With BT_CTLR_USER_TICKER_ID_RANGE it is possible for vendors to add a
number of ticker nodes for proprietary purposes. The feature depends on
BT_CTLR_USER_EXT.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Split BT_CTLR_CONN_RSSI option into two, the base option enables the
Read RSSI command, while the new BT_CTLR_CONN_RSSI_EVENT enables the
connection RSSI events. There is no handling of RSSI events, only a
BT_INFO log.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Convert bluetooth controller to using the new k_timeout_t API so that
CONFIG_LEGACY_TIMEOUT_API can be turned off.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove logging of individual threads spread out throughout the
bluetooth subsystem. The stacks can be analysed by enabling the
following options.
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
Optional:
CONFIG_THREAD_NAME=y
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix local RPA field for the legacy controller. This failed without
compilation errors because of blind pointer cast between two
structs of similar definition.
Set the local RPA field of the enhanced connection complete event only
when the address was generated by the controller. If the host has
set an RPA and this one was used the controller should return all
zeroes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the local RPA field of the enhanced connection complete event only
when the address was generated by the controller. If the host has
set an RPA and this one was used the controller should return all
zeroes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This is a rework for OpenISA SW LL of
"b7220cef86 Bluetooth: controller: split: Fix densely scheduled event
preemption"
Fix LLL implementation handling preemption of currently
active radio event with densely scheduled events in the
pipeline.
Preempt timeout was stopped without consideration to there
being more queued events in the pipeline. Also, added
chaining of preemption timeouts one after the other expiry
so as to preempt currently active events by the densely
scheduled events in the pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"b0826a7f65 Bluetooth: controller: split: Reduce time to setup tIFS
switch"
Refactor to reduce the setup next tIFS switch within tIFS
period of the Radio ISR.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"4547bfb452 Bluetooth: controller: split: handle latency for cancelled
conn events" as well as subsequent fixes
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
This is a rework for OpenISA SW LL of
"62c1e1a52b Bluetooth: controller: split: Fix assert on invalid packet
sequence"
Fix to remove assertion failure check on detecting invalid
packet sequence used by peer central and that no non-empty
packet was transmitted.
Fixes#22967.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
When receiving an unknown command send the unknown command response
as a command status event instead of a command complete event.
A command complete event has no status field, although by convention
all command parameters has a status field as the first parameter the
command status event seems like the more fitting option.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This patch adds the selection of the necessary CONFIG_*
options for allowing the use of privacy on VEGA platform
Signed-off-by: Jeanina Dragusin <ancajeanina.dragusin@nxp.com>
The radio on the VEGA platform will now be able to resolve Resolvable
Private Addresses through the use of the CAUv3 hardware. With this
patch the RPA feature is now fully supported on the Controller:
RPA addresses are generated with local IRK and resolved with
previously exchanged peer IRK.
Signed-off-by: Jeanina Dragusin <ancajeanina.dragusin@nxp.com>
Replace CONFIG_ENTROPY_NAME with DT_CHOSEN_ZEPHYR_ENTROPY_LABEL. We now
set zephyr,entropy in the chosen node of the device tree to the entropy
device.
This allows us to remove CONFIG_ENTROPY_NAME from dts_fixup.h. Also
remove any other stale ENTROPY related defines in dts_fixup.h files.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The LE Connection Complete HCI event, unlike its Enhanced counterpart,
only uses 0x0 and 0x1 for Peer Address Type. Fix it so that it reflects
the specification correctly.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This PR fixes#23482. The preamble size for a 2M phy was incorrect.
There is a bug in calculation of time for the DLE procedure:
the preamble size is incorrect for the 2M phy
Fixes#23482
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
For the ll code we know the exact entropy device as its the one for the
SoC that we are on. So use the new DT macro's to get the entropy device
via DT_INST rather than using CONFIG_ENTROPY_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The board target for emulation of nRF52810 on nRF5DK, so far
known as nrf52810_pca10040, is renamed to nrf52dk_nrf52810.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The board name for the nRF52 DK, so far known as nrf52_pca10040, is
renamed to nrf52dk_nrf52832. Its documentation and all references
to its name in the tree are updated accordingly. Overlay and
configuration files specific to this board are also renamed, to
match the new board name.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Update implementation of master and slave LLL's to correctly
handle event counter values when latencies introduced due to
connection events cancelled by active events operating in
unreserved time space.
When an active radio event extends into unreserved time
space, and a connection event prepare is scheduled but at
the time of pre-emption timeout if the connection event is
cancelled then the event count and latencies needs to be
continiued to get acummulated.
In the current controller usecases the above scenarios does
not get exercised, the changes in this commit is needed for
future roles that can extend into unreserved time space and
would cancel a scheduled connection event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Most places used an int so that should have handled most cases but
keys_set was using an unsigned int, which meant that checking len > 0
is an expression that is always false, and the error handling is not
working.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix regression in cancelling slave latency during Connection
Update Procedure.
Slave latency should not be applied between the ack of a
Connection Update Indication PDU and until the instant.
When caching was introduced, implementation missed this
consideration.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Ticker is now fixed to avoid catch up of periodic timeout under
large ISR latencies.
Revert commit a749e28d98 ("Bluetooth: controller: split:
nRF: Use ticker compat mode as default").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If must_expire is set for a ticker instance, then ticker
expiry shall still perform catchup.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Reset ticker state in ticker_job for ticker instances that
have been skipped in the ticker_worker.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ticker to avoid catch up of periodic timeouts in case of
large ISR latencies like in case of flash erase scenarios.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression in cancelling slave latency during Connection
Update Procedure.
Slave latency should not be applied between the ack of a
Connection Update Indication PDU and until the instant.
When caching was introduced, implementation missed this
consideration.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Simplify the Data Length Update Procedure state check when
processing incoming LENGTH_REQ/RSP PDUs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Simplify the Data Length Update Procedure state check when
processing incoming LENGTH_REQ/RSP PDUs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add validation of channel map and hop increment value
received in CONNECT_IND PDU.
Zero bit count leads to controller assert or divide-by-zero
fault.
Hop increment shall be between 5 and 16 by BT Specification.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add validation of channel map and hop increment value
received in CONNECT_IND PDU.
Zero bit count leads to controller assert or divide-by-zero
fault.
Hop increment shall be between 5 and 16 by BT Specification.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Replace all occurences of BUILD_ASSERT_MSG() with BUILD_ASSERT()
as a result of merging BUILD_ASSERT() and BUILD_ASSERT_MSG().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Deprecate BT_LE_ADV defines in hci.h that are expected to be used by the
application in the scan received callback to identify the advertising
PDU type. These defines are mixing HCI input parameters and advertising
PDU types. Internally it is acceptable to mix these, but at the API we
should to mix in them.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Minor optimization to use a local variable instead of a
deferencing of a struct member.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The nRF52840 DK board target, so far known as nrf52840_pca10056,
is renamed to nrf52840dk_nrf52840.
Its documentation and all references to its name in the tree are
updated accordingly. Overlay and configuration files specific to
this board are also renamed, to match the new board name.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Update the ticks_current value on last stopped ticker
instance, so that when a new ticker instance is started
the anchor ticks calculation uses the correct current tick
with respect to supplied anchor ticks.
Fixes#23805.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove use of k_cpu_idle in controller, and refactor the
implementation used to start, wait and stop clocks needed
by the controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
We rename the nRF51 Dev Kit board target (nrf51_pca10028)
to nrf51dk_nrf51422. We update all associated references
in the supportive documentation and all nRF51-related
cofigurations and overlay files in the samples and tests
in the tree.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add header definition for bt_read_static_addr function. Declaring it
without a header definition will not give any compilation error when
function definition changes.
Refactor nRF SoC specific code into nRF specific source files and
provide weak definitions when these are not implemented. This will make
it easier to add handlers per vendor.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This reverts commit 8739517107.
Pull Request #23437 was merged by mistake with an invalid manifest.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Replace all occurences of BUILD_ASSERT_MSG() with BUILD_ASSERT()
as a result of merging BUILD_ASSERT() and BUILD_ASSERT_MSG().
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
A bug in the PKT_US resulted in wrong calculations for the 2M phy.
Fixes the bug, verified on EBQ.
Also adds some defines for improved readability.
Fixes#23482
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Fix LLL implementation handling preemption of currently
active radio event with densely scheduled events in the
pipeline.
Preempt timeout was stopped without consideration to there
being more queued events in the pipeline. Also, added
chaining of preemption timeouts one after the other expiry
so as to preempt currently active events by the densely
scheduled events in the pipeline.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression in handling invalid packet sequence in the
first packet in a connection.
This relates to commit 62c1e1a52b ("Bluetooth: controller:
split: Fix assert on invalid packet sequence")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression in handling tx pool corruption in relation to
commit 7a3e29af06 ("Bluetooth: controller: legacy: Fix Tx
pool corruption").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix response to unexpected LL_FEATURE_RSP for the case that
BT_CTLR_SLAVE_FEAT_REQ is disabled. Fixes LL/PAC/SLA/BV-01 for such a
configuration.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Update LLCP handling during PHY update and Data Length update to not
start the LL control procedure if the remote has already indicated that
the procedure is not supported.
This fulfills the following requirement from the BT Core Specification
(Core_v5.2, Vol 6, Part B, Section 4.6):
Except where explicitly stated elsewhere in this specification, if the
peer Link Layer has indicated either during a feature exchange procedure
or by responding with an LL_UNKNOWN_RSP PDU that it does not support a
procedure, then the Link Layer shall not use that procedure.
Re-use the connection parameter request handling for PHY and
data length update procedures.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix missing first connection event due to first connection
event ticks_slot overlapping with the initiator window
ticks_slot.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add ticker_stop_abs interface, similar functionality as to
ticker_stop interface to stop a running ticker but with a
supplied absolute tick reference value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added the functions to turn on/off the radio from LLL.
Added WAKE_IRQ to start radio after it's out of DSM.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Added the functions to turn on/off the radio.
Deep Sleep Mode (DSM)
Signed-off-by: Ionut Ursescu <ionut.ursescu@nxp.com>
Signed-off-by: George Stefan <george.stefan@nxp.com>
This patch adds the selection of the necessary CONFIG_*
options for allowing the use of the 2Mbps BLE PHY on
VEGA platform.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
The radio on the VEGA platform supports both 1Mbps, as well
as 2Mbps BLE PHYs. It does not support coded BLE PHY. This patch
adds the necessary callback, as well as timings to enable the 2 Mbps
PHY support in the SW LL HAL for VEGA.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
In Core v5.2, Vol 6, Part B, Section 4.6.9 it is stated that it is
mandatory to support the PHY procedure if any PHY other than 1M is
supported.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
For the time being this 2M is only selectable for !nRF51 platforms.
Coded PHY is only selectable for nRF platforms supporting Coded PHY.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Make BT_CTLR_OPTIMIZE_FOR_SPEED option so that it is not
user selectable for nRF51x series SoC with encrypted
connections support.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix to return the max tx/rx time back to set default time
after using mandatory minimum PDU length and time while
switching back from Coded PHY to 1M PHY.
Also fixes#23109.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Data Length Update transmit and receive time calculation
on PHY update procedure completion.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix conditional compilation error when enabling
BT_CTLR_FAST_ENC for central only application builds.
Also added additional compilation to code exclusive to
central or peripheral role.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add Kconfig option to support building the controller
optimized for speed.
Fixes#21601.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix local initiated Data Length Update procedure from being
stalled when a remote initiates a procedure with instant.
Fixes#23069.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Tx pool from being corrupted when rough central device
uses invalid packet sequence numbers, causing NULL pointer
to be released into free data Tx pool.
Fixes#22968.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When a must-expire ticker callback is executed, it is important not to
call the LLCP state machine, as the lazy state is unavailable. The code
must rely on the next proper event to call ull_conn_llcp with an updated
non-zero lazy count.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Fix EBQ tests for the Max Tx Time and Max Rx Time parameter.
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Bluetooth: controller: split: fixed for endianness
Added conversion to correct endianness
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
Fix local initiated Data Length Update procedure from being
stalled when a remote initiates a procedure with instant.
Fixes#23069.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix ticker resolve collision implementation for incorrect
ticks accumulation and the calculation of next period.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix a race condition in radio abort requested by flash
driver. It is possible that during abort function execution,
PPI setup to start radio fires. Hence, check explicitly in
cleanup function for radio being in use and disable it.
Fixes#22945.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use the old ticker compatibility mode implementation as
default for nRF5x Series SoCs.
Fixes#22926.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix to remove assertion failure check on detecting invalid
packet sequence used by peer central and that no non-empty
packet was transmitted.
Fixes#22967.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- avoid spourious radio interrupts by fixing ISR set,
waiting for idle, command configuration
- adjust counter to account for missing increment
- change preemption instant to avoid missing the deadline in LLL
- decrese EVENT_JITTER_US and
EVENT_TICKER_RES_MARGIN_US (same as Nordic)
Continuous scanning and connections are working fine now.
Signed-off-by: George Stefan <george.stefan@nxp.com>
Created unit tests for the encryption and decryption functions.
Tested with the peripheral and with central_hr samples.
Due to latency of CAUv3 when used as CCM inline accelerator
only one of the PDU can be encrypted/decrypted within an
bilateral exchange M->S + S->M in a connection event.
If the RXed PDU is encrypted, the TXed PDU must be empty
with More Data if there is data in the LLL queue.
The TXed PDU will be encrypted when an empty PDU is RXed.
Signed-off-by: Cristi Caciuloiu <cristian.caciuloiu@nxp.com>
Fix regression due to addition of conditional compilations
while porting the privacy feature from legacy to split
controller.
Fixes#22801.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Data transmission was paused when PHY update request control
PDU was enqueued in ULL. If there was pending data PDU in
ULL that was not enqueued towards LLL, this caused
transmission to stall.
Move the tx pause due to PHY update request/response being
enqueued to pre_tx_ack callback, this way all pending PDUs
in ULL is enqueued to LLL.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The existing stack_analyze APIs had some problems:
1. Not properly namespaced
2. Accepted the stack object as a parameter, yet the stack object
does not contain the necessary information to get the associated
buffer region, the thread object is needed for this
3. Caused a crash on certain platforms that do not allow inspection
of unused stack space for the currently running thread
4. No user mode access
5. Separately passed in thread name
We deprecate these functions and add a new API
k_thread_stack_space_get() which addresses all of these issues.
A helper API log_stack_usage() also added which resembles
STACK_ANALYZE() in functionality.
Fixes: #17852
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If CONFIG_BT_CTLR_CONN_RSSI is enabled, then lll_conn.h should
be included as well. Otherwise, struct lll_conn is unknown
at the compile unit level. This has been reproduced by
compiling the hci_uart sample, where the following error occurs:
lll_adv.c: In function 'isr_rx_pdu':
lll_adv.c:722:13: error: dereferencing pointer to incomplete
type 'struct lll_conn'
lll->conn->rssi_latest = radio_rssi_get();
^~
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>
Fix uninitialized advertiser rl_idx used to check own identity
in CONNECT_IND received for directed advertisements.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This API will be deprecated in favor of the new API that clearly
specifies whether it works on logical or physical levels.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Some compilers can't resolve the conditional if/else/else construction
in ull_conn event_len_prep function, and fail with an 'uninitialized
variables' error. The change has no functional impact.
Signed-off-by: Morten Priess <mtpr@oticon.com>
BT_CTLR_SETTINGS should not depend on BT_SETTINGS as this will prevent
using settings system in the controller in a controller only build.
(BT_SETTINGS depends on BT_HCI_HOST)
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Fix infinite recursion in host-based bt_rand function. This would call
HCI LE Random Number command, which would in turn call bt_rand, causing
an infinite recursion.
bt_rand -> prng_reseed -> BT_HCI_OP_LE_RAND -> le_rand -> bt_rand
To solve this issue the controller should avoid doing calls into the
host, so all calls to bt_rand in the controller should be replaced with
a call to a controller function.
Fixes#22202
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
SW based privacy is an implementation detail in the zephyr link layers.
Therefore it should not be visible when selecting an out-of-tree
controller.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Since a peer MIC failure closes the event, it does not allow a terminate
acknowledge. For that reason a peer MIC fail for central role must force
a conn_cleanup.
Signed-off-by: Morten Priess <mtpr@oticon.com>
This fixes the EBQ tests 129 and 130. These tests check behaviour for
the DLE procedure when Encoded PHY or 2M PHY are not supported.
See also BT core spec. Version 5.1, Vol6, Part B, Section 5.1.9
Signed-off-by: Andries Kruithof <Andries.Kruithof@nordicsemi.no>
When clearing the whitelist, possible white listings in resolve list
were left. These are now also cleared.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Clean up the nRF cmake include file to remove redundant
check for BT_LLL_VENDOR_NORDIC inside the file.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
SMI TX is different than other controller features in that it does not
necessarily imply any software changes; whether SMI TX is supported
may be simply a matter of hardware calibration. This change supports
using the same software on chips that do or do not support SMI TX
depending on calibration.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
As a part of a ticker extension interface, it is now possible to specify
a slot_window when starting a ticker. When setting the
ticks_slot_window to a non-zero value, it is requested that the node
timeout is re-located to a position within the window, where the node
does not collide with other nodes - aligning to the end of the window.
The solution takes into consideration if a node has already been
updated with drift correction (e.g. ADV randomization), subtracting this
from the window.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Updated the lll_conn_flush interface to pass the connection
handle while the LLL connection context stored handle has
been invalidated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Zephyr aims to enable supporting of multiple SW defined
BLE LL. There is a complex hierarchy of defines in the
CMake files controlling the compilation units that part of
the final library. Adding another SW LL implementation
from a different SoC provider will make the main controller
CMake file unmaintable.
As such, split the into vendor-specific CMake files for
easier additions.
Signed-off-by: Alex Porosanu <alexandru.porosanu@nxp.com>