As the receive window is now decreased at the TCP module level, other
direct net_context users are also responsible for acknowledging the
received data with net_context_update_recv_wnd() - otherwise, the
communication will stall.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The capabilities callback did not provide information about
the type of the endpoint being configured, making it
impossible for the application to determine if it is a
sink or source endpoint.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Audio streams as defined by the BAP spec does not
support bidirectional audio streams. This commit
updates the API and implementation to match that.
The use a bidirectional CIS with 2 audio stream will
be added in a future commit.
This removes the _IN_ and _OUT_ and _INOUT_ QOS
values, as well as the direction of the codec QOS
struct.
To keep direction for internal use, the direction
has been added to the endpoint struct.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Make it consistent for audio.h and capabilities.h that the
array size parameter appear after the array parameter.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The Bluetooth HCI driver based on the RPMsg transport now uses the IPC
service module. The compatible Bluetooth sample - HCI RPMsg - has also
been migrated to the new IPC solution.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The callbacks were implemented to notify the application
about the state of the ISO. However, since then, callbacks
such as `started` and `stopped` have been implemented,
and as such the `connected` and `disconnected` callbacks
no longer server any purpose.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
CONFIG_BT_ISO_TX_MTU=230 had been added to deal with the RX
buffers not fitting TX's of same size, which is fixed now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction finding connectionless RX sample didn't fit into
nRF52820 SRAM. The sample will not be able to store IQ samples
for maximum number of CTEs allowed by Bluetooth Core 5.3
specification.
For nRF52820 the new allowed maximum number of scanned CTEs
is set to one, to save more space in SRAM for an application.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix problem with building sample applications where Host is
split from Controller into separate binaries. In that situation
samples does not have access to controllers Kconfig options.
To optimize memory usage by an application, disable not needed
features (angle of arrival or angle of departure).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add missing integration plaforms in direction finding samples.
There were no nRF52820 and nRF5340 added.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
To give control over GPIO pins for Direction Finding Extension of
Radio peripheral when build for nRF53 network core, the application
core has to assign those pins to network core.
There is a mechanism that uses a device tree overlay to get
information about GPIO pins to be assigned to network core.
The commit adds overlays with appropriate configuration
to assign GPIO pins in all DF related samples.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There was a bug it periodic advertising sync termination handling.
If a sync was terminated before sync established was reported,
for example sync may be filtered out by CTE type, then sample
will wait until sync_create_timeout_ms is reached.
Also sem_per_sync_lost semaphore is given in term_cb.
Result of the bug is next time a sync is established, CTE sampling
is enabled, sample starts waiting for periodic sync lost and
immediately ends waiting because sem_per_sync_lost is given.
Scan is restarted and already synchronized sync is terminated.
Correct behavior is, when term_cb is executed sem_per_sync_lost
may be given only if sync established was already reported.
Also sample must not wait for sem_per_sync if sync is terminated
due to wrong CTE type. It can end wait immediately.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Direction finding samples had dependency on KConfig option defined
in Controller. That caused a problem for split builds where
an application and host are not part of the same binary as
controller. The code dependend on the Kconfig option
was always disabled.
To fix that issue new Kconfig options were introduced to
Host. The dependency is removed. Unwanted features may stil be
disabled and samples binaier will be smaller.
The commit aligns all direction finding samples code.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Adds Basic Audio Profile (BAP) unicast server and client samples.
These are the barebones versions of what is needed to scan/advertise
for audio and setup a stream using the mandatory LC3 preset defined by
the BAP spec.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add reference to specific CONFIG_BT_CTLR_ Kconfig options
for the ISO samples. This is due to the fact that ISO
isn't fully supported in the Zephyr controller yet, and
won't be enabled by default for a while yet.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a check for SDU size and tx qos to ensure that we do not
attempt to send any data and neither central or peripheral
if the benchmark has been setup to be rx-only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Periodic advertising synchronization create had a timeout set
to fixed value of 10 seconds. BT 5.3 Core specification defines
synchronization timeout as 6 consecutive periodic advertising
events. When advertiser set the periodic interval to be more than
1.6 second it was possible the application timeout is reached
before time allowed by BT Core specification.
Changed implementation of timeout to depend on the periodic
advertising interval.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for peripheral role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add new sample application for direction finding to show
how the functionality works in connected mode for central role.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.
From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.
Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.
Codebase adapted to those changes.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Host receive thread has small default stack size.
Attempt to convert data from binany to string requires
large array. Allocation of such array on stack could
cause stack overflow.
To limit the scope of the array and avoid stack overflow
the array is changed to be static local variable in a function.
Also the array has been prepared to accept max advertising
data sieze of 1650 bytes.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The CTE type is used in two ways by HCI layer:
1) single value representing particular CTE type: AoA, AoD 1 us,
AoD 2 us
2) bit-filed where bits 0-2 represent particular CTE types AoA
AoD 1 us, AoD 2 us
The bit-field is used to inform Controller about allowed types
of CTE, hence single value carries more than one value.
To avoid confusion between these use cases in code that refers
to case 1) all named cte_type (singular form). For case 2)
cte_types (plural form) is used.
There is an enumeration that is used for both cases:
bt_df_cte_type. For cte_type only single value from the
enumeration may be assigned to variable except
BT_DF_CTE_TYPE_NONE and BT_DF_CTE_TYPE_ALL.
For cte_types all enum members may be used. Ocasionally
BT_DF_CTE_TYPE_NONE may be excluded. If that is true,
it is described in code documentation.
Thanks to that applications are released from requirement
to include hci.h header file.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
SYS_INIT can be used for the same purpose, what is being run is simply
an initialization hook.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace unpacked in6_addr structures with raw buffers in net_ipv6_hdr
struct, to prevent compiler warnings about unaligned access.
Remove __packed parameter from `struct net_6lo_context` since the
structure isn't really serialized.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This sample scans for nearby BLE devices and prints the address of the
device found and the RSSI value to the UART terminal.
Uses passive scanning and demonstrates the role of the observer.
Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
This sample periodically sends out advertising data packets with
manufacturer data element.
The content of data sent is a single byte indicating how many
advertising packets the device has sent which rolls back to 0 after 255.
Demonstrates role of broadcaster.
Signed-off-by: Yeshvanth M <yeshvanthmuniraj@gmail.com>
Update the macro prototype to explicitly require the length of the
desired user data. Update all in-tree usage of this macro.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The macro already mentions in the docstrings that PM is not supported:
"Invokes DEVICE_DEFINE() with no power management support".
This patch removed the PM entry from the macro and ajusts its uses.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Renames the struct from bt_iso_cig_create_param to
bt_iso_cig_param as the same struct can, without
modification, be used to update the CIG as well
(function to support that will come in a later commit).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
A CIG may be updated later to include more CIS, and thus a slist
makes more sense.
The BIG doesn't need the change, but it makes more sense to
have similar handling for both.
This change also removes the requirement that the arrays
used to create the CIG/BIG need to static.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a macro to retrieve the iso data load length (the
length stored in the iso header) with a bit mask that
ensures that we only take the first 14 bits.
This is to remove any RFU bits that may have been set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There were a few cases where bt_hci_iso_data_hdr was used
instead of the proper struct bt_hci_iso_hdr.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
With the maximum number set to 20, the sample fails to build for
both platforms set as allowed for this sample and mentioned in its
documentation, i.e. 96b_carbon_nrf51 and nrf51dk_nrf51422 (a build
attempt ends up with an SRAM region overflow). Use a lower number
to prevent this failure and set both those boards as integration
platforms, so that such problem, if it was to appear again, could be
caught by CI.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add iterations of connections and disconnections to
Babblesim test of Bluetooth Low Energy Central role
functionality by scanning for other devices and establishing
connection to upto 62 peripherals with a strong enough
signal.
Enable Auto PHY Update and Auto Data Length Update procedure
in the central_multilink sample.
Enable Auto PHY Update and Auto Data Length Update procedure
in the peripheral_identity sample. Fixed issues related to
rotation of identities after maximum number of connection
iterations are repeated.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add implementation to iteratively perform Extended
Advertising enable and disable while Periodic Advertising is
active.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>