Remove the explicit enable of Extended and Periodic
Advertising support in Controller, the feature is no
longer experimental in the Controller and is now enabled
by default when application uses them by enabling as
Host feature.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Remove experimental label from Advertising Extensions and
Periodic Advertising features in the Controller.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This PR sets the refactored LLCP as the default instead of legacy
so that more people will use this, giving us more feedback
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Sometimes it is important to know when the backend fails to send out
data because no memory / buffers are available. Return -ENOMEM in that
case.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Enable HAS shell only if preset support is enabled. Otherwise there are
no functions yet that can be exposed if the preset support is disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Fix unused `ccc_cfg_changed` function warning that shows up when
preset support is disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Introduce invisible helper symbol that could simplify and make more
readable condiitional code checks.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
When there is no response from the server, a client side close
is obstructed, it should terminate and clean the context. This
tests breaks the connection after the accept and validates
this behavior.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
When the loopback drops driver packets, the number of dropped
packets is counted and can be requested externally.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
For some boards, like up_squared and ehl_crb, they need do a
power off/on operation and use bios to load and execute zephyr
test binary, during the power off, it may meet this SerialException,
but the serial object still works well after power on, we can continue
to get all results from serial, so we don't need to close it,
it's ok to ignore this exception.
BTW, even if we ignore this exception here, it doesn't influence twister
function, because if it was really caused by disconnection, the test would
still be judged as failed due to timeout and serial would be closed later
in main thread, it doesn't impact results.
On the contrary, close serial directly in the monitor serial thread, it
will cause later tests failed due to mismatch errors.
Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
Update the users of the "write" callback in the
bt_gatt_subscribe_params to use the new "subscribe" callback instead.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Add a "subscribe" callback in the bt_gatt_subscribe params, and
deprecate the "write" callback.
The purpose of this is to be able to return the subscription
parameters in the callback. The write callback
- (in principle) returns write parameters
- in fact returns nothing - the pointer is set to NULL
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit adds the `volatile` qualifier to the timing variables, in
order to ensure that the compiler does not try to optimise the test in
a way that can affect the execution time measurements.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The GigaDevice HAL defines CAN_MODE_NORMAL, which conflicts with the
zephyr/drivers/can.h header definition. Undefine it in soc.h.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The GigaDevice HAL defines CAN_MODE_NORMAL, which conflicts with the
zephyr/drivers/can.h header definition. Undefine it in soc.h.
Fixes: #45611
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Problem:
pull/43494 is causing the CMake warning
No SOURCES given to Zephyr library: modules_hal_infineon
modules_hal_infineon library was defined even if none of the
below subdirectories is added; so, when not building for
Infineon/Cypress devices, the source list for this library
will be empty.
Fix:
Added 'zephyr_library_named(modules_hal_infineon)' under condition
'if(CONFIG_HAS_XMCLIB OR CONFIG_SOC_FAMILY_PSOC6)'
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Direction finding functionality does antenna switching during CTE
reception in AoA mode and CTE transmission in AoD mode. Antennas are
switched according to user provided antenna switch pattern. If a CTE
length is enough to exhaust all antenna ids in a switch pattern then
radio should loopback to reference antenna and continue from switching
from that. Current implementation loops back to antenna that is just
after reference antenna in the switch pattern.
The commit fixes that by insertion of the reference antenna
at the end of switch pattern. Radio will operate as it was before,
it will restart switching from the same index in a switch pattern.
At the same time reference antenna will be inserted into the loop
if switching pattern is exhausted. That also means, the maximum
number of antenna ids in a switch pattern has to be decreased by
one.
The commit also fixes lower bound in the BT_CTLR_DF_MAX_ANT_SW_PATTERN-
_LEN that should be equal two. It was set to three, because in the
past the antenna at index zero was used for reception of a PDU.
Now this antenna ID is provided by device tree configuration.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The SYNC_STAT_READY_OR_CONT_SCAN state into two: SYNC_STAT_READY
and SYNC_STAT_CONT_SCAN. The connected state was used for two
cases:
- synchronization with periodic advertising is already established,
- CTE type is wrong but periodic advertising list is used to filter
synchronized devices.
In the past states were connected because there was only one difference
between them. In case of sync already established, Controller generated
sync report notification to host.The sync was not terminated when
Controller was about to continue search for other periodic advertiser.
The state was split because now Controller terminates sync ticker and
continues search for other periodic advertised. The split improves
readability and makes code easier to understand.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
In case of use of filtering based on: periodic advertising list and
CTE type, the synchronization can hang. That is possible if a periodic
advertiser uses wrong CTE type. In such situation the sync is not
released in ull_sync_done call. What more the sync->timeout_reload
is not cleared and Host is not able to cancel the synchronization.
The periodic advertising is in a semi-sync-established state.
There are no reports send to Host. Host can't use the sync set to
synchronize with other device. It is only able to terminate the
sync (call to ll_sync_terminate).
To fix the issue following changes should be applied:
- isr_rx_adv_sync_estab should call isr_rx_done_cleanup
with sync_term parameter in case the sync_ok isn't SYNC_STAT_ALLOWED.
In any case the CTE type is wrong, no matter is the periodic
advertising list filtering is enabled or not.
- ull_sync_established_report should set sync->is_term to true
in case the CTE type is not allowed. That change is required for devices
that do not support Direction Finding Extension. For those devices CTE
type based filtering is done in ULL by ull_sync_established_report
function. The sync->is_term should be set unconditionally, hence is
moved up in the function.
With these two changes done, ull_sync_done function will execute
sync_ticker_release in case the CTE has wrong type. ULL, depending on
notifications prepared by ull_sync_established_report, will follow up
on sync termination if required.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Incorrect GPIOTE channel was being freed because the pin number
being used is not the absolute pin but the pin within the port.
Signed-off-by: Wael Barakat <waelsbarakat@gmail.com>
Test the behaviour of the PM device_runtime API on devices that do not
support power management.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Return `-ENOTSUP` on calls to device_runtime functions if the underlying
device does not support power management.
Fixes#45648.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Doxygen comments were existing, but they were not rendered anywhere in
the docs. The code is located under DFU, but I think it makes sense
to document it under storage, next to similar flash-related APIs.
Signed-off-by: Martin Jäger <martin@libre.solar>
By default the newlib does not compile with %hhu processing,
to avoid turning on additional options for newlib compilation
this commit changes formatting string to use %hu instead.
The commit fixes problem with malformed version string being
returned, by smp_svr, when CONFIG_NEWLIB_LIBC=y is set together
with CONFIG_NEWLIB_LIBC_NANO=y.
Fixes#45261
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add a call to bt_iso_chan_get_info for each CIS in the sample
to ensure that we don't attempt to send any data on a CIS
that is RX only.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the function slightly to take a different
argument, and add more debugging to the function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Ensure that we don't attempt to send any data to the
controller if `can_send` is not set, and return an
error code to the application instead.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Besides checking for the rx/tx pointer, we now also validate
the can_send and can_recv values to ensure that we do
not setup a useless data path.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The application can get the information about can_send
and can_recv in the bt_iso_chan_get_info function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Set the can_send to true and can_recv to false for broadcaster.
Set the can_send to false and can_recv to true for the sync
receiver.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of relying only on the `tx` and `rx` qos pointers,
we extract further information from the
bt_hci_evt_le_cis_established event to properly determine if we
can actually send or receive data.
This is useful to help determine which data paths to setup,
and whether to reject requests to send.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If CONFIG_SHELL_STATS is disabled, shell->stats is NULL and
must not be dereferenced. Guard against it.
Fixes#44089
Signed-off-by: Alexej Rempel <Alexej.Rempel@de.eckerle-gruppe.com>
Instead of relying on runtime filter to limit scope to emulation
platforms, use the type attribute for each platform and do the filtering
very early on. This will speed things up for tests where we only run on
emulation platforms.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>