MBEDTLS_AES_ROM_TABLES let Mbed TLS use precomputed AES tables instead
of generating them at runtime and placing in RAM. It clearly helps
reducing the RAM footprint, but at the same time it increases the ROM
one. In order to let the final user decide which kind of optimization
they prefer, we change the "select" statement with "imply".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
According to MshDFUv1.0, section 6.2.3.5, the Firmware Distribution
Receivers List message is not limited by the size of the receivers list:
```
The number of selected entries shall be limited by the following:
- The number of entries shall not exceed the value of the Entries Limit
field from the Firmware Distribution Receivers Get message.
- The number of entries shall not cause the message payload to exceed
the maximum Access PDU size.
```
Thus, this assertion is incorrect as it doesn't allow to have the
receivers list bigger than number of maximal Access PDU size.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Instead of having 2 separate and non-equal checks for
capabilities in ASCS and the Broadcast Sink, there is now
a single function in pacs.c that performs the
check.
This reduces code size and makes it easier to maintain.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Move the contents of Kconfig.iso to the common Kconfig
file.
The main reason for this is that the Kconfig.iso filename
has caused issues for some, due to the .iso filename extension.
The contents have been moved to right after the Kconfig options
for BT_CONN which are quite similar.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fixup payload_index to be uint16_t to avoid index overflow.
Do not remember why ptc is 4 bits, where as it must be 5 bit
value similar to nse; added an assertion check until it is
fixed.
Fix ISO Broadcaster and ISO Sync Receiver for PTO > 1 and
use of Pre-Transmission Group Counts.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add back the implementation in the Controller that tries to
enable pre-transmissions to improve time diversity to aid a
remote ISO Sync Receiver role device.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
For pre-transmission groups > 1, the broadcaster link layer would fetch
incorrect payloads from the TX node queue.
Update payload index calculation to reference correct TX payload. Fix
PTO FIXMEs and range checks.
Signed-off-by: Morten Priess <mtpr@oticon.com>
* Move all KConfig configuration from CMake to `nrfx_kconfig.h`
* Move macro utils from `nrfx_kconfig.h` to `nrfx_zephyr_utils.h`
* Move GRTC channels allocation from `nrfx_kconfig.h` to
`nrfx_reserved_resources.h`
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
Commit:
- adds dependency of the mbedtls psa usage on secure storage
- removes PSA ITS emulator and enables usage of
the secure storage in ble mesh bsim tests
- enables secure storage in all ble mesh and related samples
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit removes the `ctx_shell` declaration from the Bluetooth shell,
marking a milestone in eliminating this dependency.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This change aims to eliminate the dependency on `ctx_shell` in
the Bluetooth `classic/shell/*`, making the code more maintainable.
Replaced `shell_*` functions that depended on `ctx_shell` with
the appropriate `bt_shell_*` functions.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This change aims to eliminate the dependency on `ctx_shell` in
the Bluetooth `mesh/shell/*`, making the code more maintainable.
Replaced `shell_*` functions that depended on `ctx_shell` with
the appropriate `bt_shell_*` functions.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This change aims to eliminate the dependency on `ctx_shell` in
the Bluetooth `audio/shell/*`, making the code more maintainable.
Replaced `shell_*` functions that depended on `ctx_shell` with
the appropriate `bt_shell_*` functions.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Relocated `bt_shell_private.c` to the `common` folder to enable
independent use between `BT_SHELL` and `BT_MESH_SHELL`.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
By using `SETTINGS_STATIC_HANDLER_DEFINE_WITH_CPRIO` we can ensure that
BT subsystems always get loaded after BT, and BT Mesh after both of
them.
This solves the host having to register a GATT service in a delayed
manner, as we are sure to now register the GATT service after sc_commit
sets `SC_LOAD`.
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
uuid needs to be keept in pb_gatt_cli server context until the client
is connected to server, otherwise, since we only kept the pointer from
the net_buffer, any incoming unprovisioned beacon before the connection
is established may overwrite uuid.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
* The `bt_dev.le.conn_ready` list is accessed by the tx_processor
which runs in a workqueue, but `bt_conn_data_ready` can be called
from different threads so we need to make sure that nothing will
trigger a context switch while we are manipulating the list since
sys_slist_*() functions are not thread safe.
* This only happens if call to `bt_conn_data_ready` is performed
from a preemptive task which can happen depending on the
application.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
Check whether the length of buf is consistent with the valid data
received for op code BT_BAP_BASS_OP_ADD_SRC and BT_BAP_BASS_OP_MOD_SRC.
If the length of buf is inconsistent with the valid data received, the
response is error code BT_ATT_ERR_WRITE_REQ_REJECTED instead of other
errors.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Both the TMAP kconfig file and public header file defined
which roles were supported.
The Kconfig file options were recently added and were more
up to date (and correct), and allows for other Kconfig files
to use these values, thus allowing for more flexibility when
implementing applications.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The CCP API for the Call Control Profile works on top of the
TBS API, and will eventually replace parts of the TBS API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If logging (CONFIG_LOGGING) was disabled, then the shell
could not build. Ideally the (test) functions should not
depend on logging, but rather only CONFIG_BT_TESTING.
The shell commands were also properly guarded.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor the NRF_ECB isr_ecb function to reduce redundant
common code.
Updated the unit tests to use Bluetooth Specification
defined test vectors.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The functions did not verify the provided parameters before
sending it as a control point operation.
This also fixes a bug where BT_BAP_BIS_SYNC_NO_PREF was not
allowed when pa_sync=0.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.
Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check that the GATT settings added when bonding to a peer and
subscribing to a CCC are correctly deleted when calling `bt_unpair`.
Testing hooks have been added in the Bluetooth settings abstraction
layer to know which key are being added/deleted.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
`bt_gatt_clear_cf` was calling `bt_settings_delete_ccc` instead of
`bt_settings_delete_cf`. This was causing some settings to be left over.
Fix the issue by using the correct function.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
For the shell RFCOMM case, these is a stack overflow problem when do
disconnect, so need to increase the CONFIG_BT_RFCOMM_DLC_STACK_SIZE.
Set CONFIG_BT_RFCOMM_DLC_STACK_SIZE default 512.
Signed-off-by: Make Shi <make.shi@nxp.com>
gatt_unregister() clears handles if those were auto-assigned by host.
This resulted in Service Changed indication not beding sent since
call to sc_indicate() pass already cleared handles.
This was affecting GATT/SR/GAS/BV-01-C and GATT/SR/GAS/BV-07-C test
cases.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The BASE doesn't affect the BIS sync value, and should thus not
change it.
This fixes a bug where the broadcast sink may prematurely
set the BIS sync value to e.g. 1 before actually
syncing to the BIG.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
add test for reconfigure, release, suspend, abort and disconnect.
app_config_req and app_reconfig_req always accept the req,
so don't need to handle reject case.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Implement the bt_a2dp_stream_reconfig: Modify reconfig_req callback to
pass codec_cfg to application. Remove reconfig_rsp callback,
config_rsp is used. Remove reconfigured callback,
configured callback is used.
move the status to common struct bt_avdtp_req,
use same bt_avdtp_ctrl_params to process control-like avdtp
cmds (start, open etc), use the same a2dp_ctrl_ind to process
control-like cmds (start, open etc), use the same
bt_a2dp_ctrl_cb to process control-like cmds (start, open etc),
use the same bt_avdtp_ctrl to process control-like cmds
(start, open etc), optimize getting a2dp conn by index,
use sem to replace mutex and optimze the lock codes to be
based on context/instance.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Calling `net_buf_reserve` removed any previous reservation, which
includes the reservation by hci_ipc to hold the H4 type byte. This
resulted in a out-of-bounds net_buf_push in hci_ipc.
This commit also enables asserts in hci_ipc in the audio bsim test,
which reveal the out-of-bounds write.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Cmd_register uses a fixed channel as the rfcomm channel. Cmd_register
doesn't require parameters for channels.
Signed-off-by: Make Shi <make.shi@nxp.com>
Add support for the bt_hci_evt_le_cis_established_v2 event in
the host.
This provided additional information to the host and application
about the CIS paramters. Especially the peripheral gets new an
important information such as the SDU size and interval.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The Health Client model supports periodic publication and thus requires
the update callback to be initialized.
This commit implements a callback inside the health client model and
adds a wrapper to it so that the user can fill up the msg buffer.
This way, the Config Server will always accept
Config Model Publication Set message with periodic publication
parameters. If the users callback returns an error or is not
implemented, the periodic publication will be aborted.
Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
Once proxy gatt is enabled, due to the nature of gatt advertisements
being continuous, the controller will reject starting the scanner after
enabling proxy gatt. As such we should start the scanner first.
Currently the order works as we are using k_work to postpone the proxy
gatt service registration, because services can't be registered between
initializing BT and loading the settings.
Once we start using the new settings priority feature, we are sure to
envoke enabling proxy gatt after loading the settings, so the delayed
enabling can and should be removed.
This preventetive fix has been tested by running relevant bsim tests
after rearranging in which order the settings of the subsystems are
loaded via `h_commit`.
Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
Core spec V5.4 Vol. 3 Part G 2.5.2.1 Robust Caching specifies
the conditions where Database Out Of Sync (0x12) error needs to
be returned as follows:
If a client that has indicated support for robust caching (by
setting the Robust Caching bit in the Client Supported Features
characteristic) is change-unaware then the server shall send an
ATT_ERROR_RSP PDU with the Error Code parameter set to Database
Out Of Sync (0x12) when either of the following happen:
• That client requests an operation at any Attribute Handle or
list of Attribute Handles by sending an ATT request.
• That client sends an ATT_READ_BY_TYPE_REQ PDU with Attribute
Type other than «Include» or «Characteristic» and an Attribute
Handle range other than 0x0001 to 0xFFFF.
Add the conditions to ATT_READ_BY_TYPE_REQ handler.
Signed-off-by: Chang Kim <changshik@meta.com>
The user data size of the RFCOMM tx pool is zero. There is not enough
space to put the tx_meta data. Use CONFIG_BT_CONN_TX_USER_DATA_SIZE to
set the data size for the RFCOMM tx pool.
Signed-off-by: Make Shi <make.shi@nxp.com>
In case the peer device has NO SDP record, the result is valid,
but the result->resp_buf is NULL, it would introduce a hardfault.
Therefore, also add a NULL pointer check for result->resp_buf.
Signed-off-by: Make Shi <make.shi@nxp.com>