`bt_le_ext_adv_start` does not modify the `param` argument, which can
therefore be marked as `const`. This allows the struct to exist purely
in ROM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
If the CIG only contains C to P CISes, then we should allow
setting the P to C interval and latency to 0, and vice versa.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In practice this allocation is very unlikely to fail, however being
consistent with checking for a failure keeps Coverity happy.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/(common, crypto, service, shell).
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/mesh directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/host directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/controller directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/audio directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit fixes compilation warnings that are present when compiling
with CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY as can be seen in this
compiler log:
"""
In file included from /zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/
include/string.h:215,
from /zephyr/subsys/bluetooth/host/smp.c:15:
In function '__memcpy_ichk',
inlined from 'sc_send_public_key' at /zephyr/subsys/bluetooth/host/
smp.c:3006:2:
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
warning: argument 2 null where non-null expected [-Wnonnull]
83 | __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
note: in a call to built-in function '__builtin_memcpy'
/zephyr/subsys/bluetooth/host/smp.c: In function 'smp_public_key':
/zephyr/subsys/bluetooth/host/smp.c:4214:21: warning: argument 2
null where non-null expected [-Wnonnull]
4214 | memcmp(smp->pkey, sc_public_key, BT_PUB_KEY_COORD_LEN) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/string.h:62:10: note:
in a call to function 'memcmp' declared 'nonnull'
62 | int memcmp (const void *, const void *, size_t);
| ^~~~~~
"""
The warning is caused by the potential use of NULL "sc_public_key"
global pointer that is not assigned a value in "smp_init()" if
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled. This commit
conditionally changes the behavior of function "smp_public_key()"
if CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is activated to simply return
and not use the "sc_public_key" variable. Other functions that are not
called anymore by "smp_public_key()" are also conditionally
deactivated when CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled
Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
Modified to check the length of the remaining data in buffer
before processing the next report. The length check is missing
in the cont routine.
Signed-off-by: Eunkyu Lee <mochaccino.00.00@gmail.com>
Check whether the received frame is complete by
comparing the length of the received data with
the frame data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Fix Bluetooth initialization problem caused by PR#72090
for at least ST boards that are using BlueNRG BLE modules.
For more information, please refer to issue #74528.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
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>