Commit graph

10761 commits

Author SHA1 Message Date
Jukka Rissanen
b31f1e3dc7 samples: net: gptp: Add support for running the sample X seconds
This feature is used by scripts/net/run-sample-tests.sh script
which connects the Zephyr gPTP sample to Linux gPTP daemon running
on a Docker container.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-17 12:15:37 +02:00
Hubert Miś
9ec8aec794 samples: boards: nrf: ieee802154: New serialization sample
A new sample exposing IEEE 802.15.4 radio controller using serialization
over IPM drivers.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2020-11-17 09:56:25 +01:00
Øyvind Rønningstad
cb3ec9d759 Kconfig.tfm: Improvements and fixes
Make it easier to add TF-M in an app by selecting and implying the
necessary configs so the app doesn't have to specify the configs itself.
Remove unneeded configs from the prj.conf files in the tfm samples.

Also, fix case in key file name.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-13 21:23:57 +02:00
Steven Daglish
698b0a652e sample: sensor: mcp9808: add nucleo-l031k6 overlay to samples
The Nucleo-L031K6 development board has been tested with the MCP9808
sample code and works as expected.

Signed-off-by: Steven Daglish <s.c.daglish@gmail.com>
2020-11-13 10:01:06 -06:00
Ioannis Glaropoulos
4d536647e1 samples: tfm_integration: support TF-M samples on nRF5340 DK
Add support for nRF5340 DK in the TF-M integration
samples (nrf5340dk_nrf5340_cpuappns build target).
Add the required DTS overlays needed for the samples
to build and run successfully.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-13 16:09:04 +01:00
Jukka Rissanen
8ab3dc256c samples: net: http_client: Allow Docker based testing
Add support for CONFIG_NET_SAMPLE_SEND_ITERATIONS option so that
this sample can be run multiple times against HTTP(s) server
that is running inside a Docker container.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-13 07:25:27 -05:00
Stephane Dorre
83b77bd52c samples: Adapt Pinetime sample program
Adopt latest Zephyr syntax
Improve project configuration
Improve sample code

Signed-off-by: Stephane Dorre <stephane.dorre@gmail.com>
2020-11-11 13:28:11 +01:00
Rafa Couto
ce9947c243 boards: pinetime_devkit0 basic sample.
Basic sample program that uses the one led and button from the Pinetime.
Led will turn on everytime the button is pushed.

Signed-off-by: Rafa Couto <caligari@treboada.net>
2020-11-11 13:28:11 +01:00
Brian Bradley
77be47c2fc samples: add support for shell management in mcumgr sample
The shell management feature must be enabled using the provided overlay

Signed-off-by: Brian Bradley <brian.bradley.p@gmail.com>
2020-11-11 13:17:02 +01:00
Henrik Brix Andersen
df51a8a5c7 samples: canbus: canopen: add configuration for devices with no storage
Add CANopen sample configuration file for devices with no
storage/settings support.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-11-10 15:44:25 -06:00
Andrzej Głąbek
be02edb050 drivers/flash/nrf_qspi_nor: Add support for nRF53 Series SoCs
Improve the way the nrf_qspi_nor driver configures the SCK frequency,
to properly support QSPI also on nRF53 Series SoCs that use a different
base clock frequency (96 MHz).
Add also a relevant configuration in the spi_flash sample so that it
can run on the nRF5340 DK.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-11-10 21:01:37 +02:00
Kumar Gala
5e97d779bb device: convert DEVICE_INIT to DEVICE_DEFINE or SYS_DEVICE_DEFINE
Convert handful of users of DEVICE_INIT to DEVICE_DEFINE or
SYS_DEVICE_DEFINE to allow deprecation of DEVICE_INIT.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-11-10 08:38:09 -06:00
Alexander Kozhinov
7f0d5ba652 samples: net: sockets: README.rst
change ip addresses

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-10 16:24:53 +02:00
Alexander Kozhinov
a2ca3b5ef5 samples: net: civetweb: prj.conf
change IP addresses

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-10 16:24:53 +02:00
Jordan Yates
daa783ae1a samples: Bluetooth: use indication destroy cb
Update the `peripheral` and `peripheral_ht` samples to use the
indication `destroy` callback to determine when the indication has
completed, instead of using the value callback of the first active
connection.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-11-10 11:21:46 +01:00
Jordan Yates
ffab099eb9 Bluetooth: add destroy callback to indication
Adds a `destroy` callback to the `struct bt_gatt_indicate_params` which
is used to signify to the application that the indication operation has
completed and the struct instance can be freed/destroyed.

This is required as the number of indication value callbacks that will
be triggered is not known by the caller when the `conn` parameter is
`NULL`.

Tracking when this callback should be run is mananged by a private
reference counter inside the struct.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-11-10 11:21:46 +01:00
Jordan Yates
170f17e0e7 Bluetooth: indication callback signature update
Update the signature of the `bt_gatt_indicate_func_t` callback type by
replacing the attr pointer with a pointer to the
`bt_gatt_indicate_params` struct that was used to start the indication.

This allows the callback to free the `bt_gatt_indicate_params` instance
if it was allocated from storage, while still allowing the
`bt_gatt_attr` value to be accessed through `params->attr`.

Allocating the `bt_gatt_indicate_params` instance from storage is
desirable as multiple indications can be queued, however each instance
must be valid until the callback is run.

Implements API update from #29357

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-11-10 11:21:46 +01:00
Christopher Friedt
0fc80cf79f net: dns: enable dns service discovery for mdns responder
This change enables support for DNS service discovery
(RFC 6763) in the mdns_responder service and sample app.

Fixes #29429

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-11-09 16:15:02 -08:00
Maksim Masalski
b2bd0a0608 samples: add capture output for the mec15xxevb_assy6853 pm sample
To make it runnable in the sanitycheck necessary to add
capture output, because that sample runs infinite period of time
and can not finished by itself. To avoid timeout error
in the sanitycheck I added capture output for a several times.
Also added one more tag to describe that it is a power
management sample.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-11-09 16:08:04 -06:00
Nicolas Royer
86c5cf18db samples: userspace: syscall_perf
The goal of this sample application is to measure the performance loss
when a user thread has to go through a system call compared to a
supervisor thread that calls the function directly.

Signed-off-by: Nicolas Royer <nroyer@baylibre.com>
2020-11-09 15:37:11 -05:00
Alexandre Mergnat
c9a3fca1e4 samples: userspace: hello_world
This sample print a hello world message through a user thread.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
2020-11-09 15:37:11 -05:00
Trond Einar Snekvik
ad2fd44d7a Bluetooth: Mesh: Encapsulate feature config
Moves mesh feature configuration to a separate module, deprecating the
bt_mesh_cfg_srv structure. The initial values for the features should
now be enabled through KConfig, where new config entries have been added
for each feature.

This removes the upward dependency on the config server from the core
stack, and makes the config server a pure frontend for the configuration
states, as all spec mandated behavior around the feature states is now
encapsulated.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-11-09 11:23:34 +02:00
Christopher Friedt
ec0e737b0c drivers: ieee802154: cc13xx_cc26xx: sub-ghz support
This change adds IEEE 802.15.4g (Sub GHz) support for the
cc1352r.

The 2.4 GHz radio and the Sub GHz radio are capable of
operating simultaneously.

Fixes #26315

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-11-09 10:25:24 +02:00
Robert Lubos
7127f0a742 net: lwm2m: Notify the application on network error
Add a simple backoff mechanism between consecutive registration attempts
in case of registration failures. Finally, notify the application in
case the registration failed several times.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-06 12:58:14 +01:00
Andrew Boie
7a1a0aac44 x86_64: disable shared_mem test until bugs fixed
re-enabling this test was premature, it still crashes very often
due to two known issues affecting x86 64-bit. Filter out for
every 64-bit x86 platform until those bugs are solved, which
will reduce CI failure noise.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-11-05 09:33:40 -05:00
Gerson Fernando Budke
0d216924d5 samples: net: cloud: Introduce TagoIO IoT cloud http post
Introduce TagoIO IoT Cloud HTTP post client example.  This explorer
Zephyr network resources to demonstrate an end to end application.
The TagoIO allows that any user can test on a easy way Ethernet, WIFI
and Modem (PPP) with BSD sockets.  The example provides overlays to
configure WIFI and Modem.

The application consists an a pseudo temperature sensor that sends
periodically data to TagoIO IoT Cloud platform.  The data can be
visualized on a web browser dashboard, cellphone or tablet.  The
steps to configure TagoIO are described on the example documentation.

Special Variables:
 - CONFIG_TAGOIO_DEVICE_TOKEN   DEVID  token generated by TagoIO
 - CONFIG_TAGOIO_HTTP_WIFI_SSID SSID   when using WIFI
 - CONFIG_TAGOIO_HTTP_WIFI_PSK  PASSWD when using WIFI
 - CONFIG_MODEM_GSM_UART_NAME   UART   label when using MODEM
 - CONFIG_MODEM_GSM_APN         APN    when using MODEM

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-11-04 09:06:23 +02:00
Maureen Helm
1cf89dcdfb boards: samples: Enable fat_fs sdhc sample on mm_swiftio board
Enables the fat_fs sample on the mm_swiftio board by adding a
board-specific Kconfig overlay, and adding sdhc to the list of
board-supported features.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-11-03 10:35:49 -06:00
Robert Lubos
92d94cb325 samples: net: lwm2m_client: Increase log_strdup buffer count
The sample was producing quite a few `<log_strdup alloc failed>`
warnings when running in default configuration on qemu_x86. Increase the
log_strdup buffer count to prevent that.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-03 16:24:21 +01:00
Robert Lubos
7e355bd053 samples: net: lwm2m_client: Update docs with bootstrap information
Add bootstrap section to the documentation, explaining how to configure
the Leshan Demo Bootstrap Server locally and run the sample.

Update the download link for the Leshan Demo Server, according to the
upstream Leshan documentation.

Fix bullet list with Leshan security parameters.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-03 16:24:21 +01:00
Robert Lubos
23fb69d0ac samples: net: lwm2m_client: Add bootstrap overlay file
Add overlay-bootstrap.conf which allows to easily configure the sample
to use the bootstrap server.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-03 16:24:21 +01:00
Gerson Fernando Budke
393201194e samples: net: wifi: Enable inventek es-WIFI shield tests
The es-WIFI driver is used by Inventek's es-WIFI shields. This enables
wifi sample to build all variations to ensures that dependencies are
meet.

Signed-off-by: Gerson Fernando Budke <gerson.budke@atl-electronics.com>
2020-11-03 11:05:43 +01:00
Alexander Kozhinov
a142e7b18c samples: civetweb_websocket_server: init project
initialize this project by adding corresponding project files

Signed-off-by: Alexander Kozhinov <AlexanderKozhinov@yandex.com>
2020-11-02 20:20:00 +02:00
Ryan Holleran
99530e68e5 samples: sensor: fxos8700: Add frdm_k22f as a compatible platform
The frdm_k22f has the FX0S8700CQ placed. Add the frdm_k22f to the
FXOS8700  sample application.

Signed-off-by: Ryan Holleran <rhollerar@gmail.com>
2020-11-02 10:29:41 -06:00
Henrik Brix Andersen
5803ee1e81 samples: display: cfb_custom_font: add support for ssd1306fb
Add support for the Solomon SSD1306FB device to the CFB custom font
sample.

Convert sample to use DT_LABEL() for obtaining the device label instead
of hardcoding it.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-11-02 09:40:00 +01:00
Emil Obalski
312429be3c usb: samples: Add Extension descriptor to webUSB sample.
WebUSB sample is using BOS descriptor. Because of that
the bcdUSB field of device descriptor is set to 0x0210.
This requires for the BOS descriptor to have LPM support.
LPM support use additional descriptor that the HOST can
read by requesting BOS desc. The descriptor is called
Extension descriptor and is specified in `USB Link Power
Management ECN` document considered a part of USB 2.0
spec.

This patch adds missing part of the BOS descriptor and
fixes issue with webUSB sample not passing i'LPM L1 Suspend
Resume Test' from USB3CV test tool.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-10-30 15:56:13 +01:00
Emil Obalski
7a252b90dc usb: samples: Register BOS capabilities before USB enable.
BOS descriptor capabilities shall be registered before the USB
is enabled.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-10-30 15:56:13 +01:00
Trond Einar Snekvik
bf58c4e3a8 Bluetooth: Mesh: light_vnd sample: Remove button text
Removes text from the readme of the onoff_level_lighting_vnd_app
claiming buttons control the LEDs before provisioning, as it's not
accurate.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-10-29 14:12:05 +02:00
Ehud Naim
c58c8b1257 net: buf: change avail_count variable to atomic type
using CONFIG_NET_BUF_POOL_USAGE monitor avail_count,
this variable should be protect.
Protecting it by using atomic variable

Signed-off-by: Ehud Naim <ehudn@marvell.com>
2020-10-28 18:45:11 +02:00
Simon Guinot
6499ecb179 samples: drivers: add test sample for the PWM LED driver
This sample allows to test the led-pwm driver. The first "pwm-leds"
compatible device instance found in DT is used. For each LEDs attached
to this device (child nodes) the same test pattern (described below) is
executed. The LED API functions are used to control the LEDs.

Test pattern:

For each PWM LEDs (one after the other):

- turn on
- turn off
- increase the brightness gradually up to the maximum level
- blink (0.1 sec on, 0.1 sec off)
- blink (1 sec on, 1 sec off)
- turn off

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2020-10-28 10:44:46 -05:00
Lingao Meng
5374245dd6 Bluetooth: Mesh: split prov.c into two separate modules
Currently all provisioning procedure into common source
files call `prov.c`, that will not compile separately.

Add `BT_MESH_NODE` to control whether nodes are supported
and device provisioning is supported, this will be used in
provisioner role.

Add more provisioner OOB authentication method.

Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
2020-10-28 12:53:09 +02:00
Ioannis Glaropoulos
792bec2be8 boards: arm: remove non-existing doc link from partition definitions
In the flash partition definitions for ARM boards,
the link to the legacy partition macros does not
exist any more. The commit cleans up the partition
definition by removing this link.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-27 15:01:19 -04:00
Steve Winslow
4143d79498 samples: smp: pi: Fix path in build instructions
This fixes the documentation instructions for building the SMP Pi
sample program, which incorrectly listed an underscore instead of
a path separator slash.

Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-10-26 17:25:37 +01:00
Jukka Rissanen
c0d636aedf samples: net: echo-server: Set handler thread name
It is useful to see the name of the handler thread for debugging
purposes so set it when starting the handler thread.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-10-26 11:03:03 -05:00
Andrew Boie
5376d44df7 Revert "samples: shared_mem: exclude qemu_x86_64"
This reverts commit d55a09ff05.

This is no longer necessary. The linked issue is closed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-26 12:14:12 +01:00
Andrew Boie
7e9b136aa9 samples: shared_mem: re-use default memory domain
Saves quite a bit of memory on MMU-based systems which manage
page tables at the memory domain level.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-26 12:14:12 +01:00
Andrew Boie
449278c779 samples: shared_mem: rename domain structures
Names like dom0, dom1, part0, part1, etc., don't tell us
much of anything.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-26 12:14:12 +01:00
Andrew Boie
495f1cffd5 samples: prod_consumer: re-use default mem domain
Memory domains can be very expensive to instantiate. Demonstrate
how the default memory domain can be re-purposed for an
application, much like how the main thread already is.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-10-26 12:14:12 +01:00
Siddharth Chandrasekaran
c529b6fa8f mgmt/osdp: Split CP and PD samples into dedicated directories
Split CP and PD samples into dedicated directories as the difference
between the two are expected to grow with time. Also, do some
refactoring.

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-10-21 17:36:16 +02:00
Siddharth Chandrasekaran
d6437c1aa1 mgmt/osdp: CP: Unify osdp_cp_send_cmd_*() as osdp_cp_send_command()
Minimize number of exported methods by unifying all osdp_cp_send_cmd_*()
as osdp_cp_send_command().

Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
2020-10-21 17:36:16 +02:00
Stephane D'Alu
9ee2aff917 nrf52840_mdk: support qspi flash
Added support for installed MX25R64 QSPI NOR flash.

Signed-off-by: Stephane D'Alu <sdalu@sdalu.com>
2020-10-21 17:34:26 +02:00