Fix SMP check of existing local keys when attempting to start security
with required security mode 1 level 4. The logic for checking the
conditions was wrong, leading to a situation where encryption would be
attempted to be started by the central instead of initiating a new
pairing procedure. This would fail when the connection was encrypted and
the connection would be disconnected.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This fixes sending invalid ATT Request Not Supported error code as a
response to Control Point write request.
ATT Request Not Supported error code is used to inform that
"ATT Server does not support the request received from the client",
so it should not be sent in this case.
If the requested opcode is unsupported, ASCS mandates to send ATT
Notification from Control Point with Unsupported opcode Response_Code
only. If the request received from the client is properly formatted,
ATT Write Response can be sent to complete the ATT transaction.
Fixes: ASCS/SR/SPE/BI-01-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
BT_ERR() should really be reserved for local errors only,
thus BT_WARN() is the right choice whenever a remote peer
sends something invalid that we cleanly handle.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
As per ASCS_v1.0
"A client-initiated ASE Control operation shall be defined as an
invalid length operation if the Number_of_ASEs parameter value is
less than 1".
Fixes: ASCS/SR/SPE/BI-{02,03,04,05,06}-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Activating both, the IEEE 802.15.4 raw mode /and/ the L2 mode is not
possible and in fact leads to a build error.
It should therefore not be possible to activate both options at the same
time. This is achieved by only offering the (rather exotic) raw mode
once the L2-support for the IEEE 802.15.4 has been switched off.
Fixes: #48715
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
While a previous change had already decoupled the IEEE 802.15.4 L2 from
IP upper layers, this only worked when at least one other interface of
the device supported IP.
This change removes this requirement and thereby fixes a build error
that occurred when disabling IP support while maintaining IEEE 802.15.4
L2 support.
Fixes: #48718
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
ZEPHYR_SDK_INSTALL_DIR is set from the env if it is not passed
explicitly to cmake, but one usage was reading directly from the env,
not allowing passing the var to cmake instead.
Change find_package of Zephyr-sdk to read from cmake var not env var.
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Add a note about changing LEGACY_INCLUDE_PATH default value, add a note
about the option being removed after two major releases, in 3.4.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Clear pointer to the le_adv_recv() stack frame before returning to the
calling function. This fixes a potential compiler warning newer gcc
versions.
zephyr/subsys/bluetooth/host/scan.c: In function ‘le_adv_recv’:
zephyr/subsys/bluetooth/host/scan.c:463:20: error: storing the address
of local variable ‘id_addr’ in ‘*info.addr’ [-Werror=dangling-pointer=]
463 | info->addr = &id_addr;
| ~~~~~~~~~~~^~~~~~~~~~
zephyr/subsys/bluetooth/host/scan.c:439:22: note: ‘id_addr’ declared here
439 | bt_addr_le_t id_addr;
| ^~~~~~~
Fixes#48459
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Enabled Multiple Notifications and added command for
bt_gatt_notify_multiple().
Increased possible number of connections to execute GATT/SR/GAN/BV-02-C
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
Replicate the devicetree dependencies into a sorted list. This ensures
that the structures added to the .__device_handles_pass2 section are
reproducible from build to build.
Tested with: west build -b native_posix tests/drivers/build_all/sensor
Without this change, two consecutive builds do not compare.
Signed-off-by: Keith Short <keithshort@google.com>
pylink 0.14.0 changed the class variable where JLink DLL library name
(libjlinkarm) is stored. This patch adds support for new pylink
libraries while keeping backwards compatibility.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This driver can't be compiled on all platforms as it's a NXP specific
driver (requires NXP HAL). Because spi.dtsi file is used by app.overlay
(and so enabled in multiple configs, including native_posix) it needs to
be removed. Note that MCR20A driver is already covered by the
ieee802154.build.mcr20a test case, which runs specifically on a NXP
board.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
All IEEE 802.15.4 drivers are now automatically enabled if they are
'okay' in DT and all of its dependencies are 'y', including
CONFIG_IEEE802154. This means individual driver enablement is not
necessary anymore in Kconfig.defconfig files or samples/tests. Boards
need to still make sure any dependencies are enabled, e.g. SPI bus in
some cases.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Previous to this change, each individual driver option depended on
NETWORKING. Instead, move dependency one level up.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Make all drivers default to 'y' and dependent on being enabled in DT.
This will allow simplifying many samples/tests.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
According to the board porting guidelines, boards should "leave
peripherals and their drivers disabled by default". In Zephyr we
tipically enable GPIO and SERIAL, as they are virtually required by all
samples/tests in tree. However, for the rest of peripherals it is up to
the application/test to enable the necessary driver classes. It is also
useful that board's Kconfig.defconfig enables certain driver peripherals
based on a condition, e.g. enable I2C if SENSOR=y.
Ref. https://docs.zephyrproject.org/latest/hardware/porting/
board_porting.html#general-recommendations
This patch removes the following driver classes from defconfig files:
- CONFIG_ADC
- CONFIG_COUNTER
- CONFIG_EEPROM
- CONFIG_ENTROPY
- CONFIG_ESPI
- CONFIG_HWINFO
- CONFIG_I2C
- CONFIG_LED
- CONFIG_NETWORKING
- CONFIG_PS2
- CONFIG_PWM
- CONFIG_SENSOR
- CONFIG_SPI
- CONFIG_SPI_SLAVE
- CONFIG_WATCHDOG
Note that a previous attempt was done in #38510.
Fixes#30694
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The magic_want sample requires I2C bus to be enabled (used sensor is
connected to the bus).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Set the ESPI_PERIPHERAL_UART_SOC_MAPPING default value to 1 in
Kconfig.defconfig, only if ESPI=y.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This board has no devices connected to the I2C bus, so there's no need
to customize init priorities at the board level.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
In this board I2C is required to talk to a GPIO expander (PCA95XX). By
default I2C devices are initialized with KERNEL_INIT_PRIORITY_DEVICE
(set to 50), and the PCA95XX driver is initialized with priority 70.
This means that there is no need to customize I2C priority as it will
always come before.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Counter devices are now initialized with priority 60 by default, which
guarantees it will come after I2C (50).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Some counter devices depend on buses (e.g. I2C for Maxim DS3231). Bus
devices are tipically initialized with KERNEL_INIT_PRIORITY_DEVICE as
well, so there's no guarantee counter will be initialized be initialized
before without manually tweaking priorities.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Let's switch to the LOG_DBG for +CREG, +CESQ and +CSQ
AT commands responses because they flood the console so much.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
COUNTER_RTC_STM32 used to be enabled directly based on COUNTER status.
This should not be the case anymore as we should first check
DT_HAS_ST_STM32_RTC_ENABLED status (which is already done in
drivers/counter/Kconfig.stm32_rtc).
Remove these 3 lines that are not correct anymore.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In some arm64 boards, MMU regions are set so userspace can access all
peripherals (MT_P_RW_U_RW), including the GIC.
This seems like a mistake, which has been copy/pasted in some boards.
Change this to no userspace access by default (MT_P_RW_U_NA),
like the other boards.
Signed-off-by: Henri Xavier <datacomos@huawei.com>
If assert triggers, display the current state in order not
to confuse assert message reader.
Same logic is used for following asserts.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Fixes#46324
Set dummy_thread->base.slice_ticks to 0 when
CONFIG_TIMESLICE_PER_THREAD is set. To avoid
_current_cpu->slice_ticks be a big number.
Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
The elf_parser library now generates a dot file with device dependencies
that can be later rendered using Graphviz. Each node in the diagram
contains the device label (taken from DT node). In some cases the label
property can be None, leading to build failures like:
```
line 273, in device_dependency_graph
text = '{:s}\\nOrdinal: {:d} | Handle: {:d}\\n{:s}'.format(
TypeError: unsupported format string passed to NoneType.__format__
```
This patch switches to node name instead, which will always be set to
some value. This value is actually what devices get now as a name if
they do not have a label set.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This macro compares two integers from 0 to 255 at compile time, using
the preprocessor.
Signed-off-by: Kumar Gala <galak@kernel.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This is temporary until support has been enabled. lpc55s36's IAP controller
is different and does not match previous implementations.
The Zephyr driver uses a data structure matching the IAP controller to
implement a feature that should normally come out of the ROM.
Since IAP support is not in yet, disabling the option in the SoC's Kconfig
and disabling the node in the device tree is the proper way to go forward.
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>