Both advertiser and scanner demonstrate the use of extended advertising
and scanning, and how to gracefully restart the extended advertisements
through the use of recycle() callback. In the sample, the advertiser
initiates a connectable advertisement set, which prompts the scanner to
connect. After the connection is established, the advertiser waits for
5 seconds to disconnect. After the connection is dropped, the advertiser
immediately restarts broadcasting, while the scanner cools-down for
5 seconds to restart its process.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Added USB Audio output for the Broadcast Sink sample. In addition
offloading of the LC3 codec was also made. The sample supports only
mono, and a KConfig option was added to configure which audio
location to sync to.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
bt_pbp_parse_announcement was defined as uint8_t return value function,
but returned errno values, so it was modified to return an int instead.
The return values are also now more granular and documented.
The function also triggered a coverity issue with the way that it
parsed the data->data, as it would be marked as tainted. This should
be fixed by using the net_buf_simple API, which also improves on
some other parts of the code.
Finally the meta argument for the function was changed from an
unknown sized buffer, where the caller somehow had to know the
size of the metadata before calling the parsing function, to
an output pointer. This also omits the requirement for the
caller to always copy the metadata, where now it just
gets a pointer to the metadata in the bt_data struct. The application
can now always decide whether to continue to parse the metadata or
to copy it, using the pointer and the return value of the function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Change the samples and shell to use sinf instead of sin,
as that return the expect float data type, instead of
a double.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When using softdevice controller on iso_broadcast sample, the BIG
created uses more than 1 subevent. This means that when you try to
use the iso_receive sample to sync it does not work.
So update the sample to use mse=0 and allow any number of subevents,
making the sample more flexible and work with SDC without any changes.
Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
The place where TF-M places its non-secure api header files has changed
Therefore changing it for for all applications that use it.
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Add a basic connection test between two devices,
in which the controllers are in separate nrf52_bsim devices
connected over UART to the devices running the host+app.
The controllers are running the HCI UART async sample.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.
public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.
public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.
Add bsim tests for Public Broadcast Profile APIs.
Add shell implementation for Public Broadcast Profile APIs.
Signed-off-by: Daniela Andreea Dumitrache <danielaandreea.dumitrache@nxp.com>
This is just as arbitrary as what was before, but simpler.
Before this change, the callback were invoked upon receiving the num
complete packets event.
This did not necessarily work with all spec-compliant controllers.
Now the callback is invoked as soon as the lower layer destroys the
buffer. ATT shouldn't care whether L2CAP sends it over RFC1149 or
something else after that point.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Why?
- metadata is easier to manage as an array + index
- less error-prone -> less memory-management bugs
- we can. because of the previous refactor
- PDU allocations are more predictable
- ATT buffer size can be optimized by app
- isolates ATT from the rest of the ACL users
- decouples ATT PDU size from e.g. SMP w/ LESC
Drawbacks:
- higher memory usage
- kconfig change
The higher memory use is only temporary, as this will be followed-up
with more refactors that should bring it back down.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Renames "prov device" references and options to
"provisionee" to align implementation with Mesh
Protocol specification v1.1, section 5.4.
Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
Updaye buffer counts and semaphore initial value so that the
Broadcast Audio Source can utilize any use of broadcast
pre-transmissions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The issue with non secure storage system has been fixed
in nrf53_ns platform: https://github.com/zephyrproject-rtos/zephyr/issues/59376
No need workarounds anymore.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
The is_substring did not work for true substrings, as it
would always compare [0] to [0], so it would return false
for the substring "BC" being in "ABC".
Removed the tolower as it is not necessary and fixes the issue.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Commit adds implementation of the specification
recommendations regarding randomization of
responses on the access layer.
3.7.3.1 Transmitting an Access messages
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Add const prefix for service uuid and char uuid.
Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.
The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Enforcing the peer's behavior is not strictly necessary. All the host
should do is make sure it is resilient to a spec-violating peer.
Moreover, a growing number of platforms were disabling the check, as the
spec allows "batching" HCI num complete packets events, stalling ATT RX.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This removes the fixed size bt_bap_base, which provides
2 improvements:
1) The RAM usage of the broadcast sink has been reduced.
For the Broadcast Sink sample it is a reduction of 120
octets, but with much better scaling for supporting
more or larger BASEs.
2) The functions to parse BASEs now support arbitrary sized
BASEs, where they were previously restricted by our
local Kconfig options. This allow us to parse any BASE
from a remote device, without encounting memory issues.
We are still memory restricted on the devices we
actually want to sync to.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
SIG has changed Bluetooth mesh to Bluetooth Mesh
Updating zephyr docs accordingly
Leaving out old release notes
Signed-off-by: Mia Koen <mia.koen@nordicsemi.no>
Introduce NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.
This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Follow-up: #64704
Introducing NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.
This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
When using picolibc before 1.8.5, the only way to get 'long long' support
was to use the full version, including floating point support. This is too
large for this testcase.
Reduce the size of the printf code by switching to the version without
64-bit integer support. This allows the test to pass when using older
picolibc versions, such as that included with SDK version 0.16.3.
Signed-off-by: Keith Packard <keithp@keithp.com>
`CONFIG_BT_CTLR_ADV_DATA_CHAIN` is a Zephyr Controller exclusive.
Use the max length instead to decide if we should add more data.
The motivation for the change is that tests/bsim/bluetooth/host/adv/chain
does not pass with Nordic's Softdevice Controller because of this.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
the reason is that the Mesh Profile clearly stipulates that Mesh nodes
cannot change their own element definitions.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Since model struct most of member should not change at run time,
so mark as const will be suitable and safely.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This adds retry logic for ASE state notifications if failed due to
insufficient number of buffers to send ATT PDU. The state transition is
retried after connection interval delay.
Fixes: #64574
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Adds support for using a connected host to
broadcast audio via USB Audio.
Offload LC3 encoding to separate thread.
Signed-off-by: Lars Knudsen <LAKD@demant.com>
Let's replace the references to native_posix with native_sim,
Background: during this release native_sim is replacing
native_posix as the main host test/development platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The current main stack size is not enough for any platform.
This commit stack size was checked for nrf52840 and nrf5340.
Everything works.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
PR allows to get rid of tinycrypt objects from
the final binary of the ble mesh apps based on
PSA TFM crypto.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Add an initial test based on the broadcast audio source/sink samples
which runs them together and after waiting for a predefined
amount of time, checks how many audio packets has the
sink received, and if over a threshold, passes the test.
This test can be expanded after to cover more functionality from
these samples.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add support for the simulated nrf5340 and nrf52 in these samples,
as well as explicit overlays for the nrf5340dk.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix controller configuration overlay used when
building the controller (for nrf52 targets),
so the sample can connect to the source and get
audio through.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of handling some of the configuation thru
board overlays let's handle it thru the sample Kconfig
file, which reduces the amount of duplicate lines.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
So that for both the simulated nrf5340 and real HW nrf5340dk
we build both network and application core images.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
STM32L562 Discovery kit is not compatible with Bluetooth over USB
application.
Add missing information related to the BLE capability of this board.
Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
Change the integration target to something more meaningfull,
i.e. something users are more likely want to try it on,
and therefore in which it is better to do more testing.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove the qemu targets for the controller configuration.
As those do not support the controller, it is just meaningless.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>