Commit renames deprecated key refresh field.
It still has to exist to allow backward compatibility
with previous versions when data are restored from
the persistent memory.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
`cmd(buf)` depends on this since it uses `net_buf_id`, which would alias
multiple pools.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Commit add extension of configuration server by large
composition data server.
Mesh Protocol v1.1 specification
4.4.21.1
The Large Composition Data Server is a main model
that extends the Configuration Server model.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit add extension of configuration server by private
beacon server.
Mesh Protocol v1.1 specification
4.4.11.1
The Mesh Private Beacon Server model is a main model
that extends the Configuration Server model.
Configuration server and private beacon server shall always
exist together since they have bound states.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Use K_WORK defined. This delayed work is never used with any
other timeout than K_NO_WAIT, so the "delayed" part of it
is never actually needed
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Use PDU_BIS_LLID_FRAMED in empty PDUs for framed BIS
Allocate room for header when calculating max_pdu for framed BIS
Set group_sync_delay, stream_sync_delay and framed properly for BIS
broadcaster
Add missing call to isoal_tx_event_prepare() for BIS
Signed-off-by: Troels Nilsson <trnn@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Assign sync_delay parameters for ISO-AL sink creation
- Store framing information from BIGinfo for use in sink creation
- Set max_octets for sink creation
Signed-off-by: Morten Priess <mtpr@oticon.com>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.
BT_SMP_ERR_SUCCESS was added for completeness.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Commit aligns usage mesh and host PSA.
Since PSA crypto is supported in host then
there is no reason to switch off some of host
features to get rid of tinycrypt functions in
the final image.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Similar to ISO connections, ACL connections are not serviced as fast as
possible. Change this, and try to send as much as we have resources for.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
ISO connections that were in the TX queue were not getting serviced in
time. This happens because `iso_data_pull()` returns `NULL` when that
particular connection (`conn`) is done sending.
But it doesn't trigger the TX processor again to process other channels in
the queue. This patch fixes that by calling `bt_tx_irq_raise()`.
We can't do this from `conn.c` as we don't know if the `NULL` returned is
because the current channel is out of data or because it has data but it
can't send it (e.g. the current buf is being "viewed" already).
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74321
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This makes it more clear what is happening when the host cancels
connection creation where the controller raises
the connection complete event with status set to
"UNKNOWN CONNECTION IDENTIFIER (0x02)".
This is especially useful for developers not familiar with this
detail in the spec.
See also: Core_v5.4, Vol 4, Part E, Section 7.8.13,
LE Create Connection Cancel command.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Before merging the BIS specific codec configuration with the
subgroup codec configuration, we should ensure that the
BIS data is not empty, as that would trigger an error from
bt_audio_data_parse.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix BT_CTLR_ISOAL_PSN_IGNORE implementation when adjusting
Sequence Number during overlap with current CIG event.
Reuse the implementation from non-PSN ignore implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Troels Nilsson <trnn@demant.com>
Add add_by_broadcast_name command that scan for broadcast sources
has BT_DATA_BROADCAST_NAME that matches with whatever name is given
to the shell command.
Fixes#70836
Signed-off-by: Babak Arisian <bbaa@demant.com>
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends
tests/bluetooth/mesh/basic/bluetooth.mesh.gatt adding a specific
case using PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
By enabling CONFIG_BT_USE_PSA_API the user can specify to use
PSA APIs instead of TinyCrypt for crypto operations in bluetooth
host module.
This commit also extends tests/bluetooth/gatt in order to
add a PSA test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends tests/bluetooth/bt_crypto adding
a test case for PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Nordic devices are commonly used with the nRF Connect SDK.
There the SoftDevice Controller is set as the default
Bluetooth Controller. To avoid confusion when reading DTS
and Kconfig files, clarify this by adding a note.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Fix regression due to use of HAL_RADIO_TMR_START_DELAY_US
introduced in commit 11bae5cfa9 ("Bluetooth: Controller:
Fix missing radio timer comp and range delay").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The current implementation of the BAP Broadcast Assistant only supports a
single connection. This PR makes broadcast assistant support multiple BAP
scan delegators.
Fixes: #67523
Signed-off-by: Ping Wang <pinw@demant.com>
The HCI command LE Read Supported States command returns
if the controller supports running the scanner and initiator
roles in parallel.
This commit utilizes this information in the host:
- It does not prevent initiating a connection when the scanner is
running
- It does not prevent the host from restarting the background
scanner when there the host wants to auto-initiate a connection.
- It does not stop the scanner when the host wants to auto-initiate
a connection.
To support this feature, the scanner and initiator
always have to use the same address.
This because the HCI command LE Set Random Address
cannot be issued after the initiator or scanner has started.
1. When privacy is disabled, the scanner has to use its identity
address to ensure it uses the same address as the initiator.
2. Only one identity is supported.
To simplify the implementation, it is a requirement to use
extended advertising commands to avoid interfering with
the random address used by the advertiser(s).
Also, it is a requirement to never use time-limited scanning,
as RPA this feature does not work when privacy is being used.
See https://github.com/zephyrproject-rtos/zephyr/issues/73634.
The changes in this commit will be tested out of tree as the
Zephyr Bluetooth Controller does not support this functionality.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When creating a BAP broadcast source with bt_bap_broadcast_source_create
only the subgroup information is stored in the streams and the remaining
BIS specific information is not stored in the stream->codec_cfg,
which it should.
Fix is to store bis specific information also in stream codec config.
Updated broadcast source BSIM test to verify above usecase.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Returning a status code will allow the application developer
to detect logic issues.
We consider this as not breaking the API.
If `-Werror -Wunused-result` is enabled, the application developer needs
to validate the return code.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Callbacks can only be registered once. Otherwise the slist
will become circular.
In this commit we have choosen to ignore the second registration
call if the callback has already been registed. The alternative
is to trigger an assertion. That doesn't work if the assertions
are turned off.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This allows us to use functionality provided by slist.
First use case: Avoid adding an element twice.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_meta_get_pref_context
as absence of pref context in BAP implicitly means a unspecified
for LC3.
In the case that it is absent BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
is the returned value.
While the metadata for codec cfg and codec cap are similar,
this only applies for codec cfg as per BAP.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_max_codec_frames_per_sdu
as absence of max codec frames per SDU in BAP implicitly
means a single frame for LC3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_supported_audio_chan_counts
as absence of channel count in BAP implicitly means a single channel
for Lc3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_get_chan_allocation as absence of
channel allocation in BAP implicitly means Mono.
In the case that it is absent,
BT_AUDIO_LOCATION_MONO_AUDIO is the returned value.
This commit also fixes the implementation of
bt_audio_codec_cfg_get_frame_blocks_per_sdu as it only applies to
LC3 (as per the BAP spec). It also adds additional testing of it
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The same way as `bt_hci_get_adv_handle` and `bt_hci_get_conn_handle` add
a function to get the handle of a periodic advertising sync.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
In the parse_recv_state we did not verify that we can handle all
the subgroups before we started parsing them.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When testing https://github.com/zephyrproject-rtos/zephyr/pull/72090/,
there is an issue found.
The change in the previous commit is to put all data sending
operations into the work queue context, and lock the current
AG before sending data.
And in change of #72090, the HCI TX thread is removed. All
sending sequence are happened in work queue context.
There is a possible problem when AG creates a SCO connection
by calling the function bt_conn_create_sco. Before the
function bt_conn_create_sco is called, AG will be locked to
avoid creating repeated SCO connection.
And the execution of the function bt_conn_create_sco
depends on the work queue. Because the HCI command of
function bt_conn_create_sco is sent in work queue context.
In the normal case, there is not any issue.
But there is a case that when the function
bt_conn_create_sco is being executed, there is a pending AG
TX waiting to be executed.
Once the work queue starts executing the handler, the AG TX
handler is executed first. Since the lock has been acquired
by other threads, the AG TX handler cannot acquire the lock.
As a result, the SCO connection creation fails.
Remove the AG lock from SCO creating. Instead, use a flag
to mark whether a SCO connection is be created.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the sent callback of RFCOMM is changed, the
sending buf need to be primed waiting for the
previous one to be completed. Add a worker for
this purpose.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the parameter `buf` has been removed by rfcomm,
update the prototype of channel sent callback hfp_hf_sent.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Due to the sending buf cannot be referred
by sending layer.
It is unsafe to use `buf` identification
for a transmission, because the buf may
have been newly transmitted when the
sent callback is triggered.
Now instead, when the send completion
callback is received, the upper layer
is notified that a transfer is completed.
If multiple bufs are sent at the same
time, there is no guarantee which buf
is completed when the sent callback
triggered. Therefore, it is recommended
that the caller transfers the next data
block after the previous transfer is
completed.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
There is a change (commit no.: 93d0eac834) that if
the `ref` of sending buf is not 1, the error code
`-EINVAL` will be returned from bt_conn_send_cb.
It causes the RFCOMM functionality cannot work
properly.
Remove the ref operation from the buf to be sent
to fix the issue.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
When validating the parameters for broadcast reception start some
return statements were missing, they have been added, as well as
proper initialisation of a variable
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
If we are merging subgroup and BIS codec configuration data
for a codec other than LC3, then we just append them, but
did not properly update the length.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The 3-byte value suits the assigned number much better,
and also allows for less memory copies when getting and
setting the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove the "stream" part of the value and functions to
better fit with the name in the assigned numbers document.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
View buffers are now also a limited resource. Acquire them before
attempting to pull data. `CONFIG_BT_CONN_FRAG_COUNT` should be tuned on
a per-application basis to avoid this.
A possible optimization, that was present before, is to not create a
frag when the original buffer fits the controller's HCI size.
I prefer deferring this optimization to a future patchset.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
We can get rid of the view pool for SDU segments :)
We have to make the code slightly more complex :'(
The basic idea is always giving the original SDU buffer to `conn.c` for it
to pull ACL fragments from.
In order to do this, we need to add the PDU headers just-in-time.
`bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue
anymore. They are added by `l2cap_data_pull()` right before the data leaves
`l2cap.c` for `conn.c`.
We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so
it doesn't fragment across segment boundaries. This oob is the new `length`
parameter to the `.pull()` method.
This is the added complexity mentioned above.
Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't
need this extra logic.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
We don't need the TX thread anymore.
Generalizing the pull-based architecture (ie. `tx_processor`) to HCI
commands makes it possible to run the whole TX path from the the system
workqueue, or any workqueue really.
There is an edge-case, where we call `bt_hci_cmd_send_sync()` from the
syswq, stalling the system. The proposed mitigation is to attempt to drain
the command queue from within `bt_hci_cmd_send_sync()`.
My spidey sense tingles however, and it would be better to just remove the
capability of calling this fn from the syswq. But doing this requires
refactoring a bunch of synchronous procedures in the stack (e.g. stack
init, connection establishment, address setting etc), dragging in more
work. I will do it, but in a later patch.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This API replaces `bt_l2cap_send()` and `bt_l2cap_send_cb()`.
The difference is that it takes the `struct bt_l2cap_le_chan` object
directly instead of a connection + CID.
We need the channel object in order to put the PDU on the TX queue. It
is inefficient to do a search for every PDU when the caller knows the
channel object's address and can just pass it down.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The current TX pattern in the host is to try to push a buffer through all
the layers up until it is ingested by the controller.
Since sending can fail at any layer, we need error-handling and separate
retry logic on pretty much all layers. That logic obscures the "happy path"
for people trying ot understand the code.
This commit inverts the control, in a way that doesn't require changing the
host or HCI driver API (yet):
Layers don't send buffers synchronously, they instead put their buffer in a
private queue of their own and raise a TX flag on the lower layer. Think of
it as a `READY` interrupt line that has to be serviced by the lower layer.
Sending is now non-blocking, rate depends on the size of buffer pools.
There is a single TX processing function. This can be thought as the
Interrupt Service Routine that will handle the `READY` interrupt from the
layers above.
That `tx_processor()` will then attempt to allocate enough resources in
order to send the buffer through to the controller. This allocation logic
does not block.
After acquiring all the resources, the TX processor will attempt to pull
data from the upper layer. The upper layer has to figure out which buffer
to pass to the controller. This is a good spot to put scheduling or QoS
logic in the upper layer.
Notes:
- user-facing API for tuning QoS will be implemented in a future patch
- this scheme could (and probably will) be extended to upper layers (e.g.
ATT, L2CAP CoC segmentation).
- this patch removes the `pending_no_cb()` memory optimization for
clarity/correctness. It might get re-implemented after a stabilization
period. Hopefully with more documentation.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Instead of allocating segments/fragments and copying data into them, we
allocate segments as "views" (or slices) into the original buffer.
The view also gives access to the headroom of the original buffer, allowing
lower layers to push their headers.
We choose not to allow multiple views into the same buffer as the headroom
of a view would overlap with the data of the previous view.
We mark a buffer as locked (or "in-view") by temporarily setting its
headroom to zero. This effectively stops create_view because the requested
headroom is not available.
Each layer that does some kind of fragmentation and wants to use views for
that needs to maintain a buffer pool (bufsize 0, count = max views) and a
metadata array (size = max views) for the view mechanism to work.
Maximum number of views: number of parallel buffers from the upper layer,
e.g. number of L2CAP channels for L2CAP segmentation or number of ACL
connections for HCI fragmentation.
Reason for the change:
1. prevent deadlocks or (ATT/SMP) requests timing out
2. save time (zero-copy)
3. save memory (gets rid of frag pools)
L2CAP CoC: would either allocate from the `alloc_seg` application callback,
or worse _steal_ from the same pool, or allocate from the global ACL pool.
Conn/HCI: would either allocate from `frag_pool` or the global ACL pool.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
`bt_conn_send_cb` used to allocate a TX context (K_FOREVER).
Instead, we now put the context in the userdata of the buffer.
This means that now this fn will never block and always succeed since the
tx_queue is a FIFO (infinite size). It just puts the buf on the queue.
The metadata is stored safely in there until we have acquired all the
necessary resources to send it to the controller without failing: TX
context and controller buffer.
I.e. when `bt_conn_process_tx` is called, that's when a TX context is
try-allocated and the contents of `buf->userdata` is moved into it.
The buffer is now ready to be sent to the lower layer.
`bt_conn_process_tx` will return -EWOULDBLOCK if it's not able to acquire a
TX context, this PR modifies `bt_conn_prepare_events` to respond to this by
also waiting on the TX context pool.
Unfortunately, this increases the required userdata size for any buffers
handed to `bt_conn_send_cb`. This will be fixed in a later commit.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
If the new encryption state is the same as the old one, there's no point in
doing additional processing or callbacks. Simply log a warning and ignore
the HCI event in such a case.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Add support for HCI drivers which use the newly defined HCI driver API.
Since Zephyr (currently) only supports a single HCI driver instance,
boards are expected to indicate the instance using a new devicetree
chosen property `zephyr,bt_hci`.
In order to maintain compatibility with not-yet-converted drivers the
code has been placed behind `#if DT_HAS_CHOSEN(zephyr_bt_hci)`
conditionals.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
https://github.com/zephyrproject-rtos/zephyr/pull/72674 fixed
a bug where this configuration did not work.
Now that this configuration is tested, we should mark it
as supported.
The timeout check that was present in the code before
was useless and was not working because the check was
run before a default timeout of 0 was converted to a timeout.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
ull_adv_sync_pdu_set_clear does pretty much everything, causing
it to be very complex and awkward to use. In addition, it only handles
a single PDU, meaning callers have to handle the chain.
It has been replaced with simpler, more complete functions for handling
the relevant operations
Fixed issues include:
- Fragmentation of adv data over HCI is now decoupled from PDU
fragmentation, fixing HCI/DDI/BI-13-C, LL/DDI/ADV/BV-26-C and
LL/DDI/ADV/BV-55-C
- Adding BigInfo now preserves the PDU chain
- Enabling periodic advertising with ADI on would sometimes fail
due to insufficient space in a single PDU to add ADI
Signed-off-by: Troels Nilsson <trnn@demant.com>
Use the compatible kconfig option so that for the simulated
nRF54L15 we build the same code as for the real platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the Nordic HW, the BT_CTLR_DATA_LEN_UPDATE_SUPPORT
does not require CCM HW enabled, hence support Data Length
Update if Encryption Support is disabled.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In some nRF54 devices, DATAWHITEIV was renamed to
DATAWHITE,
and the CRCCNF SKIADDR field was renamed OFFSET.
The nrf HAL hid this change internally,
so let's use it so we don't need to ifdef these
in the Bluetooth Controller HAL code.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add preliminary support for nRF54L15 SoC. This commit does
not support Controller Random Number Generation and
Controller Cryptography (AES-128 encryption) commands, nor
does it support encrypted connections.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use NRF_RTC and NRF_RADIO_SHORTS_TRX_END_DISABLE_Msk instead
to prepare towards using configurable use of RTC and Radio
hardware defines.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add unit tests to cover explicit LLCP error code check and
cover the same in the Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
A Host shall consider any error code that it does not
explicitly understand equivalent to the error code
Unspecified Error (0x1F).
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce BT_CTLR_CRYPTO_SUPPORT so that preliminary port to
support nRF54L15 SoC can be upstreamed without encryption
support.
ENTROPY_GENERATOR now selected when BT_CTLR_CRYPTO enabled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit adds host support for the Path Loss Monitoring
feature see Bluetooth Core specification, Version 5.4,
Vol 6, Part B, Section 4.6.32.
Limited logic is required, just adding a wrapper around the
HCI command and callback for HCI event.
Add new zone - BT_CONN_LE_PATH_LOSS_ZONE_UNAVAILABLE, to
convert 0xFF path loss to a useful zone.
Add new Kconfigs and functionality to the bt shell.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
The existing code in the cap_stream.c that handled the
check before calling CAP initiator unicast functions
seemingly did not work for x86 targets such as native_sim
or native_posix.
Modified the check so that IS_ENABLED is used directly.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The simulated targets support the same power levels as the
real targets. Let's correct the kconfig dependencies
accordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Make `struct arch_esf` compulsory for all architectures by
declaring it in the `arch_interface.h` header.
After this commit, the named struct `z_arch_esf_t` is only used
internally to generate offsets, and is slated to be removed
from the `arch_interface.h` header in the future.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Fixes issue where PB GATT Server will drop
advertising device name if optional provisioning
URI is not provided.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Adds, removes and modifies includes in all LE audio
files.
Fixes any found spelling mistakes as well.
Fixes a few places where incorrect types were used.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The flash_area_erase has been replaced with flash_area_flatten,
allowing code to work with devices that do not provide
erase callback.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
APIs for enabling and disabling the scanner may take larger time than
expected and scheduling of the lpn state machine is affected by it.
Since these type of latencies are factored into timeouts and scheduling
times, we need to call scan enable/disable APIs after scheduling the
next event time for LPN state machine to be more accurate.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Removes the CIS connection establishment from bt_bap_stream_start
and move the behavior to a new funciton bt_bap_stream_connect.
This has 2 advantages:
1) The behavior of bt_bap_stream_start is much more clear and more aligned
with the spec's behavior for the receiver start ready opcode.
2) It is possible to connect streams in both the enabling
and the QoS configured state with bt_bap_stream_connect as
per the spec. This allows us to pass additional PTS test cases.
To implement this new behavior, samples and tests have been updated.
The CAP Initiator implementation has also been updated
to accomodate for the change in BAP, but the CAP
initiator implementation should work the same for application, except
that it's now possible to do unicast start on ASEs in any order
(https://github.com/zephyrproject-rtos/zephyr/issues/72138).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When reading the error message:
"ASSERTION_FAIL: command opcode 0x0c03 timeout with err -11" it may not be
obvious what is wrong with their setup unless you are very familiar
with HCI.
This commit adds some more documentation to make this more obvious.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Removes the requirement that CAS is found on the remove
device for ad-hoc sets. This makes the CAP API more
versatile as it allows applications to use it with
remote non-CAP devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
PR #72475 disabled default enabling of most Mbed TLS features.
This means that:
- CONFIG_MBEDTLS_CIPHER_AES_ENABLED needs to be manually enabled
when required;
- CONFIG_PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC does not need to
be (almost) always added because there is no default RSA
key-exchange enabled, so PSA can be built without RSA support.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The function is useful for application to lookup set
members from bt_conn pointers, e.g. when iterating on
connected devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Currently calls to these two functions fail unnecessarily when
CONFIG_BT_SMP is disabled. This fix allows identity resets
without having the BT_SMP stack enabled. The primary use case
is enabling random mac address rotation for privacy in memory
constrained SOCs. Fixes#73313
Signed-off-by: Patrick Patel <ppatel@micro-design.com>
Fix missing validation of Connection Update Ind PDU. Ignore
invalid connection update parameters and force a silent
local connection termination.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>