For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones.
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix CIS accepted by Host being failed in the Controller with
reason 0x20 Unsupported LL Parameter Value, by relaxing the
check that the ACL connection is sufficiently placed such
that the time reservation using in the Controller
implementation does not overlap with the CIG event.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
It is often desired to maximize the chances of receiving advertising
when scanning. To achieve this, the scanner should be enabled all the time.
Some controller implementations (like Nordic's SoftDevice Controller)
handle scheduling differently when scan_window = scan_interval.
Having a macro that defines this scanning configuration simplifies
writing applications.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Change the filter from CPU_HAS_MPU to ARCH_HAS_USERSPACE to
when filtering boards which support userspace.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Validate the new relocations for BL and BLX instructions by
creating a new test extension which contains a chain of global
functions in a pseudo random order to (hopefully) generate
relative jumps in both positive and negative directions.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add new commands to manage the Encrypted Advertising Data feature.
Overview of those new commands:
- `bt encrypted-ad set-keys`: set key materials (session key and
initialisation vector) used for encrypted and decryption of EAD;
- `bt encrypted-ad add-ad`: store a given advertising data structure;
- `bt encrypted-ad add-ead`: encrypt the given advertising data
structres and store the generated AD structure;
- `bt encrypted-ad commit-ad`: set the AD of the selected advertiser
with the stored AD;
- `bt encrypted-ad clear-ad`: remove all stored AD;
- `bt encrypted-ad decrypt-scan`: decrypt data using the previously set
key materials when receiving AD with type `0x31`.
The documentation of the Bluetooth Shell has been updated to include
those new commands.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Spawns n instances of the bt-shell in separate xterm windows.
Assumes in-tree build of the shell, can optionally specify another .exe
image.
Also add snippet for that use-case (`-S xterm-native-shell`).
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Set total priorities to 71.
This setting already exceeds original limit(32) and exceeds 64 to test
secondary bitmap.
Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
The commit disables QSPI in SoC configurations, as QSPI got enabled
by default and test never really run on SoC.
In QSPI configuration erase page size is set to 4096
There is not TC_PRINT showing name of device that the test will
run on, in test setup.
The nrf52840dk configuration files have been renamed to reflect
dk name and SoC.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Allow all tests which run in the real nrf52840 to also
run in the simulated nrf52_bsim.
That way we will have runtime tests in CI.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a DT overlay so this test can also be run in the nrf52_bsim
simulated board.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable i2c1 on nucleo_h563zi (arduino_i2c).
Additionally provide a test configuration for i2c_target_api.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
One of these tests has been seen failing in older slower
computers due to timeouts, let's increase the timeout so
we don't break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test has been seen failing in older slower computers
due to timeouts, let's increase the timeout so we don't
break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test has been seen failing in older slower computers
due to timeouts, let's increase the timeout so we don't
break in those cases.
Note this timeout is just a safety to eventually kill
hung simulations even if nobody presses Ctrl+C.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
On nRF54H20, we need to configure RAM with execution permissions in
order to execute code from it. This patch adds overlays for the nRF54H20
PDK cpuapp cores so that RAM0X region is given execution permissions and
so the test runs successfully.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Enable testing of all bitrates for all drivers and report which bitrates
are not supported by the CAN controller under test.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
It turns out the deadline scheduling and the scalable scheduling
backend didn't work right together (for almost six years!) because we
never had coverage of that combination. Add it explicitly given the
known issue in #69935.
We might want to consider adding a whole CI target with SCALABLE=y,
which we've done for other common tunables to get coverage.
Signed-off-by: Andy Ross <andyross@google.com>
Adds i2c3 on the dts of nucleo_f401re.
Adds necessary overlay and nucleo_f401re in i2c_target_api test case
to enable the board.
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Fix for test that was failing due to incorrectly testing of
stream_flash_erase_page.
The stream_flash_erase_page would never be able to erase a page
it has been requested to erase.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The fix is to check if any of the adv set's rpa expired
callback returns false, then all adv sets continues with
the old RPA.
Note: Fix is applicable only to adv sets which shares the
same id.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Skip the "test_can_dtiming" test case if CONFIG_CAN_FD_MODE is not enabled,
not the "test_can_timing_missing_value" test case.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Commit adds const qualifier to models metadata.
Specification claims: Composition Metadata Page 0
shall not change during a term of a node on the network.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
The simple test is there to test the API and simple extensions in
unison. Hello world was intended to be the first not the only extension
being tested.
Also refactors the entry thread to allow for usermode potentially by
passing the pointer to the function symbol rather than having it look it
up directly.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Add build_only for the st,stm32-ethernet driver to the build_all
ethernet tests and add an entry for ethernet support to make sure
ethernet driver is built.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use the native_sim board to build ethernet drivers for spi devices and
add an entry for the default testcase.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This will help to detect any issues with duplicate handlers, currently,
it causes an infinite loop in the handler that processes the single
linked list.
Also, increase the stack size to pass the synchronous test case.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Set the minimal RAM requirement for the test variant, so that it does
not get built for platforms it won't fit anyway.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Enabled the PIT and Multi channel support
for some of the rtXXXX devices.
- rt1010
- rt1060
- rt1160
- rt1170
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Updating the nxp,pit driver to support mutliple
channels. Updating the dts and board overlays
to account for the changes.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Replaces the use of z_pend_curr_irqlock() with z_pend_curr()
as the former is not used anywhere else anymore.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Update all usages of the MBOX API to the latest API changes (to be
squashed for bisectability).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Some pieces of code were missing proper guards for Kconfig
values, which could cause compile issues
The massive amount of #if in bap.c clearly indicates that the
file should be split, as it contains many things that are specific
for various roles.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for vendor specific Set Scan Request Reports command and
Scan Request Received Event, available for legacy advertising.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
This function is only being used by a test, so instead of reimplementing
a syscall in the test, provide a Kconfig option to provide the
functionality that only works with tests and remove some of the
duplication and extra code.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The functions to manipulate the essential flag indeed operate on
threads, but they are misplaced in the thread implementation file. Put
them alongside other routines setting other thread flags and cleanup
headers a bit.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit relaxes the idle event statistics test precision requirement
for emulated QEMU targets because the cycle counts may be inaccurate when
the host CPU is overloaded (e.g. when running tests with twister) and a
high failure rate is observed for this test in the CI.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
It wasn't saving adjusted stack size at either the private stack or the
k_object, thus failing subsequent checks.
Test added to check for this case and prevent regressions.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
AXP192 features an EXTEN pin that is on output only.
This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
RTC drivers should validate the `struct rtc_time`'s contents against the
provided `mask`. Promote this common code to a new rtc_utils file and
modify existing drivers to use this functionality. Extend the test
coverage to include verifying this behaviour.
This is groundwork ahead of adding support for the RP2040's (as used in
the Raspberry Pi Pico) RTC and alarm.
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Add tests that verify that sendmsg() for DTLS works fine if provided
with multiple buffers.
Modify existing sendmsg() tests, so that we still tests the old
behavior if the feature is disabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Utilization of chip interrupt line is mandatory to assure proper
charger state control. Handle interrupt to prepare the driver for
implementation of such functionality.
Modify charger status update so the current state is fetched in the
interrupt handler.
Use level based interrupts combined with interrupt disabling for a
period of time after interrupt handling to reduce number of interrupts
triggered by the charger. There may be a case where the charger
produces burst of interrupts for a several seconds and if the code
attempts to handle every single interrupt separatery then the system
might be significantly overloaded.
Co-authored-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Updates the latency_measure test to add support for benchmarking
k_stack_push() and k_stack_pop().
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Add some assert statements meant to check if L2 interrupts
are encoded right when dealing with nodes that consume interrupts
from multiple aggregators. For this to work, also add another
interrupt controller node which extends a different L1 interrupt
from `test_intc`.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
To make the content of the sample packets more more
understandable, comments describing it are added.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add tests for the encapsulated vendor specific option callback API.
These test cases are focused on correct parsing of encapsulated
vendor specific options.
The sample DHCP messages have been extended accordingly.
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Co-authored-by: Fin Maaß <f.mass@vogl-electronic.com>
RAM allows for very fast reads and writes and lets us explore most of
the I2C controller APIs including RTIO. Theoretically supports any form
of i2c connected RAM but requires some tweaking to work with specific
parts potentially. Tested with Fujitsu's MB85 FeRAM part using an
arduino breakout.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
- Added a test to the CoAP testsuite for age wrap around
- Added test for `coap_age_is_newer`
Signed-off-by: Sibert Declercq <sibert.declercq@basalte.be>
Adds a test to verify the saving and restoration of the HiFi
AudioEngine registers. Twice as many threads as there are CPUs
are created and each thread sets its HiFi registers with a
unique set of values. If after a context switch, the HiFi AE
registers contain any unexpected data, we then know that the
registers were either not saved or restored properly.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Brings SMF framework closer into alignment with accepted Hierarchical State
Machine operation by:
1. Allowing 'programming by difference' by having some child states handle
events and prevent propagation up to the parent run actions while others
propagate events up to a common handler in a parent state.
2. Optionally allow initial transitions within a parent state to determine
the most nested child state to transition to.
3. Adding a test case for `CONFIG_SMF_INITIAL_TRANSITION` and
`smf_set_handled()`
4. Updating documentation for the new API (and fixing some references)
There was discussion in https://github.com/zephyrproject-rtos/zephyr/issues/55344
about not making the initial transition a Kconfig option, but I'm not sure
of any way else of doing it without permanently adding a pointer to each
`smf_state` entry, which is a problem for resource-constrained devices.
This does not fix https://github.com/zephyrproject-rtos/zephyr/issues/66341
but documentation has been updated to warn users of the issue.
Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
Add devicetree based settings for resolution, axis inversion and sleep
mode enable. Keep the resolution setting in its own function so it can
be called by the application again in runtime if needed.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The broadcast sink and broadcast source will now use and verify
the info returned by bt_bap_ep_get_info.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Extended test to validate that RO string locations are appended to
the cbprintf package for a log message if Kconfig option is enabled.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The FICR is also modelled in simulation, but changing this
conditional compile was forgotten, so it was only being
built for real HW.
A test had provided its own version of this function so it would
avoid a runtime warning due to the lack of static address. But
this needs to be removed as it conflicts with the function
provided now always by the nordic controller SW.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The nRF91 series devices, when running the Serial LTE Modem (SLM)
application starting with nRF Connect SDK 2.6.0, can now be used as
standalone modems via the generic modem_cellular driver.
A configuration to run the cellular_modem sample on the nRF9160 DK
(plugged in to another nRF91 series device running SLM) is provided.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Make sure that the tests work properly when each IPv4 address
in the network interface gets its own netmask.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Since all CAN controllers drivers seem to support automatic recovery (for
any future drivers for hardware without this hardware capability this can
easily be implemented in the driver), change the Zephyr CAN controller API
policy to:
- Always enable automatic bus recovery upon driver initialization,
regardless of Kconfig options. Since CAN controllers are initialized in
"stopped" state, no unwanted bus-off recovery will be started at this
point.
- Invert and rename the Kconfig CONFIG_CAN_AUTO_BUS_OFF_RECOVERY, which is
enabled by default, to CONFIG_CAN_MANUAL_RECOVERY_MODE, which is disabled
by default. Enabling CONFIG_CAN_MANUAL_RECOVERY_MODE=y enables support
for the can_recover() API function and a new manual recovery mode (see
next bullet). Keeping this guarded by Kconfig allows keeping the flash
footprint down for applications not using manual bus-off recovery.
- Introduce a new CAN controller operational mode
CAN_MODE_MANUAL_RECOVERY. Support for this is only enabled if
CONFIG_CAN_MANUAL_RECOVERY_MODE=y. Having this as a mode allows
applications to inquire whether the CAN controller supports manual
recovery mode via the can_get_capabilities() API function and either fail
or rely on automatic recovery - and it allows CAN controller drivers not
supporting manual recovery mode to fail early in can_set_mode() during
application startup instead of failing when can_recover() is called at a
later point in time.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Add additional validation of the config data in the broadcast
sink test, both ensuring that the BASE is properly parsed,
that the BASE contains mandatory information and that the
stream get the right values copied.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When using the LC3 codec, all codec configuration are LTV encoded.
The broadcast source did not properly validate this, and it also
uncovered a bug in the bsim test for broadcast sources.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is not used by anyone, and is unlikely to be useful actually.
Helps to save 4 bytes for each instance of struct net_nbr also (removing
a 2 bytes attributes, which was anyway generating a 4bytes loss due to
structure misalignment).
Removing relevant useless functions related to it as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add an initial input driver for the PixArt PAT9125EL, just core
functionalities for now, will add more configuration properties at a
later stage.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add test cases for IPv4/IPv6 foreach functions that iterate all
multicast addresses assigned to an interface.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Use TC_END_REPORT() to report "PROJECT EXECUTION FAILED"
instead of a call to printk() for ZTEST enabled tests. as
this prints the failed message as well as the RunID (and
whatever will be added in future).
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add test case verifying that send() returns an error when called after
TLS session has been closed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Iterate through I2C addresses in devicetree overlay
for build_all/gpio to avoid conflicts.
Fixes#69551
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
The default 512 bytes stack size is a bit tight for some architecture
and leads to samples running out of stack. Let's default to 1024 and let
the user tweak it down if necessary.
Suggested-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add bt_bap_base_subgroup_get_bis_indexes that gets the BIS indexes
of a subgroup. This work very similar to
bt_bap_base_get_bis_indexes, except that it works for subgroups
rather than BASEs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Previously, the mutex attribute was not initialized prior to its
first use or subsequently destroyed.
Ensure that it is initialized by calling
pthread_mutexattr_init() and destroyed by calling
pthread_mutexattr_destroy().
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The stack manages to suspend the advertiser before it finishes
transmitting the Outbound PDU Report message to confirm the transmission
of a Provisioning PDU. The test requires the server to become
unresponsive when the Provisioning PDU is sent to the unprovisioned
device to test timeout of the provisioning protocol.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Now, when the deadlock is removed from `bt_mesh_adv_disable` function,
the advertiser can be disabled from the `bt_mesh_send_cb`
callbacks.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When the Bluetooth central samples in an open air environment
it is very likely that there are multiple devices nearby with
a received signal strength stronger than -70 dBm.
To avoid connecting to the wrong device, make the check stricter.
For tests using those samples, the NtNcable attenuation is changed
from the default 60 dBm to 40 dBm to satisfy the new requirement.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Verify that declined addresses are not permanently blocked - i. e.
expire after configured timeout and in case of free address shortage,
can be reused.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Rename uart and uart_async bsim test to reflect
testing of hci_uart sample using UART driver
variants under bsim simulations.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The tests `hci_prop_evt` and `host_long_adv_recv` used `bt_recv_prio`,
and so relied on an extra config option `CONFIG_BT_RECV_BLOCKING`. This
patch replaces the use of `bt_recv_prio` with `bt_recv` and restores the
use of the default option for `BT_RECV_CONTEXT`.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Verifies that there is no host RX buffer leak due to disconnections.
That is, not actual host buffer objects but rather the number of buffers
that the controller thinks the host has.
If there is a desynchronization between those two, the result would be that
the controller stops forwarding ACL data to the host, leading to an
eventual application timeout.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
There are quite many BT host test images being built.
Today these are all built in parallel, causing a quite
high load.
Let's split them in their separate sub-scripts,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The CIS tests are building quite many
apps on their own.
Let's split them in their separate sub-script,
so we don't parallelize too many builds,
and users have more granularity if they only
want to build a subset.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The test_mqueue_notify_thread testcase had a relatively high
failure rate because sleeping only 10ms was in some cases not
sufficiently long enough for the spawned thread to update
notification_executed.
Sleep 100 ms instead of 10 ms to reduce the failure rate.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add driver for ScioSense ENS160 multi-gas sensor. The driver includes
support for I2C and SPI, attributes for setting temperature and
humidity compensation and data ready trigger.
Also add ScioSense to the list of vendor prefixes.
Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
The LC3 framed macros were unused.
The LC3 unframe macros only added the 7500/10000
parameter, but since the the 7500/10000 requirement is also
defined by BAP, it makes equally much sense to simply use the BAP
presets.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
LC3 does not define any such configurations, and they are in
fact defined by the BAP. The LC3 header file should thus not
pretend that there are these specific configurations for LC3.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
nvs-cache-gc test is running into infinite loop because of the wrong
stop condition when filling a sector.
Fix this by keeping an empty ATE in the sector for delete operation as
defined in the NVS filesystem write operations.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Add tests for the GATT permissions to read and write for
characteristics that require encryption and LESC encryption.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The test where it was supposed to read the long characteristic,
only read the "small" characteristic, due to setting the wrong handle.
With the right handle, the test failed and the test had to be
updated to store the data across multiple reads, and then do
the proper comparison.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Clear buffer before restarting DUT. This is to avoid using
lines from previous initial boot, when verifying if upgrade was
done as expected in test.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
update shell and test app with the modifed resource struct such as
acpi_irq_resource and acpi_mmio_resource
Signed-off-by: Najumon B.A <najumon.ba@intel.com>
Increases some of the timeouts so that when using this sample
against other interactive devices (such as a phone or the
Zephyr audio shell), then it's easier to do it in time.
Also updates a few of the printks and ensures that we are not
doing name filtering when we have been requested to sync to
a specific broadcast source by a broadcast assistant.
The test for the sample has also been modified to have a longer
timeout to accomodate for the new semaphore timeout values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The assumption of going through 100 iterations of allocating for
work queue is that the HEAP size is 1024 bytes. However, there
are platforms where the HEAP size is inflated due to subsystems
and/or drivers being included. So change the for loop into
a loop where it only stops until there is no memory to be
allocated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The log2 prefix was deprecated and changed to log some time ago,
but log2_generic() seems to have been inadvertantly left with
the old prefix.
Rename log2_generic() to log_generic() to follow suit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The Broadcast Assistant API should be fully independent of the scan
delegator. Therefore the new struct bt_bap_bass_subgroup has been
defined to avoid a dependency.
Fixes: #68338
Signed-off-by: Ping Wang <pinw@demant.com>
The thrift methods loadCertificateFromBuffer(),
loadPrivateKeyFromBuffer(), and
loadTrustedCertificatesFromBuffer() expect a null-terminated
string.
Append '\0' to each array used to hold a certificate in
thrift samples and tests.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Commit 3fbf12487c introduced a way
to add to CONFIG_HEAP_MEM_POOL_SIZE if, for example, subsystems
need more heap space. However, the size check in obj_validation
was still using the old kconfig, and was failing when extra
space was specified. So update the size check to use the updated
size.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The bt_iso_chan_send function could take an optional
timestamp by using 0 as an indicator. The issue with
this approach was that a timestamp value of 0 is valid,
and could cause potential issue with syncing streams
in a group.
To fully support transmitting with and without timestamp,
bt_iso_chan_send_ts has been introduced, which is the only
function of the two (bt_iso_chan_send being the other) that
supports timestamps.
A new function, rather than adding a boolean to the existing,
was chosen as it simplifies the individual functions as well
as making it more explicit what the function does.
Since the bt_iso_chan_send function is used by LE audio, both
the BAP and CAP send functions have similarly been updated.
Likewise, all tests and samples have been updated to use the
updated function(s), and BT_ISO_TIMESTAMP_NONE has been
removed.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When running it in a multicore and with incoherent cache environment it
is possible that the thread allocating dynamic stacks is switched to a
different cpu. In this situation further access to that memory (like
when releasing resources) will be invalid.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Refactor DMAR structure to allow more tests. Use fake void function
for invalid size tests.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Before a LL_FEATURE_REQ is sent, verify that the Data Length Update
procedure is still supported as it could have been unmasked as the result
of a previously completed Feature Exchange procedure.
Add unit test to verify the case of enqueuing both a
Feature Exchange procedure and Data Length Update procedure, where the
Feature Exchange procedure would result in the unmasking of the Data
Length Update procedure.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Resume the TX Data Q when a LL_UNKNOWN_RSP is recieved instead of a
LL_PHY_RSP.
Update PHY Update unit test with more coverage of the TX Data Q pause
state.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Add a test that checks that both advertisers, the legacy and the
extended behaves identically when the stack is suspended, in particular:
- `bt_mesh_send_cb.end` callback is called with error code `0` for the
advertisement that the advertiser already pushed to the ble host
(called `bt_mesh_send_cb.start`),
- `bt_mesh_send_cb.start` callback with error `-ENODEV` is called for
every advertisement that was pushed to the mesh advertiser using
`bt_mesh_adv_send` function before the stack was suspended,
- `bt_mesh_adv_create` returns NULL when attempting to create a new
advertisement while the stack is suspended.
The `bt_mesh_adv_disable` is called from the work because calling it
from the `bt_mesh_send_cb.start` callback will cause a deadlock.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit changes error code returned by `k_sem_take` when it times
out from `-EAGAIN` to `-ETIMEDOUT` because `bt_le_scan_start` also
returns `-EAGAIN` if bt device is not ready, which may lead to invalid
test behavior.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Extend timeout to perform coverage analysis when testing on HW.
Coverage mode makes execution slower.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Used to perform coverage analysis when testing on HW.
Gathering coverage data require more stack,
so its needs to configurable.
There is used CONFIG_TEST_EXTRA_STACK_SIZE for that.
(with value depending on used HW).
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Where advertisement, connection and disconnection is iterated over 5
times, to verify the reestablishment of extended advertisements when
iterating over multiple times. Additionally, the connection
unreferencing has been decoupled from the disconnect event on both
sides, to demonstrate the dependency of the recycle event.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Split into two separate builds: advertiser and scanner to emphasize
clarity and robustness during reestablishment of advertisements and
scanning.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Removed the "operation" infix from the bt_gatt_authorization_cb
callback structure in the Bluetooth GATT header.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This commit introduces two changes:
- veryfing fixed buffer's size and length after allocation to existing
test case
- new test veryfing appending bytes to a network buffer from a fixed
size pool
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
From change 47eb592c28b9e7dfbdd25fedbf07a528ad240084 net_buf structures
allocated from pools defined with NET_BUF_POOL_FIXED_DEFINE() will keep
their `size` member set to the actual fixed size and not requested
size like before.
For this set of tests NET_BUF_POOL_FIXED_DEFINE() for several test
cases. These tests check the several values based on a fact that the
network buffer's size was set to the requested size.
This commit changes definition of the buffer pool to
NET_BUF_POOL_FIXED_DEFINE() in order to satisfy these expectations.
This change does not impact the tests themselves.
Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
If the receive state is locally removed, then we should not
request permission from the application, as that is implicit
when removing the source locally.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The test is configured to replace the config rather than extending,
resulting in a build with CONFIG_DISPLAY=n and the driver not being
actually built.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The defines from the Bluetooth Audio assigned numbers are not
specific for LC3. This commit removes the LC3 infix and
the reference to LC3 in the documentation for them.
It also cleans up some of the documentation and
names of the enums.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the parameters for bt_cap_initiator_unicast_audio_stop
so that they are more similar to
bt_cap_initiator_unicast_audio_start.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the parameters for bt_cap_initiator_unicast_audio_update
so that they are more similar to
bt_cap_initiator_unicast_audio_start.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check for COMPILER_ISA_THUMB2 rather than CPU_CORTEX_M when determining
if special handling is required for thumb instructions.
This prevents false negative results on Cortex-R devices that may
generate a fault (test pass) even if the MMU/MPU is not configured
correctly.
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
Building with Zephyr SDK 0.16.5 revealed a minor bug with the buffer
size provided to snprintk():
specified bound 38 exceeds destination size 20 [-Wstringop-overflow=]
As we provide the buffer to snprintk() with an offset, the actual
buffer size should be reduced by that offset value.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This test does not use any APIs beyond those provided in the Zephyr
standard set, so it should not define _POSIX_C_SOURCE.
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit updates the definition of z_shared_isr_table_entry
to use _isr_table_entry instead of specially created z_shared_isr_client.
Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
Sets up memory partitions and allows for the partitions to be added to a
memory domain after loading an extension. This allows for applying
memory protection attributes to all of the needed memory regions an
extension requires to execute code correctly.
Currently only works when usermode is enabled as otherwise memory
protection APIs are unavailable.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Similar to nRF54L15, the MDK files in HAL for this SoC are not
compatible with C++98, so currently the test cannot be performed
on this SoC.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Different set of IRQ lines need to be used for this SoC and the CLOCK
IRQ is not to be installed in the vector table.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Expand the babblesim tests for LE audio to verify that all the
discovery functions can be called multiple times without error.
HAS is an exception as that has an existing separate check
that disallows discovery multiple times.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The LE Audio implementations do not really support bonding yet,
and removing subs on disconnect is the most effective (and correct)
way of ensuring that we do not subscribe more than once when we
re-discover after reconnection.
The broadcast assistant and the media control client does not
support multiple connections as of this commit, so they needed
special treatment. In the case that we do discovery on multiple
ACL connections, it is important that the existing subscriptions
are removed correctly by calling bt_gatt_unsubscribe.
In order to implement this change properly on some of the clients,
thet had no proper connection references or support
for clearing the data on disconnects, they had to be updated
as well.
The csip_notify.sh test has been disabled, as that expected a
notification in the client, but since this commit removes that
(until bonding is properly supported in the clients), then the
test will fail.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Several places the LE Audio clients called bt_gatt_subscribe without
checking the return value, which could cause some issues in the worst
case, and in the best case, cause some unexpected behavior.
Some implementations had a bit more updating to handle the new
behavior.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit adds support for NXP board LPCXpresso55S69 for mbox.
- samples/drivers/mbox/ - mbox signaling mode
- samples/drivers/mbox_data/ - mbox data transfer mode
- tests/drivers/mbox/mbox_data/ - mbox test to verify functionality.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
This change makes the optional procedures in the Media Control Client
optional and configurable through Kconfig.
Signed-off-by: Ping Wang <pinw@demant.com>
Implement tests for `sched_rr_get_interval()` .
Function is actually placeholders and just return `ENOSYS`
since Zephyr does not yet support processes or process scheduling.
signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
Add test case which verifies that ICMP probing work as expected for the
DHCPv4 server. Make sure we build tests with both, probing enabled
(default) and disabled (enforced in testcase.yml) to make sure the
server is functional regardless of the probing feature.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In twister, we do not include the ZTEST testsuite as part of the
identifier, something we should start doing especially for tests with
multiple suites. The issue happens with same testcase name in different
suites, where results get messed up.
Work around this for now by making the testcase names unqiue until we
have a better solution twister.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The DMA is already enabled for this board, but updating the board doc
page to make that clear, and enabling the DMA loop_transfer test.
Signed-off-by: Derek Snell <derek.snell@nxp.com>
Some of the CSIP tests take a while to run given the number of
devices, and some of them started to fail in CI because of a
timeout, so we increase the EXECUTE_TIMEOUT a bit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
[Description]
tests: shell: Restart bt will register the same connection callback twice.
Callback next node point to itself, when link established callback function
loop infinitely.
[Fix]
Unregister the previous callback to avoid register repeatedly.
[Test]
After bt init/disable times, create connection successfully.
Signed-off-by: huajiang zheng <huajiang.zheng@nxp.com>
Where extended advertising is restablished through the use of
recycled() callback, registers over bt_conn_cb_register().
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Extend macros from creating a PM device with an optional argument
which indicate whether type of device is ISR_SAFE or not.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The get_val functions will now return -ENODATA in case that
a value isn't found, instead of 0.
This makes them more similar to the meta_get_val functions.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
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>