Commit adds experimental support mbedtls psa as crypto
backend for ble mesh. It were run only on bsim tests.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit gets rid of host dependency to generate DH key.
Mesh uses its own function for it that has synchronous
behavior and correct endianism. It simplifies the provisioning
state machine since it doesn't require waiting for the host HCI
handler.
Also, it removes hidden cross-dependency between BLE Mesh and
SMP in the aspect of competition for the same DH key
(https://github.com/zephyrproject-rtos/zephyr/issues/23292)
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit splits mesh crypto module on security library dependent
and independent parts.
Independent part includes security toolbox implementation.
Dependent part includes security algorithms usage based on
API third party security library.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Introduce dedicated init priority for AT2X EEPROMs connected via
I2C or SPI to ensure they are initialized after I2C/SPI by default.
Signed-off-by: Martin Jäger <martin@libre.solar>
Calls put instead of unref on net contexts
in the socket accept function.
Mere unref didn't subtract the reference
count of net context which leaves
it in used state. This situation happens
in case of accepting already
closed connection.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
`bt_conn_le_create` returns a signed value. Error message format string
expects an unsigned value.
This commit changes the expected value in the format string to a signed
one, to match what `bt_conn_le_create` returns.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The power off sequence in cavs is meant to be used only by custom pm
policy handler thus guard it with proper ifdefs.
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
The `main` function now returns `int` instead of `void` and therefore
must return a value.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
The `main` function now returns `int` instead of `void` and therefore
any return statements inside it must return a value.
Note that any return values other than 0 are currently reserved.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
There is currently not an in-tree Zephyr board which enables the
i2c_xilinx_axi driver as part of its standard configuration. (It can be
enabled fairly easily with the Digilent Arty board, but that requires
modifying the ARM-provided FPGA block design in Vivado and rebuilding
the FPGA image, so it cannot be used with the default FPGA image.)
Add a build_all target to provide build coverage for this driver.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Add a driver to support the Xilinx AXI IIC Bus Interface logic core, as
described in Xilinx document PG090. This can be configured for use on
most Xilinx FPGA-based platforms such as the Digilent Arty.
Both the 2.00a and 2.1 versions of the core are supported. The 2.00a
revision has a bug causing dynamic read mode to not be reliable. With
this version of the core the driver falls back to reading only 1 byte
per interrupt.
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Added a feature of socket connect
being asynchronous. If socket is set
to nonblock with O_NONBLOCK flag,
then connect() is non-blocking aswell.
App can normally poll the socket to
test when the connection is established.
Signed-off-by: Daniel Nejezchleb <dnejezchleb@hwg.cz>
Add clock_control_get_status checks to the stm32_common_devices adc
and i2c tests, to verify that checking the status of gating clocks and
domain clock sources works.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The get_status api allows to query whether clock is turned on or off.
Like the get_rate call, the status of gated clocks (for specific
peripherals), as well as domain clock sources(HSE, PCLK, PLL_P,..)
can be checked this way.
Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
The transfer completion callback does not provide a way to pass
transfer status to the transfer submitter.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This reverts commit cd7461495f,
introduced to fix possible deadlock as result of changes in
commit f206170c65
("usb: device: Do not call callback when transfer is cancelled")
which is now reverted.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This reverts commit f206170c65
introduced as workaround for nRF USBD device controller in PR
https://github.com/zephyrproject-rtos/zephyr/pull/16193.
This commit may be reverted due to changes made in
commit e326c58399
("usb: device: Do not cancel transfers on suspend").
Signed-off-by: Nickolas Lapp <nickolaslapp@gmail.com>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This is a follow-up to commit 9fa35bc9a0.
Align specification of the expected console output with the changes
done to the sample in the above commit.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Fix Advertising PDU size calculation when direction finding
feature is enabled and PDU fragment count includes the
maximum CTE PDU chained. Fix removes redundant PDU count
included for Extended Advertising. Only Periodic advertising
PDUs chain CTE requires number of additional PDUs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Move the Segger RTT module Kconfig to modules/segger/kconfig. The Segger
debug library is not a driver and should not reside under drivers/debug.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When using the toolchain C library, that must be added to the link command
after all other libraries and modules in the system to resolve undefined
symbols.
Signed-off-by: Keith Packard <keithp@keithp.com>
This function allows subsystems to define libraries which get added to the
link command after all other libraries and modules. It's useful when using
a toolchain library, like libc or libgcc, as those can get added when
processing the 'lib' directory, before any module libraries and hence might
not get used to resolve symbols from modules.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add a set of macros that can be utilized for any type and redefine
the struct macros to utilize these macros. While the majority of
uses for iterable sections are for structs, there are some cases
where the elements of the section might be a union or some other
type.
Also added <STRUCT|TYPE>_SECTION_<START|END>_EXTERN helper macros to
give a common means to handle setting externs in rare case they
are needed.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
The HW models now include the temperature sensor,
let's stop excluding it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update to the latest HW models which include models
of the TEMP peripheral
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The ISR prototype was changed some time ago
(6df8b3995e)
to (const void*) => fix isr function definition
to avoid a compile warning.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Two minor fixes:
* The wait time mention in the description was wrong.
* The possible argument passed to the scripts is meant to target the
phy itself, but it was sent to the channel library.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Test scripts need to have executable permissions.
Otherwise, run_parallel will change the mode in CI,
and users need to set them locally which results
in a not clean git workspace.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Avoid hitting the assert
```
__ASSERT_NO_MSG(net_buf_simple_tailroom(buf) >= len);
```
when the provided buffer is longer than we can fit. Instead discard the
packet and log an error.
This handling is similar to packets are discarded in hci_uart
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
When ISO Central is enabled it is allowed to configure many CISes at
once. For this a large command buffer is needed. This is also tested
by HCI/CIS/BI-05-C.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Fixes#56657, incorrect TCP MSS calculation for IPv6.
Previously the supported MSS would incorrectly returned as the MTU if it
was less than the MTU, probably to account for the case where
the network interface MTU check returns 0.
New behaviour is to return the supported MSS as MTU minus header length,
using default MTU for this calculation if network interface MTU check
returns 0.
Signed-off-by: Kenny Johansson <wirehell@gmail.com>
Set explicit loopback MTU for TCP tests for clarity,
and to avoid breaking tests if changed elsewhere.
Signed-off-by: Kenny Johansson <wirehell@gmail.com>
Fixes two problems:
1. bad argument type, leading to wrong test vector values
2. The central side was not verifying the type of the scan report. When
running with a different controller, it was then too quick to stop the
scanner, before the peripheral had received a scan request.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The EDTT bridge use was removed in e20862f0e8
Now the EDTT bsim transport connects directly to the simulated
devices.
So let's change the code and comments accordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add the header file required for the example to work. Users get the
following error due to unresolved INPUT_BTN_* values otherwise:
parse error: expected number or parenthesized expression
Signed-off-by: Amit Kucheria <amitk@kernel.org>
Signed-off-by: Amit Kucheria <amit@mbedrock.com>
These tests stop BLOB Transfer after BLOB Server reaches every phase
by rebooting devices. After restart, Server recovers transfer and client
continues to the next one. On second pass, Server stops after first
block completes and suspends itself, and after reboot continues to
completion.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
If device running BLOB Server called `bt_mesh_blob_srv_recv`,
but rebooted before it received `XFER_START` message from BLOB Client,
it was wrongly "recovered" into Suspended phase, which would lead to
Server try to resume transfer on `XFER_START`. It would not be possible,
because `srv->state.xfer` was not set with acual values yet.
Set phase again to BT_MESH_BLOB_XFER_PHASE_WAITING_FOR_START, which will
allow to accept new transfer.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
use hwinfo_get_reset_cause() instead of LL_PWR_IsActiveFlag_SB()
remove LL_PWR_ClearFlag_WU() not mandatory
Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>