nRF54Lx have updated Data Whitening register settings, add
implementation to correctly set them up.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor sw_switch hal interface use and document why some
PPI/DPPI channel group related subscriptions are not
disabled explicitly.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix software tIFS switching using single timer from
triggering spurious TXEN/RXEN if the first remainder is
shorter than the tIFS delay calculated in the sw_switch()
function.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When building proxy client without proxy server, it fails to find
the `identity` field in the `struct bt_mesh_subnet_keys` because the
latter only compiles when Proxy server is enabled. It should be
possible to compile Proxy Client without Proxy server.
This commit compiles the field if any of GATT features is enabled.
Fixes#75914
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The BIG info new Framing Mode field was not initialiazed, so
random garbage was being sent to the air in this field.
For the controller this field is still RFU.
The spec specifies RFU fields must be initialiazed to
0. So let's do so to avoid sending invalid data,
and avoid having random data in the air which can cause
random differences in testcases.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
- HRS control point was added to server but no write callback is
defined, this causes issues if control point characterstic is
written by the client
Signed-off-by: Anuj Pathak <anuj@croxel.com>
find the headset which a2dp related record len is SEQ32,
fix sdp_client_get_total too because it doesn't handle
SEQ32 too.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Since testing.c/h was moved to mesh, all functions and
structs in those files now follow a bt_mesh_test_*
naming scheme to be consistent with the naming in Zephyr.
Due to missing includes in many files, this commit also
added some that were missing in order to build since
the order of includes have changed.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The file is only ever used by mesh and it is even stated in the
header of the file that it is internal APIs.
The include file has been merged with the host testing.h file
as that was mesh specific as well. Similarly the testing.c
file was also moved
This is part of a process to clean up the file structure of
Bluetooth as it's a bit messy, which is evident from the
MAINTAINERS.yml file.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When change unaware client send ATT request it shall get Database
Out of Sync error. Reading GATT database hash is an exception here.
This was affecting GATT/SR/GAS/BV-05-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix missing implementation to handle Broadcast ISO MIC
failure during Broadcast ISO establishment, and during an
already established Broadcast ISO sync.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
We want to make sure `struct closure` fits in the user data, so a user data
size of `sizeof(struct closure)` is valid.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
- Slightly improve the name of this kconfig adding the suffix
_POLL in order to highlight that this adds a callback
function used to poll data.
- Description was also updated to point out that this symbols
might not only use the (secure) entropy driver, but also
generic number generators, some of which are not really
secure.
- The symbol was move from Kconfig to Kconfig.tls-generic because
this is where MBEDTLS_ENTROPY_C is located and since
MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
makes sense if the entropy module is also enabled), we add
also the "depends on".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Initialize the missing chunk field when canceling a BLOB Transfer.
If you canceled a BLOB Transfer, the missing_chunk was not cleared in
the next BLOB Transfer. This can make it look like there are still
missing chunks, even though all chunks in the block have already been
received, and it does cause bugs.
Signed-off-by: Junho Lee <tot0roprog@gmail.com>
`OTS_CLIENT=y` and `OTS=n` is a valid config.
Since the logs weren't conditionally included, this flew under the radar
for a while.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
- got rid of "Others" menu
- JK I made a new one: "Common"
- moved all host-related opts to "Host" instead of "Others"
- moved all audio-related opts behind `if BT_AUDIO`
- moved only controller kconfig to controller/Kconfig.ll_sw_split
- it had a dependency there already
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Having all the configs be visible by default clutters the menuconfig
view. Make them visible only when the corresponding subsys or module is
enabled.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
CONFIG_BT_CONN_TX_USER_DATA_SIZE is now used for callbacks in the host.
We don't want to limit ourselves to that, so change the wording to be
more generic.
In the future, the plan is to not use user_data at all, removing the
need for the kconfig altogether.
Also rename the structure that was referenced in the docstring.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Added the battery level status char to bas service
as per bas_1.1 spec. Added BSIM test for BAS service
to test the NTF/INDs of BAS characteristics.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
To make the scanner module more understandable and more streamlined, I
reworked the update mechanism of the scanner. The scanner tracks now the
parameters that were used to enable it and the reason why it is running.
This facilitates state logic and allows other modules to "start the
scanner", altough it is already running.
This is mostly a refactoring and not a functional change.
Added a test to verify the behavior.
Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no>
add to task
The MBT server, as the MBT client currently sets the maximum chunk size
according to maximum supported segments in the accesss layer. This might
be suboptimal for some use cases.
The added Kconfig options give customers the option to fine tune it
themselves.
Future work will include addition of an API for the customer to modify
it also during runtime.
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
Add conn parameter to status/flags callbacks of bt_vcp_vol_rend_cb
to differentiate between remote and local changes.
Signed-off-by: Chang An <chang.an_1@nxp.com>
This assert cannot be turned on, as `pdu` will be NULL sometimes. This
is okay, it just means that the current channel doesn't have anything to
send and that we should probably try another one.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When user_data is not zeroed-out, the API returns an error. Downgrade
the API error to a warning log instead.
Introducing this check (#76489) broke a few PTS tests, as user_data is
not initialized by `net_buf_alloc()`. Doing so is in discussion:
https://github.com/zephyrproject-rtos/zephyr/issues/77088
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Path loss monitoring does not work without LE Power Control
also enabled in the controller, so update the dependencies
in the kconfigs so path loss monitoring selects power
control.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
callback_list was renamed to conn_cbs in commit 3eb975d.
However plm callback was missed due to it not being built
anywhere.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
Trigger the TX processor on connection teardown.
When a disconnection happens before the controller has acknowledged some
ACL fragments the host has sent, we run `process_unack_tx()` to free
those unacknowledged buffers and their associated TX contexts.
The problem is that the TX processor still holds a reference to the conn
object. That reference is not released until the TX processor is
triggered again and figures out that the connection is invalid.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Fix missing invalid aux offset check that was being caught
in a development assertion check. If aux offset where less
than the PDU time of the primary channel PDU, radio was
redundantly being setup delayed for reception that was
being caught in an assertion check.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This test create a setup where an ISO broadcaster will send fragmented
data and get stopped after sending the first fragment and repeating that
operation multiple time to verify that buffers are not leaked.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
When sending data using ISO and the data is fragmented, if the
connection is cut before all the fragments are sent, the data buffer
will be leaked.
Fix the issue by unref'ing the buffer when ISO is not in a connected
state.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
When disconnected while sending data, if ISO doesn't get the number of
completed packets it will not call `process_unack_tx` and thus will leak
TX context.
Fix that by setting the connection state in ISO disconnection which will
trigger a call to `process_unack_tx`.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Convert users of net_buf_put() and net_buf_get() functions to use
non-wrapped putters and getters k_fifo_put() and k_fifo_get().
Special handling of net_bufs in k_fifos is no longer needed after commit
3d306c181f, since these actions are now
atomic regardless of any net_buf fragments.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Introduce Controller dependent EVENT_MAFS_MIN_US value to
use as the value when populating the aux offset between
Extended Advertising primary and auxiliary channel PDUs.
This can be used as workaround for peers having difficulty
receiving Extended Advertising PDUs with near 300 us MAFS
values used in aux offset calculations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Relax the radio packet pointer assignment deadline assertion
until access address being transmitted. The PDU buffer is
probably only needed just after access address is being
transmitted or received by the radio. This will give some
more breathing room for slow CPUs like in nRF51x SoCs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix regression using speed optimization introduced in
commit 1b7fe792e0 ("Bluetooth: Controller: Support Link
Time Optimizations (LTO)").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>