Commit graph

10700 commits

Author SHA1 Message Date
Robert Lubos
3e5b878102 samples: net: lwm2m_client: Remove unneeded Security object instance
The second Security object instance for bootstrap case isn't really
needed, as the bootstrap server creates own Security object instances
anyway. As that object instance had no Short Server ID assigned, it
caused failures during bootstrap discovery.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-09-10 11:43:18 +02:00
Benjamin Cabé
25fa25a5a9 doc: :zephyr-app: should point to existing in-tree folders
As there is no check (yet!) in the directive, many
.. zephyr-app-commands:: in the documentation are pointing to
non-existing sample applications, which is problematic for users who
typically expect to just copy-paste the commands and have them work.

This commit fixes all offending references to point to existing samples,
or converts them to simple ":app:" instead of ":zephyr-app:" when the
intent wasn't to refer to in-tree samples.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-09 13:53:47 -04:00
Emil Gydesen
fa0bbad205 tests: Bluetooth: Run Audio BSIM test on nrf5340bsim
Add support for running the audio BSIM tests on the
nrf5340bsim board.

This expands the tests we run in CI.

To support all tests with the hci_ipc sample for the netcore,
it is updated to support a bit more while still fitting on the
netcore on the nRF5340 series.

The behavior of advertisement seems to differ a little bit,
which required the bap_unicast_server_test.c to update how it
restarts advertisements.

Two broadcast tests that are passing on the nRF52 BSIM is also
failing due an assert. This should be investigated at a later
time.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-09 15:23:57 +03:00
Anas Nashif
f519dd1411 arch: arm: replace PLATFORM_SPECIFIC_INIT with PLATFORM_RESET_HOOK
Use generic hook infrastrucutre instead of custom Kconfig and hooks for
ARM.

Replace z_arm_platform_init() with platform_reset().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-09 10:07:33 +02:00
Henrik Brix Andersen
159f7dbbb1 lib: net_buf: rename header file from zephyr/net/buf.h to zephyr/net_buf.h
Move the network buffer header file from zephyr/net/buf.h to
zephyr/net_buf.h as the implementation now lives outside of the networking
subsystem.

Add (deprecated) zephyr/net/buf.h header to maintain compatibility with old
file path.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-09-07 11:19:05 -05:00
Mahesh Mahadevan
cfc010ff4e samples: sensor/mcux_lpcmp: Overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
f34c78535f samples: adc_dt: Add overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Mahesh Mahadevan
bc5c075953 samples: dac: Add overlay for FRDM MCXN947 qspi variant
- Add overlay for the FRDM MCXN947 qspi variant
- Fix the overlay file name for the default variant

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-09-06 18:01:43 -04:00
Krzysztof Chruściński
8d08a7a90d samples: boards: nrf: nrf_coresight_stm: Add new configurations
Add standalone STM configuration to the sample.

Add configuration which instead of STM uses local UART for logging.
This configuration can be used to compare performance and flash
usage for various logging modes.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Krzysztof Chruściński
ddb66e5b63 samples: boards: nrf: Add sample using Coresight STM on nrf54h20
Add sample that demonstrates logging using Coresight STM and ETR buffer
handled by the application core. Application is using sysbuild and 2
cores: cpuapp and cpurad. cpuapp is logging to STM and handling ETR buffer
where data from STM is collected and cpurad is only logging to STM.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-06 11:31:27 -04:00
Chaim Zax
f54a53b4b3 drivers: ws2812_gpio: Make timing configurable and less hardware dependend
The current driver contains assembly code which is specific for the nRF51
SOC which makes it incompatible with other SOC's. This patch adds support
for other nRF SOC's as well. The timing is calucated based on the CPU clock
frequency, but can be configured manually as well if needed.

Changes have been verified on a Adafruit Feather nRF52840 Express board,
which contains a single NeoPixel RGB LED. Timings have been verified using
a scope connected to the WS1812 data line.

Signed-off-by: Chaim Zax <chaim.zax@zaxx.pro>
2024-09-06 11:31:00 -04:00
Muhammad Haziq
91b688a666 driver: wifi: esp32: add APSTA support
The ESP32 Wi-Fi driver previously did not support APSTA mode,
enabling AP mode would disable STA mode and vice versa.
Support for APSTA has been added by introducing additional
network interface: one for STA (Interface 2) and one for
AP (Interface 1). The CONFIG_ESP32_WIFI_AP_STA_MODE option in
Kconfig now allows enabling or disabling this support.

Signed-off-by: Muhammad Haziq <muhammad.haziq@zintechnologies.com>
2024-09-06 11:28:15 -04:00
Jukka Rissanen
5e7d730274 samples: net: http_server: Create service binding to all addresses
Allow user to listen all IP addresses instead of hard coded one.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-09-06 09:58:50 -05:00
Benjamin Cabé
34982bb00b doc: samples: use :zephyr-app: for in-tree samples
The zephyr-app-commands directive can output a helpful hint to the user
when they are trying to build a sample that is in the Zephyr tree,
telling them to ensure they are in the root folder of the Zephyr repo.

Update all doc pages that were using :app: instead of :zephyr-app: so
that the hint is displayed.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:18:05 -04:00
Benjamin Cabé
0d25e30de6 samples: subsys: use zephyr:code-sample directive
Adds missing code-sample directive to the remaining samples in
`samples/subsys` that didn't use it yet in preparation for upcoming
changes to the Zephyr documentation that will be leveraging the provided
description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 17:13:17 -04:00
Santosh Male
36a7a12c4e Samples: Enabled Network Shell with XGMAC ethernet.
Enabled Network shell and Ethernet L2 interface
with XGMAC driver in CLI application
Enabled MDIO shelll with dwcxgmac mdio driver.
Enabled TCP and  UDP over IPV4.

Added intel_socfpga socdk support for echo_client and
echo_server sample applications.

Signed-off-by: Santosh Male <santosh.male@intel.com>
2024-09-05 17:03:05 -04:00
Andrzej Głąbek
0898764d31 samples: boards: nrf: Add nrf2_clock_control sample
Add a sample that presents how the custom nrf2_clock_control API
introduced for nRF54H20 can be used for the various clocks which
are supported by it.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-09-05 17:00:24 -04:00
Benjamin Cabé
d1858d2074 samples: bluetooth: Use "Bluetooth LE" terminology
Replace occurrences of "BLE" by the recommended "Bluetooth LE" term.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
Benjamin Cabé
d23d19d7f0 samples: bluetooth: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 16:58:32 -04:00
Florian Grandel
2d8b272ab5 tools: net-tools: place net-tools inside tools
Updates references to the net-tools project  to refer to the correct
placement of net-tools under tools.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-09-05 12:34:09 -05:00
Jakub Michalski
5b1f6f3004 samples: add bootargs sample
Add bootargs sample

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2024-09-05 12:30:39 -05:00
Emil Gydesen
57b35e1047 Bluetooth: TBS: Allow multiple callbacks for client
The TBS client callbacks are just informative so we
provide the information to multiple listeners.

To support this for the long strings, the function
handle_string_long_read was refactored.

This also allows for multiple users of the TBS client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-05 12:24:47 +01:00
Benjamin Cabé
55d9d1c6ba samples: led: consolidate LED samples under same directory
With over a dozen LED samples, grouping them in a common drivers/led/
folder helps keep things tidy and lays the groundwork for further
improvements in the way samples are showing up in the docs.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-05 09:49:52 +02:00
Anas Nashif
82613fba11 doc: fix trivial typo
fix 'be build' and replace with 'be built'.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-05 09:49:18 +02:00
Tomi Fontanilles
17545c17a5 dts: arm: st: h7: fix flash on M4 board targets
The flash controller is nowadays supported on the M4 core.
Add the bank2-flash-size property to the board definitions as required
by the STM32 H7 flash driver.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-09-04 19:10:19 -04:00
Anas Nashif
8538c4ae33 sample: uart passthrough: fix filtering and twister file
sample.yml is wrong and was not scanned. Also fix filters in the file so
it can build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Anas Nashif
bbb63d8aca sample: sip_svc: fix filter and printk formatting
Rename sample.yml and fix build and filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-04 21:27:37 +02:00
Lucien Zhao
c5dd2c2a84 samples: sensor: mcux_acmp: add case support for RT1180-EVK
Use gpio_ad_01_acmp1_in2 as ACMP1_IN2, test case can be captured
in J45-13.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Benjamin Cabé
ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00
Tomasz Moń
aa6319dcfd usb: device_next: msc: Allow user to sort LUNs
Modify USBD_DEFINE_MSC_LUN() to take in separate id by which the LUNs
are sorted. Previously the disk name itself was implicitly used as a
sorting key. This is a breaking change to Experimental API.

Another advantage of splitting the sorting id from disk name is the
ability to use KConfig symbols as disk name. Currently the MMC disk
driver uses KConfig symbol CONFIG_MMC_VOLUME_NAME.

Mark LUN definitions as static const because the LUNs are ending up in
ITERABLE_SECTION_ROM().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-09-04 07:03:06 -04:00
Qiankun Li
f44146a6cd samples: net: wifi: boards: rdrw612bga: Modify CONFIG_POSIX_MAX_FDS config.
[Reproduce issue]
1. Connect In-STA to Ex-AP
   wifi connect WiFi_STA_HE_1.1.8 1234567890 3 2 2

2. Start APUT with ACS using below commands
   wifi ap enable nxp-AP 161 1234567890 3

3. Connect Ex-STA to APUT and verify association using ping traffic

4. Now start two TCP server
  zperf tcp download -I ml 5001 192.168.0.252
  zperf tcp download -I up 6002 192.168.10.1

Observed behavior:
=============

Second TCP server fails to start

[Analysis]
1. After starting uap and a tcp server,
   there is only one allocatable fd resource
   left in the fdtable.
2. When two TCP clients try to establish a connection
   with the server at the same time, the second client
   cannot be assigned an fd, resulting in a failure.

[Fix]
Increase the maximum number of open file descriptors.

Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
2024-09-02 12:33:50 -04:00
Guennadi Liakhovetski
19ccec6a03 llext: use EXPORT_SYMBOL() universally
Replace LL_EXTENSION_SYMBOL() with EXPORT_SYMBOL() in all tests and
samples.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-09-02 12:31:52 -04:00
Chaitanya Tata
d1e700e9d8 samples: wifi: Add nRF70 tests to twister
Now that we have a build only mode, this ensures that nRF Wi-Fi driver
builds.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-09-02 12:31:06 -04:00
Nazar Palamar
120274b0b6 Bluetooth: Samples: periodical_adv_rps: Added sync wait delay
Problem:
on cyw208xx devices i see sometime `Timed out while synchronizing`
error in samples periodical_adv_rps/periodical_sync_rps.

log:
<err> bt_scan: Could not lookup connection handle from PAST
<err> bt_scan: Unknown handle 0x0000 for periodic advertising report
Timed out while synchronizing
...

After investigation i can confirm, the sync was created successful,
but in application (periodical_sync_rsp) terminated the sync when the
connection is not valid.

periodical_adv_rps doesn't have any mechanism to wait for sync and after
gatt write (subevent, response_slot information) it immediately
performs disconnection.

Solution:
Added sync wait delay before make disconnection, to ensure sync
is established before disconnection.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Nazar Palamar
b8690f7ea4 Bluetooth: Samples: update response_cb in periodical_adv_rps
Remove print "Failed to receive response...", if receive
BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED.

Problem: with cyw920829m2evk_02 device periodic_adv_rsp returns
multiple messages  “Failed to receive response….” in the terminal
log.

This happens because controller generates
HCI LE Periodic Advertising Response Report event for each
RspSlot. Because no RSP_DATA is observed in the OTA, which
is no scan device to transmit RSP_DATA, no RSP_DATA can be
received. Therefore, Data Status is 0xFF in all of these events,
which finally cause the messages  “Failed to receive response….”

Data_Status = 0xFF is expected because nothing is received
for that Rsp Slot.

Per spec, it’s not mandatory to generate these events,
So another vendors (e.g. Nordic)  might skip the HCI event
generation if Data_Status = 0xFF.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-09-02 11:58:18 +02:00
Thomas Stranger
d09e1d6e8f samples: boards: stm32: backup_sram: add magic value
Stores a magic value togetter with the counter value, and resets the
counter in case that magic does not match.
A small magic value is not ideal, but should be good enough for the
sample and avoids pulling in a additional dependency e.g. on crc.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-09-02 11:52:03 +02:00
Benjamin Cabé
f6c232ec2e samples: modules: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Also fixed a couple invalid or missing table of contents to have
proper document hierarchy.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-02 11:51:37 +02:00
Emil Gydesen
0f5d0f3555 samples: Bluetooth: ISO: Rename ISO central and peripheral
The samples had a _iso suffix, but the other ISO samples
prefix iso_.

Renames the central and peripheral sample so that they
prefix iso_ rather than suffix _iso.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-02 09:06:18 +02:00
Benjamin Cabé
7cf124b4a9 samples: sensors: drop ti_hdc sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
6a5428b751 samples: sensors: drop ens210 sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
e59c38fb6f samples: sensors: drop dps310 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
7147b344a6 samples: sensors: drop dht sample as a more generic one exists
This sample adds no value compared to generic_dht_polling or
sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé
5f65b30117 samples: sensors: drop bme680 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Joerg Hofrichter
1540bd7d49 samples: modules: nanopb: display buffer content of correct size
With commit ad242b9, the buffer size was made configurable. Hence, the
corresponding definition CONFIG_SAMPLE_BUFFER_SIZE has to be used when
filling and displaying the buffer.

Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
2024-08-30 11:58:50 -04:00
Vinayak Kariappa Chettimada
4fb293224c samples: Bluetooth: hci_uart: Add preliminary DF support for nrf54l15pdk
Add preliminary direction finding support building hci_uart
sample for nrf54l15pdk.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-30 11:47:15 -04:00
Marcin Wierzbicki
bebabc775b samples: adc: Add overlay for UCANS32K1SIC
New file with ADC configuration for UCANS32K1SIC evb.
Add ucans32k1sic_s32k146 to platform_allow.

Signed-off-by: Marcin Wierzbicki <marcin.wierzbicki@accenture.com>
2024-08-30 11:47:07 -04:00
Richard Wheatley
725f084e09 tests: drivers: adc: adc_api: boards: add conf file
Add configuration file to adc_api test and adc sample

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-30 11:46:56 -04:00
Luca Burelli
f889c4e288 samples/llext/modules: sample.yaml fixes
Apply cleanups suggested by Anas in a Github discussion to the
sample.yaml file.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Luca Burelli
030c1c8308 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00
Emil Gydesen
494f88070f samples: Bluetooth: Add streaming callback for unicast server
The unicast server now prints when a steam enters the streaming
state.

This commit also slightly increases the metadata size to increase
interoperability with other devices such as Android.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-30 09:09:44 +02:00