Add configuration for creating composite USB device with CDC ACM and
Mass Storage functions.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
New shell does not need either CONFIG_UART_CONSOLE
or interrupts support to be working. Only CONFIG_SERIAL
in combination with CONFIG_UART_SHELL_ON_DEV_NAME are required.
Updated sample yaml file accordingly.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As we are removing net_app and net_pkt based libraries and
applications, CoAP legacy based libraries and apps are moved
to socket based implementations. So removing legacy CoAP.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit fixes the following issues introduced when switching to
the new SPI API in commit e7de85b534:
- the SPI slave operating mode (and support for it) was not properly
selected (the setting was missing in the sample probably because
the old nRF SPI slave driver used in this sample was not checking
the requested mode at all)
- the `txmsg` buffer filled with 0xFF values in the `bt_tx_thread`
function was improperly used afterwards in `spi_send` to transmit
the slave header frame
- the common structures defining buffers for SPI transactions (`tx`
and `rx`) were modified in `spi_send` before the corresponding
semaphore was taken, resulting in data corruption
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Convert the hci_spi sample to get the SPI and GPIO settings from Device
Tree instead of Kconfig.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sample was defining a #define with a CONFIG_ prefix but this wasn't
coming from Kconfig. Change the define name not to conflict with the
Kconfig CONFIG_ namespace.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
As we want to remove dts dependency on Kconfig, we had a case based on
CONFIG_BOOTLOADER_MCUBOOT. From a DTS point of view that was just
getting the chosen property 'zephyr,code-partition' set. We can easily
move this to the actual dts files and remove the mcuboot.overlay.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
gpio_port_* functions are being deprecated. Convert boards/altera_max10
sample to use gpio_pin_* functions instead.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
If status is 0, both ip_hdr and proto_hdr will own a pointer to the
relevant IP and Protocol headers. In order to know which of ipv4/ipv6
and udp/tcp one will need to use respectively net_pkt_family(pkt) and
net_context_get_ip_proto(context).
Having access to those headers directly, many callbacks will not need
to parse the packet again no get the src/dst addresses or the src/dst
ports. This will be change after this commit.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use auto-generated device tree macros in LPS25HB driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LSM6DS0 driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
As example of echo_async_select added recently shows, we no longer
need to define a logger unconditionally in each source file. These
samples are intended to show Zephyr compatibility with POSIX sockets
API, so the less there're differences between Zephyr vs POSIX
ifdefs, the better.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The LwM2M library has moved from the network application library
APIs to BSD socket APIs. Let's make the needed changes in the
LwM2M sample to follow those changes.
Signed-off-by: Michael Scott <mike@foundries.io>
Now that the security data can be loaded into and used from the
security / server objects, we can add support for LwM2M bootstrap.
This is a mode where initially a connection can be made to a server
which can update several LwM2M (including security and server
data) and then trigger a "bootstrap complete". Once this happens
the client will start it's connection process over but now with
the new information.
Signed-off-by: Michael Scott <mike@foundries.io>
In order to support bootstrap mode, we need to store server data
in the security / server objects. Once the connection to the
bootstrap server is made, it will clear these objects and add
new server connection data.
Signed-off-by: Michael Scott <mike@foundries.io>
As part of the migration from net_app APIs to socket APIs, let's
stop referencing the net_pkt fragments throughout the LwM2M library.
Establish a msg_data flat buffer inside lwm2m_message and use that
instead.
NOTE: As a part of this change we remove the COAP_NET_PKT setting.
The COAP library reverts to COAP_SOCK behavior.
This doesn't mean we use sockets in LwM2M (yet), it only means we
use the socket-compatible COAP library which parses flat buffers
instead of net_pkt fragments.
Signed-off-by: Michael Scott <mike@foundries.io>
Currently, this will select the needed configs for LwM2M and net_pkt.
During the migration to socket APIs, the net_pkt selections will change
to socket-based selects.
Signed-off-by: Michael Scott <mike@foundries.io>
As the net-app based echo samples are being removed, there's no use
referencing them any longer in their socket counterparts.
Additionally, overlay configuration descriptions were added in the
same manner original samples did.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The removed test does the same thing and runs on the same platforms
as already existing samples/boards/nrf52/power_mgr.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit updates the README and sample.yaml in order to signal
that this demo works flawlessly on the nRF51 platform.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
This commit updates the power management sample in order to use
new features introduced by recent changes in the Zehyr Power
Management subsystem. Now, it shows how to use power management
policies as well as how to implement custom power modes.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Since the lp3943 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since the pca9633 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since the lp5562 led driver still supports both DTS and non-DTS
configuration, we update the code to use DT_<COMPAT>_<INSTANCE>
defines for the CONFIG_HAS_DTS_I2C case.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds support in the sample to deal with the case when TLS
is offloaded and mbedtls is not necessary.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
This commit adds the necessary changes to allow the mqtt_publisher
sample to run on cc3220sf_launchxl.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The original SNTP client library was designed for the net-app API, for
which it makes sense to have a callback function, which is called
asynchronously when an answer is received.
For the socket based interface, the callback is called just before
sntp_request() returns. It gets the status and the epoch_time in
parameter, however the status is already returned by sntp_request(). It
therefore make sense to replace the callback function by a pointer to
epoch_time.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
There are no longer per-partition initialization functions.
Instead, we iterate over all of them at boot to set up the
derived k_mem_partitions properly.
Some ARC-specific hacks that should never have been applied
have been removed from the userspace test.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Don't include net_app.h and net_buf.h, the first is deprecated, the
latter is low-level header, both shouldn't be used for socket apps.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Fixes the adt7420 sensor sample to fail gracefully if the sensor device
is not found and asserts are not enabled.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The public APIs for application shared memory are now
properly documented and conform to zephyr naming
conventions.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The v2018.10 release of OpenAMP reworks the API set and splits the
remoteproc vs rpmsg interfaces so one can use rpmsg without remoteproc.
This helps drastically reduce the code footprint utilized by OpenAMP.
The remote see around 4k reduction in code size.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If Client send transition time values as 0x40 or 0x80 or 0xC0 then
this was cause the behind divide by zero exception during calculation
of transition->counter. This PR will solve this bug.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed foreground command functionality from shell source files.
Removed associated example.
Removed enter/exit command functions from the Bluetooth example
Updated project config files.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The WNC-M14A2A modem is supposed to use HW flow control on the UART
connected to the MCU. In the past, we were able to bypass this
requirement by using only the LTE-M firmware which supported pulling
the CTS line high via "send-ok" gpio.
This does NOT work for the LTE firmware.
Now that MCUX UART driver supports hw-flow-control setting, let's use
it in the modem overlay so that regardless of modem firmware
(LTE vs. LTE-M) the sample will "just work".
Signed-off-by: Michael Scott <mike@foundries.io>
CONFIG_NET_CONTEXT_NET_PKT_POOL is used by Zephyr's TCP stack as
a way of keeping the original packet data when compression and
other l2 specific actions make the data unusable for retries.
LwM2M uses UDP and this option was never used.
Signed-off-by: Michael Scott <mike@foundries.io>
Convert ssd1306 display driver to use new defines so we can remove
the dts_fixup.h code for it. Also dropped "-i2c" from compatible.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert ssd1673 display driver to use new defines so we can remove
the dts_fixup.h code for it. Also dropped "-spi" from compatible.
Fix up references in reel_board dts and sample.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The app shared memory macros for declaring domains provide
no value, despite the stated intentions.
Just declare memory domains using the standard APIs for it.
To support this, symbols declared for app shared memory
partitions now are struct k_mem_partition, which can be
passed to the k_mem_domain APIs as normal, instead of the
app_region structs which are of no interest to the end
user.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Convert the lpd880x driver to use device tree and new DT_<COMPAT>
defines. Support both LPD8803 & LPD8806 device tree compats.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
SNTP client sample requests time sync on IPv4 and IPv6 addresses
using socket based SNTP client library.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
As networking libraries and protocols are moving to socket
based implementation, reworked SNTP client library to use sockets.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
We have now two code samples available for ArgonKey board:
1. sensors sample, fetching data from accel/gyro/mag,
barometer, humidity and proximity sensors
2. microphone sample, acquiring 5s audio @16KHz from the
on-board microphone.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LIS3MDL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LIS2MDL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Use auto-generated device tree macros in LSM6DSL driver to avoid
usage of dts.fixup code for it.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The app is already sending period heart beat messages, and since it is
not designed to be used for such long times that would require IVI
Update, keep the secure network beacon sending disabled.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Suspend the mesh network after 30 minutes of inactivity. This should
help prolong the battery life of boards used at multi-day events, if
the user forgets to power off the device for the night.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Docs in the samples folder are a mixture of samples and sample indexes
of more samples, cluttering the index display. This change eliminates
the clutter, be we should reorganize the sample docs so we have a
consistent doc hierarchy (and improved organization).
Fixes: #12758
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add a project configuration for nrf52840_pca10090 that will
route the nRF9160 interface pins to the nRF52840, and use them
for HCI over UART.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
The old legacy APIs use net-app library and as that is being
removed, then the dependencies need to be removed also.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample is made to demonstrate use of x-nucleo-ik01a2 shield.
It requires a board with Arduino i2c where it can be plugged on.
The sample has been tested on Nucleo F401RE board.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Share lis2dh driver among few accelerometer sensors that has
same register interface: LIS2DH, LIS3DH, LSM303DLHC, LIS2DH12,
LSM303AGR.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Supported PWM at pins A0, D3, D5 and D6 which are also Arduino
compatible. Also the onboard red LED can be used with PWM.
The basic/{fade_led, blink_led} samples to apply to this board
seemlessly and operate on the onboard red LED.
Also supported RTC.
Signed-off-by: Ioannis Konstantelias <ikonstadel@gmail.com>
This commit provides sample application for sensor lsm6dsl.
This sample has been tested on both 96b_argonkey board,
where lsm6dsl is connect to the micro thru SPI bus, and on
disco_l475_iot1 board, where instead it is connected to I2C bus.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
mbedTLS benchmark used 32-bit arithmetics for time calculations
(nanosecond resolution), which could overflow on slower platforms
on more time-consuming benchmark tests. In result, the benchmark
could give incorrect timing information. Using 64-bit arithmetics
prevents this issue.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add overlays for commonly used socket samples: big_http_download and
dumb_http_server. Can be used with:
make BOARD=mps2_an385 CONF_FILE="prj.conf overlay-smsc911x.conf"
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Split out the boards that utilize the FRDM-KW41Z as a seperate test
where we explicitly set the shield as an extra_args instead of having to
do it in the CMakeLists.txt file.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rather than specifying SHIELD via Kconfig, we move it to being
specified via the command line, similar to board.
So we can do:
-DSHIELD=x_nucleo_iks01a1
or, for multiple shields:
-DSHIELD="x_nucleo_iks01a1 frdm_kw41z"
Following cmake change, update x_nucleo_iks01a1 sample in order
not to enable CONFIG option anymore but set SHIELD cmake option.
Last, update documentation to reflect this change.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a configuration structure to sht3xd that holds instance-specific
parameters, implemented in a immutable statically allocated object
initialized with material from device tree binding aliases.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
We have a new power management system and those samples have been
written for specific boards and using the application based power
management subsystem. We are getting new tests/samples that are generic
with the new subsystem, so remove those in favor of the new ones.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample is linking the 'app' with 'subsys__bluetooth', which will
add zephyr/subsys/bluetooth to the include path of the app. But this
is unnecessary as the app already has this path on it's include path.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Legacy shell removed in order to avoid maintaining two shells
systems.
All examples and tests have been migrated to the new shell.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Convert lsm303dlhc_accel & lsm303dlhc_magn sensor driver to use new
defines so we can remove the dts_fixup.h code for it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Driver for networking device Microchip ENC28J60 is used as SPI slave,
moved to DTS type definition. Samples echo_client and echo_server use
this device on Arduino 101 board.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update boards yaml file with arduino_i2c supported option
We exclude disco_l475_iot1 from the x_nucleo_iks01a1 sample since there
are duplicated sensors between the disco_l475_iot1 and shield. Until
Zephyr drivers can handle multiple sensors we need to have this exclude.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This board has headers for these buses so they should be made available
without requiring special overlays.
Also take advantage of the new Nordic auto-enable for peripherals,
which eliminates the need for special configuration.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
If Server receives re-transmitted message then it will not
transmit corresponding publish message for it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added app_gpio.c & no_transition_work_handler.c to reduce
burden on main.c. It will simplify & help to understand
overall architecture.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Simplified algorithm behind states binding & target values calculation.
This has improved code readability.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Disabled the CONFIG_COVERAGE for benchmarks and other tests.
This is needed because it interferes with normal behavior of the
test case.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Previously there was just "min_ram: 32", which took care about
suitable flash size implicitly. But now we have interesting boards
(e.g. lpcxpresso54114_m0) which tout RAM of 32K and Flash of 64K.
So, become more explicit about Flash requirement for the sample.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
These two tests are hitting a stack overflow on x86_64 (not entirely
surprisingly), but can't just increase stack size because there is an
assert in the CMSIS compatibility layer that stacks be under 512
bytes. Just disable for now.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This builds with a host compiler, not one from the SDK, and so no
newlib library is available. There is work to enable newlib detection
at and above the cmake level. This patch can be reverted when that
lands.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
No MPU support there yet. This test should really be predicated on a
kconfig variable, not architecture.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This patch adds a x86_64 architecture and qemu_x86_64 board to Zephyr.
Only the basic architecture support needed to run 64 bit code is
added; no drivers are added, though a low-level console exists and is
wired to printk().
The support is built on top of a "X86 underkernel" layer, which can be
built in isolation as a unit test on a Linux host.
Limitations:
+ Right now the SDK lacks an x86_64 toolchain. The build will fall
back to a host toolchain if it finds no cross compiler defined,
which is tested to work on gcc 8.2.1 right now.
+ No x87/SSE/AVX usage is allowed. This is a stronger limitation than
other architectures where the instructions work from one thread even
if the context switch code doesn't support it. We are passing
-no-sse to prevent gcc from automatically generating SSE
instructions for non-floating-point purposes, which has the side
effect of changing the ABI. Future work to handle the FPU registers
will need to be combined with an "application" ABI distinct from the
kernel one (or just to require USERSPACE).
+ Paging is enabled (it has to be in long mode), but is a 1:1 mapping
of all memory. No MMU/USERSPACE support yet.
+ We are building with -mno-red-zone for stack size reasons, but this
is a valuable optimization. Enabling it requires automatic stack
switching, which requires a TSS, which means it has to happen after
MMU support.
+ The OS runs in 64 bit mode, but for compatibility reasons is
compiled to the 32 bit "X32" ABI. So while the full 64 bit
registers and instruction set are available, C pointers are 32 bits
long and Zephyr is constrained to run in the bottom 4G of memory.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add Accelerometer mouse by using fxos8700 accelerometer and using data
to control USB HID mouse.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
When used suitable config overlay, qemu_cortex_m3 with Ethernet
support can be started with just usual "make run".
An example of such overlay is included with samples/net/echo_server,
can be built and run with:
make BOARD=qemu_cortex_m3 \
CONF_FILE="prj.conf overlay-qemu_cortex_m3_eth.conf" run
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Added macro that generates simple report descriptor for mouse.
This improves the readability of hid-mouse sample.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
These were still running through Ethernet using generic
overlay-802154.conf thus creating a dedicated one.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Set BOARD variable in CMakeLists.txt for DMIC Sample App
Since this sample app is for intel_s1000_crb, setting BOARD
in CMakeLists.txt will eliminate the need to specify in
cmake command line every time during build.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Check should be done with & instead of | otherwise it will always be
evaluated as 1/true regardless of the flags.
Fixes#12308
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The current OpenThread integration wants to download (from github) and
configure the OpenThread source tree every time the app is build. We
don't want to be doing this in quadruplicate every time sanitycheck is
run.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
These tests were defining a "test_kw41z" case, but that platform is
already whitelisted in the main ("test") case, and this one defines no
different behavior. It's just a dupe.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
With the new implementation we do not need a NULL terminated list
of kobjects. Therefore the list will only contain valid entries
of kobjects.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Move to latest cmake version with many bug fixes and enhancements.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
nucleo_l476rg uses I2C_3 rather than I2C_0, and uses special magic to
synthesize a corresponding define from a device tree node label. Update
the sample to use the Arduino binding if that's present.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
The Nordic TWIM driver uses DMA which requires that the source address
be located in RAM. If it isn't the transfer will rejected as invalid.
Provide a RAM address even though it's never dereferenced.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
0x77 is an available device address (and is the secondary address for
the BME280). 0x78 is a reserved address.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Exteneded shell sample with example how to use shell_fprintf from
any context with 'foreground' command.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The test 'samples/application_development/code_relocation' was failing
in master because it was not declaring that it was defining additional
sections.
The CI error is attached below.
This patch fixes the CI failure by declaring in 'sample.yaml' that
these additional sections are expected.
FAILED:
qemu_cortex_m3/samples/application_development/code_relocation/test
has unrecognized binary sections: ['_SRAM2_RODATA_SECTION_NAME',
'_SRAM_TEXT_SECTION_NAME', '_SRAM_RODATA_SECTION_NAME',
'_SRAM_DATA_SECTION_NAME', '_CUSTOM_SECTION_NAME2']
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix misspellings in documentation (.rst, Kconfig help text, and .h
doxygen API comments), missed during regular reviews.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
blinky/button and disco samples are now using definitions
generated from boards dts files.
Update samples README files accordingly.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The options selecting nRF drivers are now enabled by default when
an nRF SoC is selected as the build target.
The options selecting given hardware instances are now enabled at
the board level.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The sample application to demonstrate dining philosopher's problem
implementation using CMSIS RTOS V2 APIs with semaphores and mutexes
as resources (forks).
The application makes use of CMSIS_RTOS_V2 APIs on threads, semaphores
and mutexes.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Increase rx stack size for OpenThread overlay, as updated revision of
OpenThread requires more stack to operate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
After this fix each LED will blink 5 times. Previously
LED_0 has been blining 6 times while others 5 times.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Update zephyr integration of openthread to latest api as of 2018-12-17:
2a75d30684
Both echo_server and echo_client compile and are operational.
Signed-off-by: Martin Turon <mturon@google.com>
This application benchmarks the various cryptographic primitives
offered by mbed TLS.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
It is safe to assume that if X_GPIO_CONTROLLER is defined (hence
generated) X_GPIO_PIN should also be defined.
If this is not the case, this is an issue and letting the sample
build will reveal the issue.
Update the yaml filter to rely only on _GPIO_CONTROLLER #define's
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In disco basic sample, same GPIO controller was used for LED0
and LED1, which is actually a particular case.
This change implements the general case, where LED0 an LED1 might
not have the same gpio controller.
Tested on nucleo_f429zi and frdm_k64f.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In gpio driver sample, same GPIO controller was used for out pin
(LED0) and in pin (SW0), which is actually a particular case.
This change implements the general case, where button an led might
not have the same gpio controller.
Tested on nucleo_f429zi and frdm_k64f.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Removed get_report_cb as it was an incorrect implementation
of Get_Report request. Correct response would be returning
current report value, not report descriptor.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Currently there is a mixed approach in prefixes from mbedTLS
configuration (MBEDTLS_ and TLS_). The latter was used in generic config
file and could bring up confusion that it can only be used with TLS
subsystem. Hence unify the approach to MBEDTLS_ prefix to avoid such
confusion.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
STM32 uart Kconfig instance flags were not following
same naming scheme than other drivers (i2c, spi, ..)
Update driver to use UART_X instead of UART_STM32_PORT_X
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Added right button, X and Y axis movement to HID mouse example.
Enabled only if board has enough buttons.
Added LED toggling notification when report is sent.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Check result of fcntl() to catch any regressions in fcntl() handling
in Zephyr. To facilitate this, also merge block() and nonblock()
functions into single setblocking().
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Current application data size in echo_client sample does not fit into a
single datagram with DTLS enbled for default IPv6 MTU (1280 bytes). This
caused abrupt failure of the sample with DTLS enabled over 802.15.4 L2.
Decreasing the application data size allows it to fit into a single UDP
datagram after encapsulating it into DTLS record.
Additionally, finetune DTLS timeout on echo_server to match UDP
application timeout on echo_client (so that a single datagram loss
does not cauase DTLS session to end).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Now if Server receives re-transmitted messages from client then
it will not get completely ignored but respective GET & Publish
message will get release from Server side.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
As per Mesh Model Specification,
when a Server receives a Set message or a Set Unacknowledged message,
it shall set the state to the target field of the message,
unless the message has the same values for the SRC, DST, and TID
fields as the previous message received within the last 6 seconds.
This commit take care of this requirement.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
POSIX doesn't mandate such a header, only <fcntl.h>. <sys/fnctl.h>
is just an internal implementation detail of Newlib on which we should
not rely.
This makes it possible to build this sample against minimal libc.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Considering that IP can be set dynamically by DHCP
or statically before test previously, we could have
alternative way by supporting both setting IP and
existing IP.
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Since the Arduino 101 and the Quark SE C1000 are not actively developed
boards, default to other boards that are maintained and used.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit's implementation update Vendor Model dummy response
value in vnd_get() instead of vnd_set_unack().
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed bug which get introduced by PR:9521. Because of it
not able to save App's variable on SoC flash.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The OpenAVNU gPTP daemon repository has changed so the compile
instructions were not working.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Simplified documentation and made it more generic. Remove HW setup and
made sample work with built-in LEDs and buttons.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Remove QMSI kconfigs and depend on DTS only.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not limit to whitelisted boards, instead make it build/run for any
board that defines required DTS macros.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1. Modified fade_led PWM example to include
nRF HW PWM option.
2. Added fade_led nrf52_pca10040.overlay
in order to enable PWM node and choose
output PWM GPIO for channel 0. Channel 1
GPIO enable but not used in sample src.
Signed-off-by: Gaute Gamnes <gaute.gamnes@nordicsemi.no>
The Code need to be align after introduction of stream codec to
setting serialization subsystem.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Remove QEMU instructions as those do not work. Add native_posix
board instructions for running gPTP with linuxptp daemon.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample was creating objects from header file in the bss.
Fixed it by moving the objects to appropriate object files.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This sample provides an example for using the code relocation
feature. This example will place text,data,bss from 3 files to
various parts in the SRAM. For this a custom linker file is used
which is derived from include/arch/arm/cortex_m/scripts/linker.ld.
Signed-off-by: Varun Sharma <varun.sharma@intel.com>
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
We get an intermittent fail when running on qemu_xtensa. Disable this
sample for now on that platform to allow sanitycheck / CI to pass for
other PRs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Removed Console dependencies from shell uart backend.
Generated define: CONFIG_UART_SHELL_ON_DEV_NAME for each board.
Fixes#10191
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Use generic logging macros LOG_*() instead of NET_*() as the
latter are mostly meant for internal networking stack use.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove network specific default and max log level setting
and start to use the zephyr logging values for those.
Remove LOG_MODULE_REGISTER() from net_core.h and place the
calls into .c files. This is done in order to avoid weird
compiler errors in some cases and to make the code look similar
as other subsystems.
Fixes#11343Fixes#11659
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add Bluetooth, 802.15.4 and OpenThread overlay configurations to socket
echo_client and echo_server samples.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sample application to demonstrate usage of cmsis_rtos_v1 APIs
with dining philosopher's problem implementation.
This covers semaphores, mutex and thread APIs of CMSIS RTOS V1.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Corrected state binding. With this commit Light Lightness
actual state would not cross its upper & lower limit.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Function names should have a verb as the last component.
As per this standard, rename some fuunctions names.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Due to recent changes some bugs had introduced in Gen. Level Move
GET & Publish functionalities. Now separatly introduced
gen_level_move_get() and gen_level_move_publisher() to resolved it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
1. Created new shell module: shell_help.
2. Simplified command handlers with new shell print macros.
3. Removed help functions from command handlers.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removed printing command help from help handler. It is now
realized by the shell engine. This change saves a lot of flash
but still allows to print help in command handler with function
shell_help_print.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Removing help "options" from shell API.
Currently SHELL_OPT macro is not used by users. What is more
commit: a89690d10f ignores possible options created in
command handler by the user. As a result they are not printed
in help message.
Second, currntly implemented "options" in command handlers options are
implemented without SHELL_OPT macro.
And last but not least this change will allow to implement
help handler in a way that user will not need to think about calling
functions printing help in a command handler.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As it stands now, the console effectively works in raw mode, so all
messages should end with "\r\n". This was missed previously, because
the sample was run in QEMU, on top of POSIX cooked console. Running
on real hardware showed this issue.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Idle rate functionality has been implemented for HID USB class.
Bassed on Device Class Definition for Human Interface Devices 1.11.
Tested with USB3CV and host with idle rate.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
HID class now defaults to universal request callbacks in case they
are not provided by the application. This applies to following,
class-specific requests: Get_Report, Set_Report, Get_Idle, Set_Idle,
Get_Protocol and Set_Protocol.
Tested with USB3CV.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Rephrase some help messages to decrease flash usage.
Deactivate shell history feature for test test_netusb_rndis
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
We are not expecting forever k_sleep in multithreading.
And k_sleep is empty in non-multihreading.
So remove invalid forever sleep to avoid the below issue.
ASSERTION FAIL [duration != (-1)] @ zephyr/kernel/sched.c:807
Please refer to _impl_k_sleep api in zephyr/kernel/sched.c:807
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Remove adhoc handling of BLE connection setup, rely on net_config for
that. Remove board-specific configs, instead have prt.conf and overlay
configs. Perform TLS setup once before main loop, to avoid errors.
Signed-off-by: Tavish Naruka <tavishnaruka@gmail.com>
context4/6 is initilalized in net_context_get function
which is restricted under CONFIG_NET_IPV4/IPV6 with
IS_EANBLED macro. So add the same macro check for
net_context_put function to avoid NET_ASSERT(context).
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
If NET_IPV6 is disabled, build issue happens as below.
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c: In function ‘zperf_tcp_rx_thread’:
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:171:9: error: ‘in6_addr_my’ undeclared (first use in this function)
&in6_addr_my->sin6_addr);
^~~~~~~~~~~
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:171:9: note: each undeclared identifier is reported only once for each function it appears in
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c: In function ‘zperf_tcp_receiver_init’:
zephyr/samples/net/zperf/src/zperf_tcp_receiver.c:250:3: error: ‘in6_addr_my’ undeclared (first use in this function)
in6_addr_my = zperf_get_sin6();
^~~~~~~~~~~
*** [CMakeFiles/app.dir/src/zperf_tcp_receiver.c.obj] error 1
*** [CMakeFiles/app.dir/all] error 2
Signed-off-by: Bub Wei <bub.wei@unisoc.com>
Remove an unnecessary local variable to store the
return value, instead return directly thereby saving
few bits of memory.
Found using Coccinelle.
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
In Gen. OnOff Unack handler, gen_onoff_publisher(model) was
misplaced previously & now it is set to proper location.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Add a sample application for demonstrating automatic generation of
Character Framebuffer (CFB) font headers at build time.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Enable debug logging in the watchdog driver sample application to aid
in debugging watchdog drivers.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
If transition time is not equal to Zero then & then only values
related to transition get calculated.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
If the first name is longer than HELLO_MAX sending would fail due to
there not being sufficient MIC space (or worse overrun the net_buf).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This code was still incorrectly causing corrupt strings to be
generated. Now it should be correct.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Now if Gen. OnOff state set by client as '1' with some
transition time then value of Lightness will not jump to default
or last value instantly instead it would gradually increase during
that transition period.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Create independent function handlers for some Servers. This
would not initiate state binding if current state is equal to
Client requested state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Inverse logic for onoff state while driving LED GPIO. For LED light on
GPIO pin is 0, 1 for LED light off.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Start of Frame events can now be accessed from USB classes.
This will be useful when implementing idle rate functionality.
Signed-off-by: Marcin Szymczyk <Marcin.Szymczyk@nordicsemi.no>
Update the http_get sockets sample to enable association of secure
tags with certificate filenames.
This allows certificates and keys to be provisioned to the file
system on secure flash, without having to include the actual
certificates in the application.
Validated on the cc3220sf_launchxl board.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Two separate folders and Kconfig options causing confusion on
CoAP and CoAP_SOCK implementations. This patch simplifies it.
Current CoAP Kconfig option moved to COAP_NET_PKT.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
System Power Management is only supported in Tickless Idle mode.
This patch modifies Kconfig dependencies to ensure System Power
Management option selects Tickless Idle one.
Fixes: #11046
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit will take back changes made by previous commit
i.e. fad8ff39c3.
This is beacause k_sleep() based delay is not behaving as
expected while testing & take more time than expected.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The disco_l475_iot1 has the Inventek eS-WiFi, so lets enable the sample
on the board. (This also gets us something that will build test the
eS-Wifi driver as part of sanitycheck).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This adds common option to disable support for LE Data Length Update
procedure in controller and host.
This will reduce flash usage by compiling out le_data_len_change
event handler that will never be called if controller has been
compiled with BT_CTLR_DATA_LENGTH option disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This adds common option to disable support for PHY Update
procedure in controller and host.
This will reduce flash usage by compiling out le_phy_update_complete
event handler that will never be called if controller has been
compiled with BT_CTLR_PHY option disabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Since setting USB console port name is moved to DTS users have
problems enabling it. Notify user that the console is not set.
Fixes#10693
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Adds the virtualcom device to the nrf52840 SoC dts and adds a board
specific nrf52840_overlay.dts file, copied exactly from the
arduino101_overlay.dts file, to set the console device name
appropriately for the subsys/usb/console sample project.
There were no clear alternatives to add a usb_cdc: virtualcom device to
all known SoC devices with USB support as should probably happen.
There was also no clear alternatives to add a non-board specific overlay
to the example.
This fixes a specific problem with the nrf52840-dk board for this sample
project.
Signed-off-by: Tom Burdick <thomas.burdick@gmail.com>
With this commit now it is simple to understand flow of logic when
NODE receives any message & how it proceed things one by one.
Plus NODE will immediately send GET status to Client instead of
waiting for things which has less priority.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
In order to prevent failing tests on i.MX RT the following samples were
limited to a minimum 140k of flash: http_client, http_server,
socket/echo_client and sockets/echo_server.
Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
Add IMX IPM sample application. It reads the data sent to the
Messaging Unit and sends them back. It has been tested on Udoo Neo Full
board with the Cortex-A9 core running Linux and sending the data
into the Messaging Unit A and the Cortex-M4 running this sample Zephyr
application and reading the data from Messaging Unit B and sending it
back for Linux side to read it from Messaging Unit A.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Rename existing headers and sybols to mqtt_legacy, to allow new
implementation to keep old config and header names.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The show_sensors_data() function tries to access val[2] when
outputting the Z-axis value, so the array must have at least three
elements. This also triggered Coverity CID 189741.
Fixes#11482
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This comparison was always supposed to be > rather than >=. Fixing
this also fixes Coverity CID 189740.
Fixes#11483
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Let's expand the sanity build testing for the lwm2m_client by
doing the following:
- Add variant builds for DTLS, bluetooth and modem
- Check various combinations of hardware across each of these
variant builds: frdm_k64f, nrf52_pca10040, nrf52840_pca10056,
disco_l475_iot1
Signed-off-by: Michael Scott <mike@foundries.io>
When the WNC-14A2A modem binding was originally introduced, I thought
the base_label would shorten the define keeping the result short and
easily portable. Turns out with the latest changes, it has a side
effect of removing the "DT_*" prefix which is breaking the build.
Let's remove "base_label" from the modem binding and adjust all of
the dts_fixups referring to the WNC14A2A defines.
NOTE: This commit moves the left-over WNC14A2A dts_fixup defines from
the nRF52 soc into samples/net/lwm2m_client as the new values.
They will stay there until the modem can be re-configured as a shield.
Signed-off-by: Michael Scott <mike@foundries.io>
During the modem overlay move from the K64F board directory to the
LwM2M sample code, 2 DTS entries were dropped:
current-speed = <115200>;
status = "ok";
Without these entries the DTS defines for UART2 and CURRENT_SPEED
are missing from the generated_dts_board.h file.
Signed-off-by: Michael Scott <mike@foundries.io>
All drivers require DTS for their primary SPI settings.
Removing SPI_[0-9]_NAME config option added some more samples changes.
Usage of these options there was anyway not relevant.
Fixes#11064
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We have cases with UART drivers where TX interrupt handling is not
bootstrapped properly on enabling them. To make such cases more
obvious, start this sample with console_write(), the output of which
wouldn't appear if that's the case. (Of course, the sample starts
with printk() exlaining what may happpen.)
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Remove the ifdef related to CONFIG_FS_FLASH_STORAGE_PARTITION. There
shouldn't be any harm in always having the partition around as we'll
just generate the defines related to and most applications will ignore
them.
Helps get one step closer to have DTS not depend on Kconfig.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the
nrf52840_pca10056 board and should be maintained and configured
outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the nrf52840_mdk
board and should be maintained and configured outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
echo_server can use up to 6 sockets therefore it needs more file
descriptors than the maximum default value specified.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There are a small handful of samples that still utilize <board.h>
include, to minimize the use of <board.h> to these specific cases and
allow us to remove adding the board dir to the top level include search
path, we explicitly in each sample add the specific board dir it needs.
For the microbit cases these could be replaced by DTS support in the
future when the pwm_nrf5_sw supports DTS.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Now states which are bound have single timer that means
means for lightness variation there is one timer & for
temperature variation there is one timer.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Corrected mapping of message handler for Generic
Move Set, Generic Move Set Unack, Light CTL Set &
Light CTL Set Unack.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Removed extra blank line. Add new
bound_states_transition_type_reassignment() function in
transition.c to improve code readability & understanding.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This edition would improve by default mesh network
performance. This is after testing with nRFMesh app
from Nordic Semiconductor.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Include regex pattern matching of console output
to determine the sample execution status.
Add fixture to determine the hardware dependency
if any. If FRAM is connected to board externally,
then with fixture, automation would be able to
identify the board with sensor to trigger the
execution.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
Regex pattern matching is included to match the
execution log from console to return test result
in automation.
Also add fixture to identify the external sensor
connected for automation framework to trigger test
cases on particular board which is connected with
required sensor.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
This commit would add the pull-up or pull-down on the switch pin and
makes it functional on the board where there is no external pull-up.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
We should let drivers or board code include soc.h directly so we can keep
board.h to local info for board specific code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This can help find unused symbols. Those end up without a type if
'default' is used instead of 'def_bool', which generates a warning.
Search for "Kconfig.defconfig" in
https://docs.zephyrproject.org/latest/application/kconfig-tips.html for
a longer explanation.
Keep the 'def_bool' for the following symbols, which seem to be
deliberately defined only in Kconfig.defconfig files:
- ALTERA_AVALON_I2C
- ALTERA_AVALON_MSGDMA
- ALTERA_AVALON_PIO
- ALTERA_AVALON_QSPI
- ALTERA_AVALON_SYSID
- CLOCK_CONTROL_IMX_CCM
- CPU_EM4_DMIPS
- CPU_EM4_FPUDA
- CPU_EM4_FPUS
- FP_FPU_DA
- I2C_GECKO
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Change the sample to use a different controller device name per pin. We
shouldn't assume that on a given board that all the pins we are using
will be on the same GPIO controller device.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a dts binding for the Atmel WINC1500 WIFI chip. Update the
quark_se_c1000_devboard to utilize this binding as well as the wifi
sample app.
We now get all the GPIOs related to the Atmel WINC1500 from the device
tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
These changes were obtained by running a script created by
Ulf Magnusson <Ulf.Magnusson@nordicsemi.no> for the following
specification:
1. Read the contents of all dts_fixup.h files in Zephyr
2. Check the left-hand side of the #define macros (i.e. the X in
#define X Y)
3. Check if that name is also the name of a Kconfig option
3.a If it is, then do nothing
3.b If it is not, then replace CONFIG_ with DT_ or add DT_ if it
has neither of these two prefixes
4. Replace the use of the changed #define in the code itself
(.c, .h, .ld)
Additionally, some tweaks had to be added to this script to catch some
of the macros used in the code in a parameterized form, e.g.:
- CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS
- CONFIG_UART_##idx##_TX_PIN
- I2C_SBCON_##_num##_BASE_ADDR
and to prevent adding DT_ prefix to the following symbols:
- FLASH_START
- FLASH_SIZE
- SRAM_START
- SRAM_SIZE
- _ROM_ADDR
- _ROM_SIZE
- _RAM_ADDR
- _RAM_SIZE
which are surprisingly also defined in some dts_fixup.h files.
Finally, some manual corrections had to be done as well:
- name##_IRQ -> DT_##name##_IRQ in uart_stm32.c
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
All labels containing "_<8-hex-digits>_" or "16550_<3or6-hex-digits>_"
in their names, assumed to be generated by the extracting script,
are updated with the DT_ prefix, to reflect the recent changes made
to the script.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
If shell UART backend was enabled and logger uart backend was
not explicitly disabled then both were used resulting in logs
being printed twice on terminal.
Patch modifies default state of log uart backend to depend on
state of shell uart backend.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add a shell that implements "promisc [on | off] <interface>"
command to toggle promiscuous mode support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Patch introduces sensor model to mesh badge application. Along with
model definition a sensor get message is implemented and handled on
server.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
This patch introduces new screen to mesh_badge application. Sensor
screen shows measurements from board sensors updated every 2 seconds.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Convert the BMI160 to use Device Tree to get SPI and GPIO params instead
of Kconfig. Updated samples, tests, and arduino_101_sss board support
for this.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Changed LOG_MODULE_REGISTER and LOG_MODULE_DECLARE macros to take log
level as optional parameter. LOG_MODULE_DECLARE can now also be used
in static inline functions in headers. Added LOG_LEVEL_SET macro
which is used when instance logging API is used to indicate maximal
log level compiled into the file.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Couple of findings which were revealed after changing
LOG_MODULE_REGISTER macro:
- missing semicolons after LOG_MODULE_REGISTER()
- missing LOG_LEVEL defines
- other
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The overlay-e1000.conf can be used for example with Qemu
which has support for e1000 ethernet driver.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Change the label GPIO_KEYS_BUTTON_0_GPIO_CONTROLLER that is generated
for the DT node directly to the corresponding one generated through
the "sw0" alias (i.e. SW0_GPIO_CONTROLLER) to make it consistent with
other DT related labels used in this code (SW0_* and LED?_*).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Now that we set LED info in the device tree for all boards we don't need
to special case handle in the name/led pin (it comes from DT). We can
also remove include board.h.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This required wiring external daughter board by hand, it's not provided
by the board directly, let's remove this.
Applying the change on relevant samples.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There is an mcr20a shield board for frdm_k64f which is easier to use
than wiring a cc2520 by hand. So let's remove this.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The only difference between the F413xH and F413xG is flash memory size.
STMF413xH: 1536 Kbytes
STMF413xG: 1024 Kbytes
Signed-off-by: Benoit Leforestier <benoit.leforestier@gmail.com>
`shell_cmd_precheck()` function has the second argument as boolean
and currently we pass assignment expression instead of boolean
expression. Therefore, fix the expression by passing `argc == 2`
as the boolean argument.
Fixes#11099
Coverity-CID: 189507
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
This commit moves the BLE GATT Device Information service
from /samples/bluetooth/gatt to /subsys/bluetooth/services and adds
a Kconfig entry to enable and configure the service;
when enabled, it will register itself automatically.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Issue found using Coccinelle. Semaphore is not required at all
in this application.
Fixes#11150
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Improved RX path to use ring buffer for incoming data instead of single
byte buffer. Improved TX path to use ring buffer. Added support for
asynchronous UART API (interrupts).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The way the code is structured the buffer is always guaranteed to be
large enough, however perform explicit termination anyway to avoid
Coverity warnings.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Tweak ROM usage of quark_se_c1000_devboard so that test_usbnet
test will pass. The board just disables network statistics as
that is not really needed here.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We update 'blink_led', 'fade_led' and 'rgb_led' to support dt generated
defines for the PWM info needed for each. Since hexiwear_k64 supports
generating the info, moved the support for hexiwear_k64 to just use the
dt generated defines.
For 'blink_led' and 'fade_led' we use an alias in dt called 'pwm-led0'.
For 'rgb_led' we use aliases 'red-pwm-led', 'green-pwm-led' and
'blue-pwm-led'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The wncm14a2a modem is an add-on/shield and not part of the frdm_k64f
board and should be maintained and configured outside of the board.
This needs to be moved to a shield, see #10965.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The task_profiler is not needed nor used by zperf so remove
it from CMakefile.
Fixes#11051
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The DTS changes introduced in 7ae220c845
changes the naming of GPIO related macros. This updates the usage
of previous macros via DTS fixup.
Fixes#10993
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Unify the function naming for various network checking functions.
For example:
net_is_ipv6_addr_loopback() -> net_ipv6_is_addr_loopback()
net_is_my_ipv6_maddr() -> net_ipv6_is_my_maddr()
etc.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The USB mass storage documentation was completely outdated. Rewrite it
using reStructuredText, and mentioning the two possible overlays.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Move configuration to overlay-netusb.sonf, enable zero-configuration,
working with LLMNR in Windows and avahi-autoipd in Linux.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move the GPIO info for the buttons into the dts, this lets us match what
all other boards are doing. Update some sample & test code to use the
dts generated SW0_GPIO_CONTROLLER define instead of SW0_GPIO_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
We don't need board.h, but by including it we would end up picking up
stdio.h from somewhere which we need for sprintf. So just included
stdio.h and drop board.h
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
For blink_led, fade_led, and rgb_led, we only need board.h for the
hexiwear_k64 board. Remove other references to board.h and only
include it if we are building on hexiwear_k64
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The HID mouse sample uses the GPIO to read the state of a button, but
does not enable CONFIG_GPIO, causing the example to fail. Fix that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Adds a new configuration to the peripheral_hr sample that utilizes the
frdm_kw41z as a ble controller shield.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Stop specifying that the 'remote' app should use the same board as the
root app.
Also, add assertions to make sure that the user does not try to
override the board that is specified in the app build scripts.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Stop specifying that the OpenAMP 'remote' app should use the same
board as the root app.
Also, add assertions to make sure that the user does not try to
override the board's that are specified in the app build scripts.
This fixes#10345
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Defined common publisher i.e. gen_level_publisher() for
all three gen. level related messahe handlers.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
The BBC micro:bit uses a baudrate of 115200 for the hci_uart
sample. Add a note about this to avoid any confusion.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.
This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.
Signed-off-by: Reto Schneider <code@reto-schneider.ch>
Add a new "heartbeat" message so that number of hops between nodes can
be discovered. Also add a statistics page which can be toggled using a
long key press, showing local information and the top message senders.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If user aggresively vary the state then previous mechanism
failed to publish status of other bounded states since it
has to publish multiple things back to back.
This PR repair the things.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
If transition is in process, then as per current implementation bound
states only respond with Present value. But with this commit, now
bound states too would respond with present, target & remaining time
values in status response.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Redefine opcode values for Vendor Model to mimic like
Generic OnOff Server opcode values for sake of convenience.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Now in case of Generic Delta handler, if message with same TID
received after 6 seconds with same source address would consider
as new transaction instead of ignoring it.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
With this commit it is now possible to save some Mesh Model
Servers State on SoC flash. This impacts initialization &
state binding after NODE reset & that is why some additional
modification has done as per requirements & removed some
code & comments which are redundant as per current
implementation.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
In general, Bluetooth Mesh provisioning process could be failed
because of any reason. Using some h/w interrupt we can call
bt_mesh_reset() or something which will push device into factory
reset mode.
But with some actual products it is not always possible or feasible
to add extra h/w to achieve this goal.
This commit adds facility to push device into factory reset mode
using power reset. As per current implementation user have to
do 5 times reset so that gap between two consecutive reset
should not exceed 7 seconds.
Co-authored-by: Laczen JMS <laczenjms@gmail.com>
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
With this commit, IUT will send additional status responses
whenever required as per PTS requirements.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Separately defined functions for Servers. This would help
to send extra status responses whenever required.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This updates documentation to account for the new shell which
does not support 'select' for command context anymore.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The wifi shell sample asserts when trying to do a sleep
forever.
The sleep should not be necessary, so removing it.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
A few issues with the dts support for the SSD1306 display driver:
1. binding file mixed description & generation up together
- rename most uses of generation to description and add proper
generation field into yaml
2. Drop use of BASE_LABEL, this shouldn't be used by most bindings
3. dts defines that are being assumed in driver aren't correct. We
should be using a dts_fixup.h in the sample to map the generated
defines to those used in the driver. We remove the incorrect
defines that the driver assumes right now.
4. Fixup 'segment-remap' and 'com-invdir' properties that are booleans
in the binding file and associated code changes.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The "zperf udp download" optional port parameter was not properly
checked, the default port check branch was never reached.
Fix also the same issue in tcp download command.
Coverity-CID: 188881
Fixes#10758
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Change the default behaviour of the host network interface
setup. Now user needs to execute net-setup.sh script from
net-tools project to setup host ethernet interface. The script
needs to be run as a root user. Then zephyr.exe can be started
as a normal user.
Example:
cd net-tools
sudo ./net-setup.sh
This will create zeth network interface and set IP address and
routes properly. See other command line options by typing
./net-setup.sh --help
Old behaviour is still there if one enables
CONFIG_ETH_NATIVE_POSIX_STARTUP_AUTOMATIC=y
in which case one needs to use the command
sudo --preserve-env zephyr.exe
to start the Zephyr process.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Now that log processing happens in a separate thread, the
BT_STACK_EXTRA macro is not needed (since there's no significant
overhead), and therefore the BT_STACK macros become unnecessary as
well.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Provide basic commands for configuring/setting/reading GPIO ports.
> gpio conf ..
> gpio set ..
> gpio get ..
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Driver fxos8700 can also be used for the MMA8451
accelerometer and offers more functionality.
Revert the commit to avoid duplicate code.
This reverts commit 70a35e2346.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add console harness support for USB mass storage test.
Also, using overlay config for DISK_ACCESS configuration
and accessing the different config file with different
method.
Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This flag is an indication to the timer driver that the OS doesn't
care about rollover conditions of the tick count while idling, so the
system doesn't need to wake up once per counter flip[1]. Obviously in
that circumstance values returned from k_uptime_get_32() are going to
be wrong, so the implementation had an assert to check for misuse.
But no one understood that from the docs, so the only place these APIs
were used in practice were as "guards" around code that needed to call
k_uptime_get_32(), even though that's 100% wrong per docs!
Clarify the docs. Remove the incorrect guards. Change the flag to
initialize to true so that uptime isn't broken-by-default in tickless
mode. Also move the implemenations of the functions out of the
header, as there's no good reason for these to need to be inlined.
[1] Which can be significant. A 100MHz ARM using the 24 bit SysTick
counter rolls over at about 6 Hz, and if it had to come out of
idle at that rate it would be a significant power issue that would
swamp the gains from tickless. Obviously systems with slow
counters like nRF or 64 bit ones like RISC-V or x86's TSC aren't
as affected.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The existing API defined sys_clock_{hw_cycles,ticks}_per_sec as simple
"variables" to be shared, except that they were only real storage in
certain modes (the HPET driver, basically) and everywhere else they
were a build constant.
Properly, these should be an API defined by the timer driver (who
controls those rates) and consumed by the clock subsystem. So give
them function syntax as a stepping stone to get there.
Note that this also removes the deprecated variable
_sys_clock_us_per_tick rather than give it the same treatment.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.
Avoid short abbriviations and using full names for fs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add sample application for LSM303DLHC, ST MEMS
system-in-package featuring a 3D digital linear
acceleration sensor and a 3D digital magnetic
sensor.
Enable sample to build on stm32f3_disco board
during sanitycheck.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
ROM consumption is higher with new shell which prevents
quark_se_c1000_devboard from building. Remove that board
from sanitychecker runs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use new shell instead of the legacy one. This commit also fixes
the configuration file mess and allows the program to be run on
more hardware.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There were no shell commands implemented so remove the shell
support from this sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Removed obsolete CONFIG_SYS_LOG_* and CONFIG_NET_DEBUG_* options
from various sample and test applications.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The conf file contained obsolete config options and it was
not really used. Cleaned also the sample.yaml file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Previously, wifi-enabled samples were not built by sanitycheck for the
cc3220sf_launchxl.
This patch gets the sockets echo sample to build.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Also, defines one LOG_MODULE_NAME for the simplelink WiFi driver, and
uses the same name for all files in this driver (module).
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
If user will enable shell than for each backend shell instance
will be created automatically.
Update all shell examples according to the new initialization
procedure.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
The $srctree environment variable gives the path relative to which
'(o)source' statements work (the current directory is used if $srctree
is unset). It is set to $ZEPHYR_BASE in cmake/kconfig.cmake, so there's
no need to qualify the source of Kconfig.zephyr in sample Kconfig files
(or in external projects).
All 'source's in Zephyr assume that the Zephyr root directory is used as
the srctree as well, and would break otherwise.
Remove the $(ZEPHYR_BASE)s to make it clearer that all 'source'
statements work relative to the Zephyr root. There was some user
confusion on IRC.
Also explain how things work in the documentation.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
usb_dc_status_callback() parameters are interface or configuration
numbers and should be const.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactor USB writes, start transfer only when device
is configured, the change makes it possible to work with native_posix
USB virtual controller.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Some terminals literally interprets shell output data. Hence to print
a message in new line shell needs to send `\r\n` each time. To minimize
flash usage user can now send `\n` as a line delimiter and shell will
automatically add missing CR character.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit updates the mem_domain_apis_test sample and the
mem_protect test, so they can compile and execute in ARMv8-M
platforms, which do not support the P_RW_U_RO access permissions
combination (privileged read/write, unprivileged read-only). The
modification consists of, simply, selecting a different access
permission (P_RO_U_RO) when building for ARMv8-M MPUs with the
unmodified ARM MPU architecture.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Decrease number of buffer for sanity check, in real sample logs
consuming a lot of memory might be traded for buffers. The sample was
failing for quark_se_c1000_devboard.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The Zephyr configuration system uses many different files in many
different formats. It makes it a lot easier for users to understand
what these files do if when we use the correct file extensions.
To this end we rename the dts.fixup files to the correct file
extension '.h'.
This is a breaking change for out-of-tree fixup files. Such files will
be detected and given an appropriate error message.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Fix bluetooth config dependencies where the definitions depend on other
definitions.
BT_RX_PRIO is not always defined in a controller only build.
BT_CTLR_TX_BUFFER_SIZE does not depend on BT_CTLR, but BT_LL_SW.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The way uart console is setup for this is not compatible with the logger
and needs additional changes, excluding until we have this implemented
in a generic way.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As the sample.yaml file was missing, then sanitychecker did
not testing any wifi drivers or other wifi related APIs.
Fixes#10389
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added functionality to enable active shell backends via Kconfig
file. When there will be more backends implemented user will
have an option to select only required ones.
It is no longer needed to select SERIAL in prj.conf.
Fixes#10190
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
As the debugging print calls are async, all the strings that might
be overwritten must use log_strdup() which will create a copy
of the printable string.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The application won't work anymore as it uses the old syslog
logging and networking is now converted to use the new logger
so there is no need for this sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add "openthread" tag for sanitychecker when it is running
OpenThread specific tests. This way it is easier to run just
those few OpenThread specific tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fixed a bug in the OpenAMP sample's recursive build scripts, where it
would pass on the wrong board to it's second CMake invocation.
This fixes#10345
Fixed the same bug in ipm_mcux.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
1. Shell will accept CR or LF as line delimiter.
2. Macro SHELL_DEFINE simplified - it no longer requires
new line character.
3. Fixes: #10207.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
1. Command handler can return command exectution status as int.
2. Existing command handlers rework.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Every board that uses dts-enabled gpio drivers has a board-level dts, so
there is no need to have separate configs HAS_DTS_GPIO_DEVICE and
HAS_DTS_GPIO.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Every board that uses dts-enabled spi drivers has a board-level dts, so
there is no need to have separate configs HAS_DTS_SPI_DEVICE and
HAS_DTS_SPI.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Every board that uses dts-enabled i2c drivers has a board-level dts, so
there is no need to have separate configs HAS_DTS_I2C_DEVICE and
HAS_DTS_I2C.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds a board-specific dts overlay and fixup file to the arduino_101
environmental sensing sample, in preparation for making the sensor
drivers require dts.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Extending logger to support logging transient strings (with %s).
With dedicated call (log_strdup), string is duplicated to a buffer
from internal logger pool. Logger implicitly manages the pool.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
It is very inconvenient to maintain an application that both runs on a
Zephyr board and an out-of-tree board.
It forces one to write build scripts like this in the app:
if(BOARD STREQUAL my_out_of_tree_board)
set(BOARD_ROOT some/out/of/tree/board/path)
endif()
To avoid this we change the semantics of BOARD_ROOT. Instead of it
being a path to the board root it is now a prioritized list of board
root directories. Zephyr will append ZEPHYR_BASE to BOARD_ROOT.
This ensures that Zephyr boards can be used when the out-of-tree board
directory can not supply the requested board.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The shell subsystem, as it is today, depends on having a UART,
therefore let's add the dependency explicitly in its Kconfig
Fixes#10190
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
- Use new k_thread_name_set to set thread names.
- Use board name in sample instead of architecture.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
prj_stack_guard.conf not related to this sample, we have tests other
samples for stack guard testing/demonstration.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Kconfig option CONFIG_BUILD_TIMESTAMP became unused when
BUILD_VERSION was introduced, but it's option and parts of it's
implementation was not completely cleaned from the repository.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
With recent changes, sockets no longer depend on Newlib libc, so
let's have actual samples which demonstrate this. echo_client/
echo_server, which were ported from net_app samples, are converted.
The rest of socket samples are intended to be buildable on a
POSIX system (e.g. Linux), so they rather stay with more
full-fledged libc.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Unify method of enabling secure TLS sockets in samples by using TLS
overlay config file instead of standalone config files.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Avoid having not-necessarily board specific configs in a separate file.
Instead, have a single project file with appropriate overlay configs.
Board specific configurations can be added in future if needed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The periphreal_sc_only sample app wasn't very clearly logging
information about pairing failures and could give the false
impression that everything work when it doesn't. Enable some more
logging Kconfig features and take advantage of the pairing complete &
failed callbacks to give more information to the user.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This sample is made to demonstrate use of shield x-nucleo-ik01a1.
It will display embedded sensor data endlessly.
It requires a board with Arduino i2c as minimum configuration
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
It is no longer necessary to set the KCONFIG_ROOT variable when the
KConfig file is in the application root directory.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Add harness console and include regex for output
pattern matching to determine correctness of
sample execution.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
The ARM_MPU_NRF52X option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.
This commit removes the ARM_MPU_NRF52X option and replaces
its usage by ARM_MPU option.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
If user enables VLAN support, then the sample application will
create two extra VLAN network interfaces for testing purposes.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for VLANs which are disabled by default.
The application can be configured to use the VLANs by setting
the IP addresses properly in config file. The VLAN support in
this sample application is only meant for testing multiple network
interface handling.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add support for VLANs which are disabled by default.
The application can be configured to use the VLANs by setting
the IP addresses properly in config file. The VLAN support in
this sample application is only meant for testing multiple network
interface handling.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If user enables VLAN support, then the sample application will
create two extra VLAN network interfaces for testing purposes.
The application can be compiled like this for VLAN support:
cmake -DBOARD=qemu_x86 -DOVERLAY_CONFIG=overlay-vlan.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The spi project configuration was incorrectly enabling i2c, which causes
a cmake failure if a board supports spi but not i2c. Found by CI when
adding spi support to the mimxrt1050_evk board.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Add support for nRF boards by using the software-based PWM driver. The
prescaler has to be configured so that the clock runs slower in order to
make the on-board LED blink in the way it is described in the Readme.
Signed-off-by: Johannes Hutter <johannes@proglove.de>
Fixed building with ninja adding BUILD_BYPRODUCTS based on suggestion
from @SebastianBoe in issue #7760.
Fixes#7760
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In the POSIX arch, time does not pass inside infinite loops.
=> Add a small delay in each iteration of those loops
when compiled for it.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Fix the Id of the longarray message.
Also change the display of the "Address" entry to use "Id" instead of
"Entry" to be consistent the other displayed entries.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
To move forward and remove use of Kconfig in dts files lets just create
SoC specific dtsi files that the boards can include. This lets us
remove:
CONFIG_SOC_NRF51822_QFAA
CONFIG_SOC_NRF51822_QFAB
CONFIG_SOC_NRF51822_QFAC
CONFIG_SOC_NRF52810_QFAA
CONFIG_SOC_NRF52832_QFAA
CONFIG_SOC_NRF52832_CIAA
CONFIG_SOC_NRF52832_QFAB
CONFIG_SOC_NRF52840_QIAA
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.
The only directory excluded directory was ext/* since it contains
only imported code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
There is no reason why this sample should have a higher version required
of CMake in order to build.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
As per PTS, IUT is expected to return success for the
Range Get messages (Light Lightness Range Get for
MMDL/SR/LLNS/BI-01-C, Light CTL Temperature Range Get
for MMDL/SR/LCTLS/BI-01-C). This commit take care of
this issue.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Now if transition (instantaneous or non-instantaneous) is due
to delta level, then state binding would be as per it.
This is as per 3.3.2.2.3 of Bluetooth Mesh Model
Specification.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Corrected spelling mistakes for content of enum defined in
transition.h & renamed some functions. Corrected comments
in main.c
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
With this it is possible to get proper target value & remaining
time in status response from Servers when transition in progress.
If transition is not in progress then those things would not
get integrate into status response. This is as per Bluetooth
Mesh Model specification.
It is inspired concept from Bluetooth Mesh Developer study
Guide.
Also updated Transition Time (TT) related parameter calculation.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added Generic Default Transition Time Server & Client
Models names in list of Models supported by this App.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
UART pins (TX, RX, RTS, CTS) are now configured in DTS files.
RTS and CTS definitions are optional. If flow control is enabled
and RTS/CTS pins are not defined, then compiler will issue
an error message.
Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.
$(FOO) is a general preprocessor variable expansion, which falls back to
environment variables if the variable isn't set (like in Make). It can
also be used in prompts, 'comment's, etc.
The old syntax will probably be supported forever in Kconfiglib for
backwards compatibility, but might as well make it consistent now that
people might start using the preprocessor more.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This converts the http links within the Zephyr document
into references. This allows the links within the PDF file
to jump to the correct sections instead of going to
the Internet.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit updates the power_mgr sample to use the dts-generated
defines instead of the aliases in board.h.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
This commit updates the onoff-app sample to use the dts-generated
defines instead of the aliases in board.h.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
This commit updates the onoff_level_lightning_vnd_app sample
to use the dts-generated defines instead of the aliases in board.h.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
This commit updates the button sample to use the dts-generated
define to configure the button pull-up when the custom define
is not present.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Add a prj conf file for the TI cc3220sf_launchxl board
to enable socket offload to the simplelink WiFi driver.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Refactor IPv6 address lifetime timer setting in net_if_addr to support
longer lifetime than 24 days.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The latest mbedTLS (2.12) release increased resources requirements on
Zephyr, so it was required increasing the minimum SRAM to run this test
and the main stack size.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
While it's possible to define which mbedTLS config header to use, our
samples should use config-tls-generic.h as default because this header
is configurable through Kconfig.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This removes these network sample applications
samples/net/coaps_client
samples/net/coaps_server
as they are using low level mbedtls APIs. You should use
preferably socket based or net-app based applications.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Payload variable can hold max 64 bytes but value of size can be more
than that. Memsetting using value of size can overrun payload array.
Fixes coverity issue.
Coverity-CID: 187823
Fixes: #9638
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This removes these network sample applications
samples/net/mbedtls_sslclient
samples/net/mbedtls_dtlsserver
samples/net/mbedtls_dtlsclient
as they are using low level mbedtls APIs. You should use
preferably the samples/net/sockets/echo_[server|client] applications
instead, or as a last option use net-app based applications
in samples/net/echo_[server|client] if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
sample/net/README no longer exists so this removes its mention since
it is already described how to use echo-client at the end of the
document. Also state that CONFIG_BT_6LOWPAN shall be set in order to
use Bluetooth 6LoWPAN module with Linux.
Fixes#9727
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Rename GPIO_INT_CONF to GPIO_FLAGS in order to be able to use
the definition generated by the devicetree, eliminating the need
for definition in the board.h file
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Due to a change in the company name, the LwM2M copyrights need
to be changed from "Open Source Foundries Limited" ->
"Foundries.io".
Signed-off-by: Michael Scott <mike@foundries.io>
The fault dump text has changed since this sample was originally
written, so update the README accordingly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The mpu_stack_guard sample was failing in both configurations on arm
platforms. Fix the regexes in sample.yaml so they work on multiple
architectures.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The nvs sample assumed a 1 KB flash erase block size, which caused the
sample to fail on frdm_k64f because its erase block size is 4 KB. Get
the erase block size from dts instead.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Removes the platform whitelist, leaving just the depends_on/supported
pattern to select which platforms the sample can run on.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit adds settings module to the peripheral_hids that makes
bonding persistent.
Now it is possible to connect with previously bonded device.
Fixes#9580
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
Per: http://pubs.opengroup.org/onlinepubs/009695399/functions/socket.html
"Upon successful completion, socket() shall return a non-negative
integer, the socket file descriptor."
The test in prepare_fds() however fails if socket fd is
zero (non-negative), which should be a valid value.
This was found while testing the SimpleLink socket offload driver,
which can return a zero-valued socket fd, per the POSIX spec.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This sample application produces slightly different outputs based on
the chosen driver configuration mode. In Measuring Mode with trigger
support, the acceleration on all three axis is printed in m/s^2 at
the sampling rate (ODR). In polled Measuring Mode the instantaneous
acceleration is polled every 2 seconds. In most high-g applications,
a single (3-axis) acceleration sample at the peak of an impact event
contains sufficient information about the event, and the full
acceleration history is not required.
In this Max Peak Detect Mode the device returns only the over
threshold peak acceleration between two consecutive sample fetches or
trigger events. Instead of printing the acceleration on all three axis,
the sample application calculates the vector magnitude
(root sum squared) and displays the result in g rather than in m/s^2,
together with an bar graph.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Update yaml files to include warp7_m4 board in the platform_whitelist
for fxos8700 and fxas21002 sensors.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
Move to more generic tracing hooks that can be implemented in different
ways and do not interfere with the kernel.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We will implement this as a core feature using tracing points and make
it available to any application.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
WDT_NRFX is now enabling by default. Its configuration from proj.conf
files was removed.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
I removed GPIO configuration from board files and enabled them
as default in driver Kconfig file. All boards had GPIO ports
enabled that is why I decided to enable it by default.
Power management example was changed to use new driver.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
This commit contains several fixes for DTLS implementation, proposed in
a post-merge review of #9338.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Instead of having one delayed_work struct / IP address, use
only one delayed_work struct for lifetime timer. This saves
over 20 bytes / allocated address struct.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
With the recent changes to identity address handling the local
identity address is only guaranteed to be available once
settings_load() has been called. Move the initialization of dev_uuid
to the appropriate place.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a sample application to show the LP5562 driver. The three RGB
channels are used to set multiple colors after each other under the
assumption that accordingly colored LEDs are connected. Blinking is also
shown in multiple colors.
Signed-off-by: Johannes Hutter <johannes@proglove.de>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.
Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.
To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.
This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.
The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Added transition time support. Now if NODE received optional
parameters then they would get entertained by it.
Added two new models that is Generic Default Transition Time
Server & Client resp. to complete overall architecture to
support newly introduced architecture.
With this it was possible to implement
gen_move_set/gen_move_set_unack message handlers.
Removed redundancy from App & revised overall implementation.
Fixed Bugs. Upgraded coding style. Added & replaced comments to
improve code readability. Improved printk messages.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added time stamp based message filtering as per Bluetooth Mesh
Developer study guide for each Server. Now even if message
source address & TID is same even after 6 seconds then
that will get proceed otherwise will get ignored.
Coding style improvements.
If particular Server model receive Prohibited values as per
Mesh Model Specification then that message will not get entertained.
Now proper status code will get send if user upgrade
light_lightness_range_state & light_ctl_temperature_range_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Upgraded state binding algorithm & created separated
file for it. Moved light_default_status_init() from
device_composition.c to main.c. Shorten variables names
defined in struct light_lightness_state.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Fixing the min max range validation where condtions on
upper and lower bound are logically 'ANDed'. Fixing it
by logical ORing the result.
CID: 18325, 18326
Fixes Issue #9289
Fixes Issue #9290
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
This finishes refactor of splitting off net_config library name from
net_app library, started in c60df1311, c89a06dbc. This commit makes
sure that Kconfig options are prefixed with CONFIG_NET_CONFIG_
instead of CONFIG_NET_APP_, and propagates these changes thru the
app configs in the tree.
Also, minor dependency, etc. tweaks are made.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Make it possible to have multiple identity addresses as an LE
peripheral. For central role only the default identity is supported
for now. This also extends the flash storage in a backward compatible
way.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add DTLS support to socket echo_client and echo_server samples.
Additionally, move TLS-related configs to overlay-tls.conf config file,
to align with other examples.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
On flash NVS was stored one entry after another including the metadata
of each entry. This has the disadvantage that when an incomplete write
is performed (e.g. due to power failure) the complete sector had to be
rewritten to get a completely functional system.
The present rewrite changed the storage in flash of the data. For each
sector the data is now written as follows: the data itself at the
beginning of the sector (one after the other), the metadata (id, length,
data offset in the sector, and a crc of the metadata) is written from
the end of the sector. The metadata is of fixed size (8 byte) and for
a sector that is completely occupied a metadata entry of all zeros is
used.
Writing data to flash always is done by:
1. Writing the data,
2. Writing the metadata.
If an incomplete write is done NVS will ignore this incomplete write.
At the same time the following improvements were done:
1. NVS now support 65536 sectors of each 65536 byte.
2. The sector size no longer requires to be a power of 2 (but it
still needs to be a multiple of the flash erase page size).
3. NVS now also keeps track of the free space available.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
The nvs module has some disadvantages for larger block size. The data
header and slot are taking up to much space. A rewrite is proposed that
reduces the used storage space for systems with write block size > 4.
The data storage in flash is now one unit consisting of: data_length,
data_id, data and data_length again in a multiple of the write block
size. The data_length at the end is used to validate the correctness of
the flash write and also allows to travel backwards in the filesystem.
As a comparison, on a system with block size 8 byte, a 32 bit values
now fits 1 block including the metadata (length and id). This used to
be 3 blocks.
The data_length will occupy 1 byte if the data length is less than 128
byte, it will occupy 2 byte if the data length is 128 byte or more. The
data length is limited to 16383 byte.
Each write to flash is verified by a read back of the data.
The read performance is improved because reading is done backwards so
the latest items are found first.
When the filesystem is locked it can be unlocked by calling
reinit(), this will clear flash and setup everything for storage.
add sample documentation - README.rst
Update dtsi to include erase_block_size, use erase_block_size in sample
Update prj.conf to include CONFIG_MPU_ALLOW_FLASH_WRITE
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This will make adding properties to symbols in the base Zephyr Kconfig
files work the same as before.
I didn't actually spot any such cases, so this is just to play it safe.
It also makes the sample Kconfig symbols appear at the top in the
menuconfig interface, which might be nice.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These are no longer required. Kconfiglib expands references to
environment variables directly.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
CMake has several prototypes/signatures for the function
'target_link_libraries'. This commit migrates the usage of
'target_link_libraries' on Zephyr CMake libraries from the old 'plain'
signature to the new '<PRIVATE|PUBLIC|INTERFACE>' signature.
For technical reasons the two signatures can not be mixed. Each
library must exclusively use either the old or new signature.
The 'old' plain signature is equivalent to using the PUBLIC
signature. Migrating to use 'PUBLIC' is therefore expected to be a
safe change.
After the migration it will be possible to use the PRIVATE and
INTERFACE signatures on Zephyr CMake libraries. This is useful for
instance to fix issue 8438.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The old GCC ARM Embedded website on launchpad
(https://launchpad.net/gcc-arm-embedded) has been superseeded by the new
GNU Arm Embedded one
(https://developer.arm.com/open-source/gnu-toolchain/gnu-rm).
This also means a change of name from "GCC" to "GNU". Reflect this in
the enviroment variables so that the proper term is used henceforth.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Some reST syntax errors and doc edits got missed during the review
of PR #561 causing problems in the generated HTML.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This patch aligns documentation to changes in imagetool.py released
in mcuboot 1.2 (latest release).
Also adds note about workaround for possible timeout while erasing
image-slot on some devices (like nRF52840 SoC)
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The application does nothing useful, it just enables Link Layer
Discovery Protocol support which starts to send LLDP network packets
to ethernet network interface. Note that the LLDP packets are only
sent to those network interfaces that claim to support LLDP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Remove NET_LOG / NET_BUF_LOG settings, instead just enable SYS_LOG
- Simplify by also removing SYS_LOG_SHOW_COLOR, INIT_STACKS and
NET_STATISTICS. These can be enabled by user if wanted/needed.
Signed-off-by: Michael Scott <mike@foundries.io>
Allow user to configure a program that is executed after the
network interface is created and IP address is setup.
This can be used e.g., to start wireshark to capture
the network traffic of the interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Default value 2 was not enough for mcast addresses table.
Core stack adding mcast addresses on various reasons. Also
coaps_client trying to create mcast context for some purpose.
mcast address is not in lookup table, so binding fails. Add
CoAP sample related mcast address to table and then bind the
context.
Fixes#9131
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Let's add an overlay file to enable using the WNC-M14A2A LTE-M
modem with the LwM2M client.
Also, update documentation for it's use.
Signed-off-by: Michael Scott <mike@foundries.io>
Adding IPv4 autoconf sample application that can be used to
test IPv4 autoconf functionality.
Signed-off-by: Matthias Boesl <matthias.boesl@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This app will not fit in the 96b_nitrogen board with ECC enabled.
"real-ld: region `SRAM' overflowed by 68 bytes". Disable the feature
explicitly since a subsequent patch will auto-enable it for all
combined Bluetooth Host-Controller builds.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Thread registers multiple unicast and multicast adresses by default. As
they are exchanged with Zephyr interface, we need enough buffers to
store them all.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit adds TLS support to socket echo_client/echo_server samples.
Credentials used are the same as in the non-socket versions of these
samples, therefore they can be easily tested with net-tools utils.
Maximum payload size for the client was sligtly reduced to fit the
encrypted data within 1280 bytes.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add CA certificates to http_get and big_http_download samples. Use
socket options to configure TLS connection - TLS certificates are now
validated.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The Mesh specification doesn't support more than 32 transport layer
segments, the way the number was so far derived from the advertising
buffer count could result in a highre numbe than 32, thereby wasting
memory. Make the number of supported segments build-time configurable
through a new BT_MESH_TX_SEG_MAX configuration option.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The number of buffres influences e.g. the maximum SDU size, which in
turn influences call stack consumption. Use lower values where a high
number of buffers isn't necessary, and use the default (6) where it's
sufficient.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Do not enter Low Power states once the test execution is done. This
is needed to avoid the flashing issues which were seen when system
is in deep sleep states.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Refactor the prj*conf files so that there is only one master
prj.conf and several overlay conf files that add / change
only minor subset of functionality.
Use the overlay files like so:
cmake -DBOARD=nrf52840_pca10056 \
-DOVERLAY_CONFIG=overlay-ot.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The logic for error checking after net_pkt_pull was inverted -
build_pkt_reply would exit in case net_pkt_pull succeeded. In result no
responses were sent by echo_server.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If -fno-strict-overflow compiler flag is disabled, then this warning
is printed:
samples/net/throughput_server/src/server.c:157:6: \
error: assuming signed overflow does not occur when assuming \
that (X + c) >= X is always true [-Werror=strict-overflow]
if (new_print > curr) {
Fixes#8924
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Refactor the prj*conf files so that there is only one master
prj.conf and several overlay conf files that add / change
only minor subset of functionality.
Use the overlay files like so:
cmake -DBOARD=nrf52840_pca10056 \
-DOVERLAY_CONFIG=overlay-ot.conf ..
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If echo-server receives a IPv6 packet with large header (e.g HBHO)
build_reply_pkt() function failed to remove IPv6 header. Reason is
net_buf_pull() doesn't work if header length is more than one
fragment. net_pkt_pull() solves the issue.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This force CONFIG_BT_DEVICE_NAME_MAX to be set even in boards where
CONFIG_BT_SETTINGS won't be defined so it exercise such configuration.
In addition to that set a long name that would not fix in the
ScanData.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fixing copy paste error, where ipv4 member of
the structure is used in ipv6 branch.
CID: 187074
Fixes Issue #8992
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
On some architectures tick time cannot be expressed as integer
number of microseconds, introducing error in calculations using
sys_clock_us_per_tick variable.
This commit deprecates the sys_clock_us_per_tick variable and
replaces its usage by more precise calculations based on
sys_clock_hw_cycles_per_sec and sys_clock_ticks_per_sec.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Enabling internal processing thread allows implicit initialization
and processing log messages in case mutlithreading is enabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
With the change to the configuration files, we can now compile
this sample for any platform that uses only the default prj.conf file:
nrf52840_pca10056
nrf52840_pca10059
usb_kw24d512
Update the sample.yaml file to remove the excludes.
Signed-off-by: Michael Scott <mike@foundries.io>
Let's rename README to README.rst and add:
- Some nice formatting for existing content
- Requirements section (including handy links)
- Build and Running section (including multiple overlay options)
Signed-off-by: Michael Scott <mike@foundries.io>
Add support for NXP MCR20A 802.15.4 module as an overlay config file.
Use this file like so:
cmake -DBOARD=usb_kw24d512 \
-DOVERLAY_CONFIG=overlay-mcr20a.conf ..
Signed-off-by: Michael Scott <mike@foundries.io>
Add support for TI CC1200 802.15.4 module as an overlay config file.
Use this file like so:
cmake -DBOARD=quark_se_c1000_devboard \
-DOVERLAY_CONFIG=overlay-cc1200.conf ..
Signed-off-by: Michael Scott <mike@foundries.io>
When the CC2520-specific configs are removed from the prj.conf
file, the sample can be built for hardware that supports
802.15.4 natively w/o any changes to the prj.conf like so:
cmake -DBOARD=nrf52840_pca10056 ..
cmake -DBOARD=usb_kw24d512 ..
The CC2520-specific settings now live in overlay-cc2520.conf
which can be used like so when building for devices that can
use it:
cmake -DBOARD=quark_se_c1000_devboard \
-DOVERLAY_CONFIG=overlay-cc2520.conf ..
Later, support for other optional HW like CC1200 and MCR20A
can be added in a similar way.
Signed-off-by: Michael Scott <mike@foundries.io>
ESP32 does not like newlib, exclude for now to get a clean sanitycheck
run. We have issues about this already.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Documenting new logger features: waking up processing thread
and internal logger processing thread.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
When enabled, logger is creating own thread which processes buffered
logs. When no logs to process, thread sleeps for configurable period.
Thread can be waken up if number of buffered log messages exceeds
configured threshold. Logging sample aligned to use new feature.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
If we use newlib the isdigit (and other similar functions) return an
error as char can possibly be viewed as signed:
usr/include/ctype.h:57:54: error: array subscript has type ‘char’ [-Werror=char-subscripts]
#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)(__c)])
Explicity cast to unsigned char so we deal with both this warning and
possible warning when -Wpointer-sign is enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Removed redundant and unused config options from conf files.
Added separate files for handing power management and device
handling functions.
Added the PM policy based on the next timeout event instead of
simply advancing to the next power state.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Log API can be used before user can explicitly initialize the logger.
In order to ensure that logger core is ready to buffer log messages
it must be initialize as early as possible. Initialization does not
include initialization of default backend since driver may not be
ready and backend is needed only when log messages are processed.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Add config file that enables to run http_get and big_http_download
samples with TLS enabled and receive the data through HTTPS.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If we use newlib the isdigit (and other similar functions) return an
error as char can possibly be viewed as signed:
usr/include/ctype.h:57:54: error: array subscript has type ‘char’ [-Werror=char-subscripts]
#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)(__c)])
Explicity cast to unsigned char so we deal with both this warning and
possible warning when -Wpointer-sign is enabled.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If temperature value are out of range which is from 0x0320
to 0x4E20 then no relevant get message handler will execute.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Added extra case under state binding's switch statement for
Lightness i.e DELTA_LEVEL. Also upgrade binding between
1. root element's LEVEL state & Light Lightness Actual state.
2. Light Lightness Linear state & Light Lightness Actual state.
3. Light CTL lightness state & Light Lightness Actual state
This is as per Bluetooth Mesh Model Specification 3.3.2.2.3.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Now on reboot, NODE as client do not start message publishing
with TID = 1. Instead of that it would start with any random value
from 0 to 255.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Improved code readability by declaring some pre-processor
definitions in device_composition.c
Remove model_instance variable from some structures define in
device_composition.h & its relevant code.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Update Vendor model message handlers & make it to work as per
TID like other Models defined by SIG. Removed union based data
extraction mechanism.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Updated state Binding as per PTS test requirements. Now if
gen_onoff_server & gen_onpowerup_server received Prohibited values
then they will not react on it further. Plus make necessary changes
wherever required for message handlers as per Mesh Model
Specification which is mostly regarding to default & range values.
Now right Status code would get publish in response to set lightness
& temperature range. Also upgrade Message handler
gen_delta_set_unack() algorithm as per PTS requirements.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This simple application periodically prints the ambient temperature.
Optional support for threshold triggers is provided.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Current config files for TLS qemu_x86 contain unrecognized
`CONFIG_RAM_SIZE`, which causes cmake to fail during project generation.
They should not be needed anyway, as qemu_x86 defaults to 8 MB of RAM.
Additionaly, echo_client crashes in this configuration with default main
stack size, hence increase it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add loopback function. This function can be used to test
USB device drivers and device stack connected to linux host
and has the similar interface as "Gadget Zero" [1] of the Linux
kernel.
Use modprobe usbtest to load the module, see also [2] for the
description of the tests and for Vendor and Product ID of the
"Gadget Zero". The userspace tool testusb [3] is needed to start
the tests.
[1] linux/drivers/usb/gadget/function/f_loopback.c
[2] linux/drivers/usb/misc/usbtest.c
[3] linux/tools/usb/testusb.c
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Allow gPTP code to be run as a linux process and communicate
with gPTP daemon running in linux host.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Removed redundancy from state binding & make it simplified.
Avoid partial state binding in case of state_binding() function
get called with invalid or IGNORE arguments.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Changes buffer length for all GET handlers as per patter of
< 2 + parameters length (in bytes) + 4 >
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This patched improved architecture of already implemented Vendor
Model. Now there are 4 separate opcodes for Vendor viz;
get, set, set_unack & status. This helps to setup
<command + response> mechanism.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
These two tests ask for lots of priority levels, more than the 32
maximum allowed by SCHED_MULTIQ (which is by design: if you have
requirements like that DUMB or SCALABLE are better choices due to the
RAM overhead of MULTIQ), so the build will fail on boards that defined
MULTIQ as default.
Don't let the platform choose the scheduler backend, ask for SCALABLE
explicitly.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Zephyr 1.12 removed the old scheduler and replaced it with the choice
of a "dumb" list or a balanced tree. But the old multi-queue
algorithm is still useful in the space between these two (applications
with large-ish numbers of runnable threads, but that don't need fancy
features like EDF or SMP affinity). So add it as a
CONFIG_SCHED_MULTIQ option.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
By default gPTP is not run over VLAN but if needed that can be
done by setting CONFIG_NET_GPTP_VLAN and CONFIG_NET_GPTP_VLAN_TAG
options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When we enabled SEGGER support on the nRF51 series SoCs, this sample
started to fail due to small amount of memory avaiable on some nRF51
SoCs. This commit updates the min_ram property in order to exclude
failing boards from the build.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Add sample application for NXP PCA9633 LED driver. This application
test the 4 LEDs by doing the following:
- turn on LEDs
- turn off LEDs
- set the brightness to 50%
- turn off LEDs
- blink the LEDs
- turn off LEDs
The application is based on the stm32373_eval board and expects to have
a PCA9633 LED driver on the bus I2C-1 at the address 0x62.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Removed TID implementations wherever it is not required as per
Bluetooth SIG Mesh Model Specification. Removed unnecessary
comments. Add status code value to get publish along with
Light Lightness range status message.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
Update message handlers & correct nubmber of bytes that every
handlers should fetch for their further processing as per
Bluetooth SIG Mesh Model Specification.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
When we enabled SEGGER support on the ST SoCs we now how some systems
with really small amounts of memory that the sample can't be built for.
Set a min_ram to exclude such systems.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This allows zephyr to listen LLMNR DNS queries sent by Windows
and respond to them. See RFC 4795 for details.
The feature requires that hostname is set properly to the
zephyr device and LLMNR is configured properly.
Typically following config options are enough for this support:
CONFIG_NET_HOSTNAME_ENABLE=y
CONFIG_NET_HOSTNAME="zephyr-device"
CONFIG_DNS_RESOLVER=y
CONFIG_LLMNR_RESPONDER=y
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
By default the LLMNR is disabled in this sample. You can enable
it by setting CONFIG_LLMNR_RESOLVER=y
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The application does not do much, it just registers to a callback
in order to get information about gPTP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is not necessary to link 'app' with mbedTLS because mbedTLS is
covered by the 'APP_LINK_WITH_MBEDTLS' mechanism that automatically
links 'app' with mbedTLS.
This patch removes the redundant target_link_libraries invocations.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Make corrections in state binding of Servers as per Mesh Model
Specifications. Previously, when OnPowerUp state equal to 0x02,
then Light Lightness actual state was not assign to last power
down value. Plus when Generic OnOff state changes by client,
then Light Lightness Actual state value get assigned as Light
Lightness Last value instead of default one.
All these issues has fixed here.
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This is a application demonstrating a Bluetooth mesh node in
which Root element has following models
- Generic OnOff Server
- Generic OnOff Client
- Generic Level Server
- Generic Level Client
- Generic Power OnOff Server
- Generic Power OnOff Setup Server
- Generic Power OnOff Client
- Light Lightness Server
- Light Lightness Setup Server
- Light Lightness Client
- Light CTL Server
- Light CTL Setup Server
- Light CTL Client
- Vendor Model
And Secondary element has following models
- Generic OnOff Server
- Generic OnOff Client
- Generic Level Server
- Generic Level Client
- Light CTL Temperature Server
Signed-off-by: Vikrant More <vikrant8051@gmail.com>
CDC ACM is not needed in webusb, communication is going through Bulk
endpoints. Endpoint numbers stay the same only Interface number
changed, so basically only this change is needed:
- .then(() => this.device_.claimInterface(2))
+ .then(() => this.device_.claimInterface(0))
this.device_.claimInterface({2,0}) apart from removing serial port
commands.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Console subsystem is intended to be a layer between console drivers
and console clients, like e.g. shell. This change factors out code
from shell which dealed with individial console drivers and moves it
to console subsystem, under the name console_register_line_input().
To accommodate for this change, older console subsys Kconfig symbol
is changed from CONFIG_CONSOLE_PULL to CONFIG_CONSOLE_SUBSYS
(CONFIG_CONSOLE is already used by console drivers). This signifies
that console subsystem is intended to deal with all of console
aspects in Zephyr (existing and new), not just provide some "new"
functionality on top of raw console drivers, like it initially
started.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Check the return value of close() in socket_dumb_http.c
If non-zero, print the error code
Fixes#8413.
Signed-off-by: Satya Bhattacharya <satyacube@gmail.com>
A HID application can no longer write to the default
interrupt IN endpoint because the addresses are assigned
dynamically. Add hid_int_ep_write() function and leave
it to the hid-core to call the usb_write() with the correct
endpoint address.
fixes: #8424
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This enables testing of the scan, connect, and disconnect
wifi_mgmt functions of the wifi shell module for
the cc3220sf_launchxl.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
The ARRAY_SIZE() utility macro will actually test the parameter types,
and ensure that it is only called with arrays, and not arrays decayed
to pointers.
Changes were performed with a simple Coccinelle script.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This adds basic support for declaring gpio nodes in dts for nrf52.
The dts.fixup provides mapping for the generated defines to the config
defines currently used by the nrf gpio driver.
Existing boards that use nrf52 are updated.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Due to a bug in KBuild, bluetooth samples needed to #include the gatt
sources to re-use code between samples. This bug was not ported to
CMake so we can stop applying this workaround.
gatt source files are now directly added to the 'app' library instead
of having adapter source files in the app's src directory that
\#include's the gatt files.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The UART_NRFX_FLOW_CONTROL Kconfig symbol was renamed to
UART_0_NRF_FLOW_CONTROL in commit 3f99eefe5a ("drivers: uart: Rename
nrf5 namings to nrfx").
The assignments in samples/bluetooth/hci_uart/microbit.conf and
samples/bluetooth/hci_uart/nrf5.conf were updated in the same commit,
but to the wrong name. Change them to use the correct name.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
UART driver renamed to keep the same convention as SPI and TWI drivers.
All substrings: "UART_NRF5" in defines renamed to "UART_NRFX_UART".
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
Increasing the network buffer count for frdm-k64f so that the
device will not run out of memory so easily.
Fixes#7678
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If an entropy driver is available during build, use it to gather
entropy rather than relying on sys_rand32_get(), which provides no
guarantees that the provided numbers will be good enough from an
encryption standpoint.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Default stack size was too small for main thread in qemu_x86
configuration and resulted in stack overflow during initialization.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use logging settings consistent with other samples/net/sockets/ apps
(which includes error logging enabled by default).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
No need to have a category for grove, instead moved the samples to both
sensors and display based on what the sample does.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is not used by Zephyr directly and comes from a test framework. We
do matching in the sample.yaml file now.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With updates to bt_gatt_notify and bt_gatt_indicate it is now possible
to pass the Characteristic attribute instead of its value which makes
the code able to verify if attribute properties are set correctly.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Null-checking `pkt` before making a call to net_pkt_unref() suggests
that it might be NULL, but the pointer is dereferenced before it's
checked. Perform the check at the beginning of the function and
dereference and drop its reference unconditionally afterwards.
Coverity-ID: 178789
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
While printing debugging information, an out of bounds write could
happen while trying to write out the NUL byte in the url array.
Coverity-ID: 178790
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The recv() call can return errors, so handle them before reading the
received byte. Unrecoverable errors will just trigger the client
socket to be closed as usual.
Coverity-ID: 182778
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The original implementation of CONFIG_THREAD_MONITOR would
try to leverage a thread's initial stack layout to provide
the entry function with arguments for any given thread.
This is problematic:
- Some arches do not have a initial stack layout suitable for
this
- Some arches never enabled this at all (riscv32, nios2)
- Some arches did not enable this properly
- Dropping to user mode would erase or provide incorrect
information.
Just spend a few extra bytes to store this stuff directly
in the k_thread struct and get rid of all the arch-specific
code for this.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some changes were made in the sample implementation that made the test
fail due to differences in the expected output.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Find the device and query its capabilities just once at boot, then
go through a list of tests to perform.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit moves the bit timing (PROP, BS1, BS2 segments and SWJ)
from Kconfig to the device-tree and fixes issue #7933
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
We aren't interested in doing error handling for close(), close()
is itself on error handling path, and its purpose if to free
socket resources.
Coverity-CID: 186062
Fixes: #7713
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This symbol was removed in commit 748f724d82 ("serial: dts: remove
!HAS_DTS related Kconfig"). The setting should come from DTS now.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
These are no longer needed since commit 4dc9e5b2de ("kconfig: Get rid
of 'option env' bounce symbols"). The C tools are likely to get rid of
them soon too.
The APPLICATION_BASE symbol (option env="PROJECT_BASE") triggered a
compatibility warning, because 'option env' symbols now need to have the
same name as the environment variables they reference to be compatible
with Kconfiglib. APPLICATION_BASE is unused, so just remove it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Gets rid of a warning added in commit 6eabea3a7e ("Kconfiglib: Warn
for unquoted string defaults"), which will soon be an error (because a
simple warning whitelist will be used).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Remove conflicting option CONFIG_NET_IPV6 since it got selected due to
CONFIG_NET_APP_NEED_IPV6 in netusb configuration file.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Was written as "CONFIG_NET_SLIP", which doesn't exist.
Jukka Rissanen indicated in
https://github.com/zephyrproject-rtos/zephyr/pull/7810 that
CONFIG_NET_SLIP_TAP doesn't need to be enabled here ("I prefer we remove
the line completely as the TAP is enabled automatically for qemu_x86"),
so remove the assignment rather than fixing it.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This symbol never existed, and has some dead code associated with it:
https://github.com/zephyrproject-rtos/zephyr/issues/7848
Just remove the assignment to the undefined Kconfig symbol for now. The
associated code could be removed separately if it isn't needed anymore.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
CONFIG_IEEE802154_CC2520_AUTO_ACK started out as
CONFIG_TI_CC2520_AUTO_ACK, which was removed in commit 6b43821f20
("net: Remove legacy Contiki based uIP stack"). The assignments were
later renamed in commit 573774a9bf ("drivers/net/ieee802154: Change
configuration prefix").
Remove them.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The UART_NRF5_BAUD_RATE Kconfig symbol was removed in commit
748f724d82 ("serial: dts: remove !HAS_DTS related Kconfig"). Looks
like this has been moved to DTS.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
During the spi rework we removed the qmsi spi drivers so we no longer
have Kconfig symbols or drivers related to CONFIG_SPI_QMSI{_SS}. There
are a few references still around that we should remove
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
With recent changes to open-amp we can now include and build it directly
as a zephyr library rather than doing a recursive make. We remove
ext/lib/ipc/open-amp.cmake as part of this change and introduce a
Kconfig option for open-amp.
Fixes: #7673
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Move open-amp to be in ext/lib/ipc/open-amp/open-amp. This allows us to
be Zephyr specific files and config like README (for import),
CMakeLists.txt file, Kconfig, etc in ext/lib/ipc/open-amp/ that don't
conflict with any files that might have the same name in
ext/lib/ipc/open-amp/open-amp.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
With recent changes to libmetal we can now include and build it directly
as a zephyr library rather than doing a recursive make. We remove
ext/hal/libmetal.cmake as part of this change and introduce a Kconfig
option for libmetal.
This is a partial fix for issue #7673.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_1 never existed.
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_X has help text "Version 1.1 or 1.2".
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This symbol was removed in commit 33118f9212 ("sensor: grove: use
global sensor init priority"), which switched over to using
CONFIG_APPLICATION_INIT_PRIORITY.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The support for Galileo board is bitrotted as the config file
contains obsolete values. As testing this old board is difficult
lets remove the config files. These can be re-introduced with
proper and tested settings if needed.
Fixes#7814
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
CONFIG_DEBUG_IP_BUFS was commented out but specified in galileo
specific conf files. The Kconfig symbol doesn't exist so lets remove
it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove non-existent Kconfig symbol references. An additional (but
related) change is the removal of all persistent storage symbols from
the Arduino 101 Bluetooth shell app, since BT_STORAGE no longer
exists.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This symbol started out as CONFIG_BLUETOOTH_MAX_CMD_LEN, which was
removed in commit 50678b03cb ("Bluetooth: Reuse HCI command buffers
for the command response").
The non-existing symbol in the assignment was then renamed to
CONFIG_BT_MAX_CMD_LEN by commit 2975ca0754 ("Bluetooth: Kconfig:
Rename CONFIG_BLUETOOTH_* to CONFIG_BT_*").
Remove the assignment.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The prj.conf file was using wrong VLAN tag option names.
The correct names are CONFIG_SAMPLE_VLAN_TAG and
CONFIG_SAMPLE_VLAN_TAG_2 as defined in Kconfig file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This symbol does not exist. Not sure what was intended.
There's HAS_SEGER_RTT, but that symbol has no prompt, meaning .config
values have no effect on it. It is 'select'ed by the SoCs.
Remove the assignment, which is a no-op.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Probably left over from old ZOAP library. Stripping of headers
not required now.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Removed unwanted code, fine tuned a bit. Original use case of
sample (verify CoAP GET, PUT and POST methods) against coap-server
not changed.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
If client removes observer then it reply with RESET message for
further observer notifications. That means coap-server should stop
sending further notifications to the client.
Current sample unref the packet as soon as it finds pending message
and doesn't bother about message type.
Fixes: #6534
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This adds example and testing code for CAN driver.
Tested on stm32f072b disco.
Examples are given for:
- can_configure
- can_attach_isr
- can_attach_msgq
- can_send
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit adds a sample application using OpenAMP for remote procedure
calls on the LPCXpresso54114. It is adapted from the RPMsg-Lite sample
application added in PR #5960, and uses the IPM driver to provide
interprocessor interrupts.
Signed-off-by: Kristian Klomsten Skordal <kristian.skordal@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Test ArgonKey board. It provides an example of how to test
all the sensors on-board. It currently enables by default
following sensors:
LPS22HB pressure/temp
HTS221 humidity
LSM6DSL accel/gyro plus LIS2MDL magn connected to it.
VL53L0x proximity
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Minimal driver for ILI9340 LCD display driver including support
for adafruit 2.2" LCD display (1480)
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Enable CONFIG_NET_DHCPV4, while keeping static IP configuration,
which allows the app to work both with static IP (e.g. when
connected to a workstation without DHCP server) and with DHCP (e.g.
when connected to a router). When using DHCP, getting an address
may take some time, during which getaddrinfo() may fail due to a
timeout. So, add retries for this call.
Tested with qemu_x86 (non-DHCP) and frdm_k64f (both DHCP and
non-DHCP).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add MCUX IPM sample application. It can be run on lpcxpresso54114
board at the moment.
We first build the slave core image out of the remote/ dir than the
primary core image is build which includes the slave core image.
Origin: Original
Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If coap-client(e.g. RPL BR) wants to get notifications from
coap-server(RPL-node) about parent status, client has to register
observer for notifications.
RPL node application modified to toggle the LED. Do not maintain any
ON/OFF states. Also removed Sparrow (contiki border router) related
patch.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add CoAP client to RPL BR application. Which can be used to
control leds and get rpl related information from leaf nodes
though CoAP messages. Build toplogy matrics and send it to
Web UI.
Enhanced Web UI components (Interfaces, RPL, Neighbors, Routes
and Topology tabs). Added buttons to control leds on lead nodes.
Added JSON support to handle led on/off requests from UI.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This is a very simple RPL border router sample application.
It provides HTTP(S) and net-shell interface for getting admin
information about neighbors and routes.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
L2 could take advantage of such hardware capability, when supported by
the device. This is also required for OpenThread.
Fixes#5714
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Exclude usb_kw24d512 from wpanusb sample until the the sample
has been reworked and is more generic.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Enabling relevant hardware, currently only winc1500 on
quark_se_c1000_devboard. But it could be easily extended to other
drivers/boards.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use zephyr-app-commands for portability instead of assuming Make and
Unix, and add a missing "run" goal.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Use zephyr-app-commands for portability instead of assuming Make on
Unix, also adding a missing "flash" invocation.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Printing the output length for all encryption/decryption operation will
make it easier to know if a particular crypto driver shim provides this
information. TinyCript and mbedTLS were not providing this, making the
out_len field useless.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Add a sample.yaml file for Nordic platforms (QEMU is not supported due
to the lack of flash partitions), both nRF51 and nRF52.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
If the incoming packet fragments doesn't have any link layer
header then build_reply_pkt() will set reply packet fragment's link
layer header space to zero. Which is causing issue in case of IPv4.
ARP layer is trying to fill Ethernet headers, but fragments
ll header length is set to zero.
Just use net_pkt_copy_all() to copy payload. That should be enough.
Fixes#6564
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This is required to test the server with ab (ApacheBench), which
itself is an important integration test for the IP stack.
Fixes: #7377
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Using OMA Technical Specification LwM2M Enabler 1.0.2 dated
Feb. 9, 2018, let's mark the OPTIONAL resources for an LwM2M
Device object (Section E.4 "LwM2M Object: Device")
As a result, the Device object no longer configures the default
buffers for data storage of several optional resources.
The LwM2M client sample is also changed to to setup these read-only
buffers instead.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
This adds the "old" (pre-windows8) way of doing microsoft-
specific USB descriptors, alongside the v2.0 way of doing
the same.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
This adds some vendor-specific microsoft USB descriptors, which
makes the win8/win10 enumeration process to report a "WINUSB"
capability, which in turn automatically binds a WinUSB.sys driver
to a specific set of interfaces. This, in theory, makes userspace
drivers easier to handle in win32/win64 platforms.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
In samples, using CHECK() helper macro, make it exist in case of
error. This makes sure that negative value (error indicator) can't
be passed as argument to other function and fixes Coverity reports.
Coverity-CID: 183062
Fixes: #6101
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The application started to send data before it had any IP
address configured. This prevents communication to the server.
Fixes#7502
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Zephyr supports fatfs, nffs and fcb as storage layer. fatfs and nffs
are less suited for application in memory restricted IC's. fcb has a
smaller footprint but has a complex api.
The proposed module is a module with a even smaller footprint compared
to fcb and a simple interface for reading and writing entries. The
module provides wear levelling of flash. This allows the module to be
used not only to store configuration settings but to store device state
(e.g. state of a light switch over reboots) of a zephyr device.
Fixes buffer overflow by introducing maximum read length in nvs_read()
and nvs_read_hist().
Fixes nvs_write() not to reflash the same data. Allows the user to do
call nvs_write() for all defined entries without worries about flash
wear.
Fixes garbage collection error where wrong data could be copied.
Add nvs_delete() to allow deleting a stored entry. A deleted entry will
not be copied to a new flash sector
Include flash wear information in the README.md documentation
0/25 Update module after reviewers remarks, added documentation to
nvs.h, removed README.md by nvs.rst in doc/subsystems folder
04/26 Update module after reviewers remarks, updated nvs.rst, added more
documentation to samples/subsys/nvs/src/main.c, updated doxygen info
in nvs.h (hope this time it works).
04/26 Update subsystems.rst to include nvs.restart
04/27 Updated nvs.c and nvs.h to avoid a possible flash deletion loop
when the file system is full.
04/29 Updated nvs_write to detect and ignore deletes of non-existing
items
05/06 Update NVS module to return standard error codes, removed low
level API, added configuration options. NVS now uses the board dts to
determine the flash storage location (FLASH_AREA_STORAGE_OFFSET).
05/06 Update nvs.rst. Updated intendation and added intermediate
variables in nvs.c to make the code easier to read.
05/06 Update nvs.rst.
05/07 Update nvs.rst
05/08 Changed the API to a more standard file system API.
05/08 Removed cnt_max from nvs_read() as it is not used.
05/08 Removed #ifdef(CONFIG_NVS_LOG) from nvs_priv.h, now the module can
be build with debugging off.
05/09 Removed configuration options for SECTOR_SIZE, SECTOR_COUNT and
MAX_ELEM_SIZE. It is now easy to support multiple NVS filesystems on
one or multiple devices. Changed logging to support newlib systems.
Thanks to Olivier Martin for reporting and proposed changes.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Due to higher traffic demands when using 6lowpan, we should raise
the default BT RX buffer counts and sizes.
This avoids the following error on some HW:
[net/buf] [WRN] net_buf_alloc_len_debug: bt_buf_get_rx():4985:
Pool 0x20009424 low on buffers.
[net/buf] [WRN] net_buf_alloc_len_debug: bt_buf_get_rx():4985:
Pool 0x20009424 blocked for 0 secs
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Make sure that we compile sanity checked application with
more config options in order to catch compile issues faster.
In this case DHCPv4 + debugging options are enabled for
sanity checker.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If DHCPv4 was enabled, then there was compile error as the code
was still using wrong variables.
Fixes#7342
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This ensures the every characteristic has a value attribute declared
with the same UUID since the old macro did not declare the value the
application would normally have to declare one itself using a different
UUID which is not allowed.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The sequence number was acting as a stop-gap for missing persistent
storage. Now that we have the settings support in place it's no longer
needed.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Enable BT_SETTINGS and remove any custom flash access used for the
sequence number. We do settings_load() before bt_mesh_provision() and
use the return value from the latter to identity that settings_load()
had recoved a full configuration.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Keeping the model struct same sized, change the element pointer to two
indexes, and add a flags member that will be used to track pending
storage actions.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Instead of having an RPL-specific storage timer, introduce a generic
one that'll eventually be used for all persistent storage.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
NET_APP settings was missing the device name and enabling the net shell
is nice to verify runtime configuration as well.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add initial skeleton for doing settings-based persistent storage for
the mesh network state. This patch only includes restoring some core
network state such as IV Index, Sequence number, Net Keys, App Keys
and the Replay Protection list. The remaining state, and actually
storing the state, is left for follow-up patches.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Header was missing after merging PR #6970
`Add support for File System multiple instances`
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Assign the appropriate disk name Kconfig option to the
usb mass storage sample test.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Introduce a basic skeleton for peristent storage based on the settings
subsystem. Also enable support for this to the peripheral sample
application, so the new code gets exersized by CI. For now, the
implementation provides the same level support as the bt_storage API
ever did, i.e. for the identity address and the IRK.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
FS_FLASH_MAP_STORAGE keyword enables the storage partition,
but it was depend on flash_map module which is unused by
NFFS. This patch makes it independent thanks
to it is possible to enable the storage partition
without flash_map module.
FS_FLASH_MAP_STORAGE was renamed to
CONFIG_FS_FLASH_STORAGE_PARTITION
as it is independent for flash_map.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The main stack size was too small for this sample application
when TLS was enabled. Increasing it to 1504 bytes.
Fixes#7269
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add hardware dependencies and filters to make sure we do not explode if
for example we try to build a sample/test using rtc when the platform
does not support that.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This patch moves USB DFU class driver to subsys/usb/class.
For the first the USB DFU class driver depends on DFU image
manager and partition layout and is limited to use as an
application for the bootloader. The driver fetches the
information about the flash, erase block size, write block
size and partitions offset from the DT now. The driver has
two interfaces associated with the two partitions "SLOT-0"
and "SLOT-1". The "SLOT-0" can only be read.
In the following work the class driver can be extended so
that it can be used from the bootloader and update a flash
region directly from the bootloader.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Change the flash_shell sample from using FLASH_WRITE_BLOCK_SIZE
definition to using the flash_get_write_block_size() api for the
selected flash_device.
This fixes the flash_shell sample when using multiple flash devices
with different write block sizes.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Add sample application for TI LP3943 LED driver. This application
displays a continuous pattern that turns on 16 LEDs at 1s one by
one until it reaches the end and turns off LEDs in reverse order.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Payload dump function not adopted to multi fragments CoAP packet. Still
assumes whole payload exists in single packet. Also does not handle all
return cases of coap_packet_get_payload() function, which is causing
coverity failures.
Coverity-CID: 185277
Coverity-CID: 185278
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The NFFS partition at the end of flash is also useful for any other
file system or even the Flash Circular Buffer (FCB). Rename the
partition from 'nffs_partition' to 'storage_partition' and make it
depend on a new hidden Kconfig entry which the relevant users will
select (such as NFFS and FCB).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the LwM2M client sample documentation with usage examples
of the newly introduced overlay-*.conf fragments. Remove the
references to prj_dtls.conf.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The file overlay-bt.conf contains only the needed CONFIG items to
support Bluetooth networking.
For example, DTLS-enabled BLENano2 HW can be supported with the
following build:
cmake -GNinja -DBOARD=nrf52_blenano2 \
-DCONF_FILE="prj.conf overlay-bt.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Instead of maintaining a nearly identical copy of prj.conf to support
DTLS, let's replace it with an overlay-dtls.conf file containing only
the CONFIG settings needed to support DTLS. This can be used via the
-DCONF_FILE command line argument when configuring the sample:
Non-DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 ..
DTLS-enabled build:
cmake -GNinja -DBOARD=qemu_x86 \
-DCONF_FILE="prj.conf overlay-dtls.conf" ..
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Following tests were failing on a microcontroller with 32KB flash:
test-mbedtls
kernel.common
The min_flash option has been added in the test case yaml files.
Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com>
This is a simple cosmetic change. Each field in the BOS (Binary
Object Store) descriptor has a comment, to understand it better.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
Rework samples using LED and GPIO to enforce use of "CONTROLLER"
as LED and PGIO postifx.
Change impact all samples that could be run by boards yet moved to
GPIO node generations, which is only STM32 for now
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
In sample application of COAP there is no need of payload
for GET method & it is only applicable to put
and post methods are modified in coap-client.c
Signed-off-by: Tarun Kumar Agarwal <tarun.kumar.agarwal@intel.com>
- Added example OpenThread projects for KW41Z in echo/server samples
- Added projects to sample.yaml for sanity testing
Signed-off-by: David Leach <david.leach@nxp.com>
Assign special Product ID (0x101) to wpanusb protocol exporting
IEEE802.15.4 over USB.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This test prints out to the console, when testing on real hardware,
parse output and compare to what we are expecting to avoid timeouts.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove galileo as the only board to build for and cleanup the filtering.
Also, remove arduino 101 conf, this is not a networking platform we want
to tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Expand the contents of the smp_svr sample documentation so that it
covers all steps needed to perform DFU over BLE.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This application just enables VLAN tag for ethernet interface.
Set CONFIG_SAMPLE_VLAN_TAG option to define the desired VLAN tag.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some of the sanitycheck tests were having too small limit for
network buffers when compiling for sam_e70_xplained board.
Increase the buffer limits when testing this for this board.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some device include a temperature sensor, usually used as a
companion for helping in drift compensation, that measure the
die temperature. This temperature IS NOT related to the the
ambient temperature, hence a clean separation between the two
is required.
This commit introduces a clean separation between the two
types of temperature leaving the old deprecated definition
still there.
The list of current drivers that read the die (and not the ambient)
temperature is the following:
- adxl362
- bma280
- bmg160
- bmi160
- fxos8700
- lis3mdl
- lsm6ds0
- lsm6dsl
- lsm9ds0
- mpu6050
Signed-off-by: Armando Visconti <armando.visconti@st.com>
Add multifunction composite test for building USB device with HID and
MSC functions.
Fixes: #2613
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The current problem with HID is that we need to "patch" static
descriptor table with the size of report descriptor defined in the
user application.
The proposed solution is to have composite_pre_init() defined with
priority CONFIG_KERNEL_INIT_PRIORITY_DEVICE which should run before
composite_init() defined with priority
CONFIG_APPLICATION_INIT_PRIORITY.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
We can use default values of CONFIG_USB_DEVICE_VID and
CONFIG_USB_DEVICE_PID for sanity check builds.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The final ending chunk was not sent after the request was served.
This caused the remote client to constantly send the same request
to the server.
Fixes#6356
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In sample application of COAP put and post
methods are implemented in coap-server.c
and coap-client.c
Signed-off-by: Tarun Kumar Agarwal <tarun.kumar.agarwal@intel.com>
this sample expect there has a button in you board, that was
the mouse's left button, tested in linux by using evtest.
Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Combine several generic config file into prj.conf that can be
used by several boards and configurations.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This demostrates how to classify the network traffic when sending
data. The application will create similar functionality as
echo-client so user can use echo-server running in remote host to
test this sample application.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of always allocating both IPv6 and IPv4 address information
to every network interface, allow more fine grained address
configuration. So it is possible to have IPv6 or IPv4 only network
interfaces.
This commit introduces two new config options:
CONFIG_NET_IF_MAX_IPV4_COUNT and CONFIG_NET_IF_MAX_IPV6_COUNT
which tell how many IP address information structs are allocated
statically. At runtime when network interface is setup, it is then
possible to attach this IP address info struct to a specific
network interface. This can save considerable amount of memory
as the IP address information struct can be quite large (depends
on how many IP addresses user configures in the system).
Note that the value of CONFIG_NET_IF_MAX_IPV4_COUNT and
CONFIG_NET_IF_MAX_IPV6_COUNT should reflect the estimated number of
network interfaces in the system. So if if CONFIG_NET_IF_MAX_IPV6_COUNT
is set to 1 and there are two network interfaces that need IPv6
addresses, then the system will not be able to setup IPv6 addresses to
the second network interface in this case. This scenario might be
just fine if the second network interface is IPv4 only. The net_if.c
will print a warning during startup if mismatch about the counts and
the actual number of network interface is detected.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move IP address settings from net_if to separate structs.
This is needed for VLAN support.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a sample that demonstrates a custom board definition. This proves
that BOARD_ROOT works and can be a useful reference when creating a
custom board definition.
Instead of spending time making up a board, the nrf52840_pca10056
board has been copied as-is. And the hello world sample has been used
as the basis for the application.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
There are currently two samples in the
~/zephyr/samples/application_development/ directory. This commit
allows them to be visible in the documentation.
It is not clear why this has not been done already.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Cover the required steps to use the Controller with Linux's BlueZ and
QEMU, and link to the relevant sections in the subsystem developer
guide.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
In order to avoid duplication, move all information relating to QEMU and
BlueZ from samples to subsystems, and expand to cover BlueZ installation
and usage of Controllers with BlueZ and QEMU in detail.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Since the base64 encoding and decoding functionalit is now provided by a
separate library, remove the line in the CMakeLists.txt file that refers
to it.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
With the new CONFIG_BOOTLOADER_MCUBOOT option there is no longer a need
to define custom overlays in order for a project to be bootable by
MCUboot. Remove therefore those unnecessary complications in the sample.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Each USB sample, when compiled, will provide a different
USB product string. A "nice to have" feature when trying
out the USB samples (they will show up differently in
`lsusb` or `dmesg`), and also illustrates how to set up
custom USB constants in the config files.
Requires #6589.
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.
Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The k_mem_partition structs need to be placed in the kernel memory.
This patch ensures that these structs are placed correctly.
Also when a struct k_mem_domain is declared it is advised to add
__kernel.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Network packet cannot be NULL so no need to check its value.
Coverity-CID: 183063
Fixes#6669
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Upcoming Nordic ICs that share many of the peripherals and architecture
with the currently supported nRF5x ones are no longer part of the nRF5
family. In order to accomodate that, rename the SoC family from nrf5 to
nrf, so that it can contain all of the members of the wider Nordic
family.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Use HAS_ Kconfig option as intended, those are invisible option that
signify support of a certain feature that can be selected by a hardware
or platform.
For RTT and system view this was not dont in an inconsistent way.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This application just enables native host networking and net-shell
which allows connectivity from zephyr to host system via tap device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of CONFIG_COAP_MBEDTLS_SSL_MAX_CONTENT_LEN, use recently
introduced CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This value allows to set max payload length of a TLS protocol
message, and passed thru to mbedTLS as MBEDTLS_SSL_MAX_CONTENT_LEN
setting. The only safe value is 16384, which translates to 32KB
of RAM required just for mbedTLS input/output buffers. Any other
value can be configured *only* per a particular application
(e.g. knowing that it won't pass more than spefific amount of
data at once and/or won't connect to a server with a long cert
chain). Previosuly, we had quite an adhoc and inflexible config
with random values for that setting, based on protocol.
Note that while the safe value is 16384, "backward compatible"
default of 1500 is used (good for DTLS on the other hand).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
There are 174 RX/TX net pkt reserved, this make build fail
with some boards due to ram overflow (e.g quark_se_c1000).
Fix this by reducing NET_PKT RX/TX reserve to 100, which
seems fair enough for this use case. Moreover, don't think
there is any reason to have more NET_PKT than NET_BUF.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Current implementation of cdc_acm writes 4 bytes for quark_se at a time
and current code misses remaining data chunks. Make sense to check
written bytes for other platforms as well.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This sample application implements a web service that provides
zephyr console over websocket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is a http(s) server that supports also websocket.
It sends back any data sent to it over a websocket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
With usb_device support added to nrf52840_pca10056 board, sanity
check script compiles the sample net/wpanusb and it fails with
undefined reference for symbol cc2520_configure_gpios.
First of all cc2520 shouldn't be compiled at all for nrf52840
since it has its own ieee802154 radio. The prj.conf under the
sample samples/net/wpanusb simply hard codes the config
CONFIG_IEEE802154_CC2520=y and is causing the ieee80211_cc2520.c
file to be compiled. If it's removed from the configuration file
we get other errors. So it is not straight forward.
For now, as a workaround, exclude the nrf52840_pca10056 platform
until there's a proper fix.
Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
After introducing of Virtual File System Switch (#6318)
it i required to mount file system in order to use it.
This patch add to the example code which mounts NFFS
file system in the example.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
In order to avoid confusion between "Unicode", UTF8, UTF16, UTF32,
and endianess of these encodings, rename all instances of "Unicode"
in the USB subsystem and samples into "UTF16LE".
Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
btusb_bulk_out() reads the EPOUT buffer in multiple of 4 bytes because
of Quark's USB FIFO size limitation. But this has later been taken care
internally in the DW driver making it redundant in hci_usb.
Remove Quark specific handling and read the whole EPOUT buffer at once.
Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
try_write() writes the whole net buffer to USB which sometimes is larger
than the maximum packet size of an endpoint.
Use the ret_bytes param to know how much has been written to the USB bus
and write the remaining chunks in the subsequent calls.
Usually the USB driver write doesn't happen immediately in cases where
the usb_write() is not synchronous. In such cases, USB driver returns
-EAGAIN.
If driver returns -EAGAIN, yield so as to give other threads a chance
to run while waiting for previous USB write to complete.
Signed-off-by: Sundar Subramaniyan <sundar.subramaniyan@gmail.com>
Rename variable zpkt to cpkt to complete the move from ZoAP to CoAP.
Remove unused tests/net/lib/zoap/CMakeLists.txt file.
Signed-off-by: Stig Bjørlykke <stig.bjorlykke@nordicsemi.no>
Not all boards are going to have the ccs811 on them, and thus not in the
device tree. We need a dts.fixup stub to dummy out the CONFIG_CCS811_*
defines that the driver expects.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
net_app_ctx maintains multiple net contexts(net_ctx). But when http
api's wants to reply or send some data, its always choose the first
net_context in the array, which is not correct always.
net_app_get_net_pkt_with_dst() api will select proper context
based on destination address. So with the help of new api in
net_app, http can select proper context and send packets. To
achieve this, desination address is provided in http_recv_cb_t
and http_connect_cb_t callbacks. Also chaged relevant API's to
provide destination address in http message preparation methods.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add support for building the WS2812 LED strip driver sample against
the new ws2812b_sw driver. Currently a configuration is only provided
for the BBC micro:bit board.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Initially this sample was intended to be very simple and schematic,
but as this sample going to become a base for stream API conversion,
time to handle all the edge conditions.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Initially this sample was intended to be very simple and schematic,
but as this sample going to become a base for stream API conversion,
time to handle all the edge conditions.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
mbedTLS log level is obviously a mbedTLS config setting. It makes
sense to have it defined in mbedTLS Kconfig, and different parts
of Zephyr to reuse as needed (e.g. net-app vs upcoming TLS wrapper
for sockets).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Move the generated files into include/generated so they live with the
build and not in the zephyr source tree.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Create a net sample to setup a multi-node RPL mesh network using QMEU.
To enable this, it was necessary implement a hw filter on IEEE 802.15.4
UART Pipe driver and create a QEMU pipe management on cmake.
This sample use a tool developed on zephyr net-tools repository called
virtual-hub.
Signed-off-by: Pedro Martucci <pedropaulomartucci@gmail.com>
The Host header is even mandatory in HTTP 1.1, and indeed without
it, many virtual hosting setups don't work (which are many), so to
be faithful to what README says: "You can edit the source code to
issue a request to any other site on the Internet", let's
complicate the sample by including it.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When testing whether the CTR mode decrypted the payload properly, a
comparison of `decrypt.out_buf` with the known plain text `plaintext`
is performed, but the buffer comparison that is printed uses
`plaintext` and `encrypt.out_buf` instead.
Coverity-CID: 181847
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This sample downloads a more or less big file (~6MB as preconfigured)
over HTTP and checks its hash for integrity. It also repeat such a
download indefinitely, counting total number of bytes transferred.
This is thus a kind of traffic load testing sample. (Ported to C
from MicroPython original).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This sample (which should eventually become a proper test) suite
builds from simple applications of the new primitives to a full
context switch test and interrupt handling suite (based on the
CPU-internal CCOMPARE2 timer).
It's been extraordinarily useful finding regressing as the asm2 code
gets modified and should probably stick around as long as possible.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The previous default, "config-threadnet.h", is more or less arbitrary
choice made in a commit 312def2c78 1.5 years ago. In particular,
it's not related to Thread support in Zephyr per se (there was no
such support at that time).
It doesn't make sense to have a default intended for a particular,
not widely used (yet) protocol. Instead, the default should work
out of the box with a contemporary widely deployed arrays of TLS
servers, which are HTTPS server. config-mini-tls1_2.h works with
https://google.com, and by extension, with many other servers on
the Internet.
So, have that as the default, and let applications with special
needs to override that to what they need.
Addresses: #6132
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
bt_gatt_discover_params parameter shall remain valid as long as the
procedure is in place.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Convert the mesh code to use the new net_buf_siple APIs. This has the
benefit of saving 4 bytes off the stack due to the not needed pointer.
Also update the publication context helpers to map to the new
net_buf_simple API in an intuitive way.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Application should normally declare a bt_uuid with proper type and then
use bt_uuid_cmp.
Fixes#5162
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Two docs listed in the Samples an Demos TOC had the same title displayed
in the board-specific samples section, "Power Management Demo". Give
both sample docs a more specific title.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
With 323e8cf069 applied and printf() working out of the box,
CONFIG_NET_BUF_LOG=y workarounds can be removed from configs of
all samples.
Also, print an intro message at the start of each server sample,
to give a user hint that the app didn't just hang and what to do
next. (The port waiting for connection is printed. We can't (easily)
print host address, because the samples should run on both Zephyr
and POSIX systems, and finding out local host address would require
hairy #ifdef's undermining the purpose of these samples (that is,
showing that the *same* code can be used on both types of systems)).
Fixes: #5379
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Redesign of the net_buf_simple and net_buf structs, where the data
payload portion is split to a separately allocated chunk of memory. In
practice this means that buf->__buf becomes a pointer from having just
been a marker (empty array) for where the payload begins right after
the meta-data.
Fixes#3283
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The net_buf unit tests were doing some pretty hacky stuff with
defining a dummy _net_buf_pool_list variable to fulfil the linker
magic that happens with a real build. Until now the code got lucky in
that the simple net_buf_alloc() tests didn't depend on
_net_buf_pool_list being valid, however with the coming redesign even
net_buf_alloc will require proper setup of this.
Since the unit tests were extremely minimal, and not testing anything
beyond what tests/net/buf already tests, just remove them for now.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
With current value of IPV6 Multicast address, IPV6 mcast bind
does not succeed and IPSP use case could not work.
Change use case multicast address to match IPV6 address and
enable binding
fixes: #6050
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Replace seldom occurrences of FLASH_DRIVER_NAME by equivalent
and commonly used FLASH_DEV_NAME.
Fixes#5919.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add sample application for AMS CCS811 digital gas sensor driver.
This application fetches Co2, VOC, Voltage and Current readings
from the sensor and prints it on serial console continuously.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Make it easy to override HTTP host/port/path. Print URL which we
request and make few other adjustment to the output for clarity.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
SENSOR_CHAN_DISTANCE is now in meters. Print value in meters, as
double, this requires printf() and CONFIG_STDOUT_CONSOLE. This is
similar to how other sensor samples have it.
Fixes: #5693
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Based on the discussion in #5693, the reason why humidity was defined
in milli-percent was likely following Linux which defines it as such
in its sensor subsystem:
http://elixir.free-electrons.com/linux/latest/source/Documentation/ABI/testing/sysfs-bus-iio#L263
However, Linux defines temperature in milli-degrees either, but
Zephyr uses degrees (similarly for most other quantities). Typical
sensor resolution/precision for humidity is also on the order of 1%.
One of the existing drivers, th02.c, already returned values in
percents, and few apps showed it without conversion and/or units,
leading to confusing output to user like "54500".
So, switching units to percents, and update all the drivers and
sample apps.
For few drivers, there was also optimized conversion arithmetics
to avoid u64_t operations. (There're probably more places to
optimize it, and temperature conversion could use such optimization
too, but that's left for another patch.)
Fixes: #5693
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The expected order for heading levels in our ReST documents is # for H1,
* for H2, = for H3, and - for H4. Some documents snuck in without
following this guideline.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The hts221 sensor driver was implicitly made dependent upon the
disco_l475_iot1 board when it was converted to dts, so build the
associated sample only for this board. This issue was encountered when
adding sensor dts support to nxp boards, which don't have hts221.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
A few lines earlier the code bails out in case len is 0. Checking for
buf->len < 1 is the same as checking for buf->len == 0. Since len is
guaranteed to be > 0 here the check len > buf->len implicitly checks
for buf->len == 0, i.e. the second test can be removed.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add samples config for nRF52840 with OpenThread
for echo_client and echo_server.
Add OpenThread to CI for echo_client and echo_server on nRF52840
Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>
Convert NXP k6x and kw2xd flash driver to use device tree to get the
flash controller name from device tree. We introduce yaml bindings for
the "nxp,kinetis-ftfe" and "nxp,kinetis-ftfl" devices.
Fixes: #5788
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Applies to #4008 and #5159 for this board. Problem is that the
button interrupt callback was only firing once. Solution is to
set the pin pull up flag to GPIO_PUD_PULL_UP.
Signed-off-by: Anders Pitman <tapitman11@gmail.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a simple UDP server application that will receive UDP data
and print various statistics like number of packets received and
dropped, amount of bytes received, and how many packets / sec
we were able to receive.
Currently the sample only provides a config file for FRDM-K64F board.
Note that this sample should not be run in QEMU as the performance
is very bad there because of SLIP link between Linux host and QEMU.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The GPIO unit on the SAM0 is called 'PORT' which conflicts with the
name used in this sample. Rename to LED_PORT instead.
Signed-off-by: Michael Hope <mlhx@google.com>
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic. So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Those are added by sanitycheck, no need to have them enabled in the
project by default.
CONFIG_DEBUG is causing issues on qemu_nios2, see #5743.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The demo can be configured to use different object types for its
synchronization, so test all of them.
The demo can also be configured to work with static objects or dynamic
objects, byt default the demo uses dynamic objects, add a test for
static objects.
Also, the demo can be configured to work with threads of the same
priority or not, so enable both options for testing
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Do not build for some unsupported architecture and exclude ARM qemu
platform due to bug #5735.
STACK_ALIGN 0x8
MPU STACK GUARD Test
Canary Initial Value = 0xf0cacc1a threads 0x200010e0
Canary = 0x20000240 Test not passed.
***** BUS FAULT *****
Executing thread ID (thread): 0x200010e0
Faulting instruction address: 0x209c
Imprecise data bus error
Fatal fault in thread 0x200010e0! Aborting.
***** HARD FAULT *****
Fault escalation (see below)
***** BUS FAULT *****
Executing thread ID (thread): 0x200010e0
Faulting instruction address: 0x1f4
Imprecise data bus error
Fatal fault in ISR! Spinning...
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Evaluate output from sample and record success/failure.
Enable on other platforms, this should not be whitelisted.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The output of those samples can be parsed and verified by sanitycheck,
so lets use the console harness for this.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample application allows to test vl53l0x distance sensor.
By default it is built with disco_l475_iot1 board as it is
built-in.
Signed-off-by: Vincent Veron <vincent.veron@st.com>
The code couldn't really build with only CONFIG_NET_IPV4 or
CONFIG_NET_IPV6 enabled, because some parts weren't covered
by #ifdef's. Regroup the code to get it covered.
Also, improve error/notice messages.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
By default CONFIG_MPU_ALLOW_FLASH_WRITE=n so the example must have been
falling on any write to flash.
This patch adds CONFIG_MPU_ALLOW_FLASH_WRITE=y to project configuration.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This sample implements a custom module, so rename it to allow for other
samples with specific features.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In order to be able to document the build on Windows and UNIX
systems, slight variations are required on the app commands
that are used throughout the documentation system.
This includes getting rid of the prompt symbol and providing commands
for both UNIX and Windows operating systems.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add configuration for zperf sample allowing to build USB dongle with
zperf for testing.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
At the moment CONFIG_SYS_LOG_USB_LEVEL name does not specify that this
is log level for the Device Stack. Make it clear renaming to the
proper name.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove SPI_*_IRQ_PRI from tests and samples.
Using DT to get the *_IRQ_PRI, we can't
override it using Kconfig.
If needed, use a BOARD_NAME.overlay file to
override default values.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Since no GPIO trigger is configured in hts221 sample application,
update prj.conf to enable TIGGER_NONE flag
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
A very old reference to former net stack was still lurking around.
Removing it.
Taking the opportunity to clear up dependencies.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Having a library being GLOBAL, although not default behaviour, or
necessary for the sample, is expected behaviour for a library. It is
expected that like normal libraries, the target name will be
accessible from outside of the CMakeLists.txt file that created it.
Since samples are used as reference code, we specify GLOBAL so that
libraries are created with this intuitive behaviour.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The basic/threads sample is printing a log that looks like this:
Toggle USR0 LED: Counter = 0
Toggle USR1 LED: Counter = 0
Toggle USR0 LED: Counter = 1
Toggle USR0 LED: Counter = 2
Toggle USR0 LED: Counter = 3
Toggle USR0 LED: Counter = 4
From that log you would think that it was logging when leds were
blinking, but actually the led-threads might have crashed, and it
would just continue logging anyway. All it's doing is executing
printk's at roughly the same frequency as the LED's are blinking.
This patch rewrites the sample to use a FIFO so that the printk's only
trigger if the LEDs are actually blinking.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Depending on a path inside the Zephyr tree to determine if we are a test
does not scale. Also some samples were marked as TEST while they are
not, just to get some options defined for tests.
Idenitfying a test will be addressed in another patch introducing
CONFIG_TEST.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This samples was failing to build with Ninja because Ninja detected
that libmylib.a was missing. Adding it as a BYPRODUCT in the
ExternalProject fixes the issue.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
mbedTLS include directories will now default to be in the 'app'
include path when mbedTLS has been enabled.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Right now in FIN_WAIT1 state, if we receive FIN+ACK message, then
tcp state changed to FIN_WAIT2 on ACK flag and immediately on FIN
flag state changed to TIME_WAIT. Then final ACK is prepared and sent
(in queue at-least) to peer. Again immediately state changed to
TCP_CLOSED, where context is freed. net_context_put frees context
and releases tcp connection. Final ACK packet which is in queue
is dropped.
As a side effect of freed ACK packet, peer device keep on sending
FIN+ACK messages (that's why we see a lot of "TCP spurious
retransimission" messages in wireshark). As a result
of context free (respective connection handler also removed), we see
lot of packets dropped at connection input handler and replying with
ICMP error messages (destination unreachable).
To fix this issue, timewait timer support is required. When tcp
connection state changed to TIMEWAIT state, it should wait until
TIMEWAIT_TIMETOUT before changing state to TCP_CLOSED. It's
appropriate to close the tcp connection after timewait timer expiry.
Note: Right now timeout value is constant (250ms). But it should
be 2 * MSL (Maximum segment lifetime).
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Remove build_only and add harness type needed for the sample/test to
allow running with sanitycheck and on devices once we have harness
support.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Still need a better way to filter and a better way to support multiple
platforms with these tests, but for now we remove the build_only tag and
make it depend on real HW.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The following 3 testcases are blacklisted for the POSIX
arch / simple_process BOARD:
* tests/drivers/ipm : won't compile due to missing
__stdout_hook_install() [part of minimal libc]
(POSIX arch uses the native libc)
* tests/kernel/mem_protect/stackprot : will crash
"natively" when trying to corrupt the stack and therefore
will fail the testcase. The current understanding is that
the POSIX arch should let the native OS handle faults,
so they can be debugged with the native tools.
* samples/cpp_synchronization : it is not possible
to build cpp code yet on top of the posix arch
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
It is only necessary to link with subsys__bluetooth if the path
"subsys/bluetooth" is needed as an include directory. None of the
samples have this need.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The CoAP samples use an MBEDTLS config "config-coap.h" which could be
re-used by the LwM2M sample, except that most servers use a larger
maximum content length setting of 1500 bytes.
Let's add a CONFIG to set this for users of the CoAP lib and set the
CONFIG value for the samples to the 256 size currently used.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
- Mention the prj_dtls.conf setting
- Explain setting up security in the Leshan Demo Server web UI.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Signed-off-by: Steve Brown <sbrown@cortland.com>
---
The updates to BlueZ' meshctl have not been submitted.
I am submitting this PR only for review. It could be committed
after the patches for the meshctl commands are applied.
The CMakeLists.txt file was reading ${BOARD}, but this means the user
must set BOARD like this cmake -DBOARD=foo. The user must be allowed
to set BOARD from the environment.
The code was unnecessary anyway because the convention
prj_${BOARD}.conf is known by boilerplate and therefore not necessary
to specify.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This introduces an nrf build to CI for the echo_server sample. Doing
so ensures that https://github.com/zephyrproject-rtos/zephyr/pull/5018
cannot regress again.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
When exporting flags to an external build system we need to deal with
the fact that we sometimes use generator expressions. Specifically, we
use generator expressions that look like this:
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
This patch replaces the old API with a new one where users can ask for
compile options for specific languages, like this:
zephyr_get_compile_options_for_lang_as_string(CXX x)
The existing API would have either crashed or silently omitted flags
when a COMPILE_LANG generator expression was present.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The following files didn't have any copyright or license headers on them
when they got contributed. So add the SPDX Apache license and
appropriate copyright info:
boards/arm/stm32l476g_disco/pinmux.c
samples/basic/threads/src/main.c
tests/net/socket/tcp/src/main.c
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This makes it possible to pass all IV Update tests without having to
build a custom configuration for some of the tests. We also disable
the feature in all sample configurations, but leave it on in the
tests.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The echo-server compilation failed because mbedtls config file
was not found. Added suitable magic to CMakeLists.txt fixing that.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When sending TCP sample packet, just fill the packet to max and
ignore any overflow error.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Renaming NET_L2_RAW_CHANNEL to NET_RAW_MODE
- Create a generic IEEE 802.15.4 raw mode for drivers
- Modify the IEEE 802.15.4 drivers so it passes the packet unmodified,
up to code using that mode to apply the necessary changes on the
received net_pkt according to their needs
- Modify wpanusb/wpan_serial relevantly
Fixes#5004
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Check that we do not try to access fragment when UDP packet is
received if pkt is NULL. In practice this should not happen for
UDP but do the checks in proper order anyway.
Coverity-CID: 179252
Fixes#5057
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As we are checking that pkt is not NULL already in the start
of the function, remove the checks later in the code in function
zperf_tcp_receiver.c:tcp_received()
Coverity-CID: 179248
Fixes#5061
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This app isn't (at least yet) using the model publication for
anything, and in fact this could cause trouble due to missing
publication net_buf_simple buffer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The only generally available model supporting publication that's
convenient to be used for testing is the Health Server Model.
Unfortunately since this model supports period publication, the
non-periodic side got less attention and had some bugs.
The first thing that needs to be done is to verify that the period
returned by bt_mesh_model_pub_period_get() is positive. If it's zero
then no periodic publication should take place.
Another thing that this patch cleans up is the naming of the callback
used for periodic publishing. There's no need do require the callback
to call bt_mesh_model_publish() since this must happen no matter what,
so instead rename the callback from 'func' to 'update' and have the
access layer call bt_mesh_model_publish() if the callback was
successful.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The echo-client compilation failed because mbedtls config file
was not found. Added suitable magic to CMakeLists.txt fixing that.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Model publication was broken in a couple of ways:
- The Publish Retransmit State was not taken into account at all
- Health Server used a single publish state for all elements
To implement Publish Retransmit properly, one has to use a callback to
track when the message has been sent. The problem with the transport
layer sending APIs was that giving a callback would cause the
transport layer to assume that segmentation (with acks) is desired,
which is not the case for Model Publication (unless the message itself
is too large, of course). Because of this, the message sending context
receives a new send_rel ("Send Reliable") boolean member that an app
can use to force reliable sending.
Another challenge with the Publish Retransmit state is that a buffer
is needed for storing the AppKey-encrypted SDU once it has been sent
out for the first time.To solve this, a new new net_buf_simple member
is added to the model publication context. The separate 'msg' input
parameter of the bt_mesh_model_publish() API is removed, since the
application is now expected to pre-fill pub->msg instead.
To help with the publishing API change, the Health Server model gets a
new helper macro for initializing the publishing context with a
right-sized publishing message.
The API for creating Health Server instances is also redesigned since
it was so far using a single model publishing state, which would
result in erratic behavior in case of multiple elements with the
Health Server Model. Now, the application needs to provide a unique
publishing context for each Health Server instance.
The changes are heavily intertwined, so it's not easily possible to
split them into multiple patches, hence the large(ish) patch.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Increase sleep time for main thread (1 sec to 1 minute) to keep SOC
in Low Power State for longer time. Currently nrf SOC is entering into
low power state and exiting immedately after 1 sec.
With this change SOC will wake stay in Low Power State till GPIO is
pressed or sleep time expired (whichever is earlier).
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Add basic documentation about Ethernet over USB and describe
prj_netusb.conf configuration file.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
As per https://tools.ietf.org/html/rfc7230#section-3.3.2:
"A sender MUST NOT send a Content-Length header field in any
message that contains a Transfer-Encoding header field."
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This simplifies the API since there is no-longer a need to pass a huge
number of function arguments around.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This simplifies the API since there is no-longer a need to pass a huge
number of function arguments around.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For an unknown reason, various samples in KBuild were including
Makefile.test, this had some desired benefits, one of which is that
the popular BOOT_BANNER appears. The CMake-equivalent of including
Makefile.test is setting the flag IS_TEST. This commit reverts the
behaviour of the samples back to how it was pre-cmake.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
The Kbuild equivalent of IS_TEST was used for hello_world before, so
we revert back to the old behaviour. This resolves
https://github.com/zephyrproject-rtos/zephyr/issues/4904
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
CONFIG_NET_L2_BT_ZEP1656 should only be used with older Linux up to
4.11 which by now should have been updated in all distros.
For those sticking with older distros should select it manually as
it does breaks IID address it should never be used in production.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Added conditionally enabled event state tracing support.
Needed for enhanced debug visibility of tight timed events where
normal print debug messages affect the timing of things. This is a
simple buffer that allows post analysis via gdb of what sequencer
events occurred.
Signed-off-by: David Leach <david.leach@nxp.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
- Removed some debug output and changed the level of others to reduce
the amount of information logged. The reason is that some of this is
causing false positive distractions.
- Removed enabling of FILTER error IRQ events. It isn't needed and is
only informational.
- Changed frame control AR bit inspection to use native retrieval
routine.
- Addressed some coding style issues.
Signed-off-by: David Leach <david.leach@nxp.com>
- Reworked the driver logic around TX/RX to correctly handle the
expectations of the underlying 802.15.4 hardware IP.
- Fixed a problem with TX always reporting an error to the stack
which resulted in constant retries.
- Fixed bug in RX to TX transition which would occasionally cause the
driver to error the TX.
- Changed RX logic to ensure that invalid RX frames were not passed up
the stack.
- Simplified hardware timer usage to only use TMR3.
- Added RX watermark and TMR3 support to fix a hardware problem where
the hw IP can get stuck on a receive in noisy environments.
- Modified samples/net/echo_client and echo_server kw41z project config
files to provide enanced debug visibility into stacks and threads.
Signed-off-by: David Leach <david.leach@nxp.com>
It may be useful for the app to know what the initial NetKeyIndex that
it was given during provisioning is.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This is in anticipation of soon adding health client support, which
could then cause confusion due to the ambiguous API names.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Now that there's support for configuration client as well, rename cfg
to cfg_srv to avoid any confusion.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Some of the provisoning routines, such as node reset assume that we
have a valid bt_mesh_prov pointer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add the ability to track the provisioning bearer through an extra
parameter to link_open/close. Also introduce new public functions to
enable/disable specific provisioning bearers. This also means that one
now needs to explicitly enable provisioning bearers after calling
bt_mesh_init().
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It is possible to access past end of url buffer by one byte.
Coverity-CID: 178790
Fixes#4784
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In http_request() a CRLF is added to the header information after
the protocol is added. 2 CRLF in a row means the header information
is done, so following header information will be ignored.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
All current socket samples as one of the points show portability to
POSIX platforms, and provide POSIX makefiles to let user build such
a version of application easily. These Makefiles were lost during
CMake conversion.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
KBuild would write the .inc file to the source directory, this was
changed during the CMake migration because whenever possible it should
be avoided to write files outside of the build directory.
But Makefile.posix assumes that these files are generated in the
source directory so we need to keep generating them there for now.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Avoid applications defining empty model arrays by themselves by
documenting the BT_MESH_MODEL_NONE helper macro (renamed to be more
intuitive) and using it in the mesh sample app.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update the sample README with the latest changes during the
1.10 development cycle. We removed the 2 concurrent IPv4
and IPv6 connections and now the sample will make a single
connection based on whatever is configured (currently IPv6
takes precedence over IPv4).
Added instructions for how to switch the sample to IPv4.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The QEMU_NET_STACK is enabled automatically if building
a networking application to QEMU so no need to do it for
each networking sample.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Update the documentation for the Bluetooth samples not to refer to the
old style of building using make. Instead, simply refer to the general
instructions.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Rename netusb project file to be more general and support sanity build
for 96b_carbon board.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Create http library that uses net-app instead of net_context
directly. The old HTTP API is deprecated.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This sample tesecase provides sample code :-
1. Triggers Low Power tasks into nrf52 SOC (CONST LAT and LOW PWR)
2. Triggers System Off state.
3. Wake up device through port Event by GPIO (Button 1).
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
This is similar fix as in commit 643cc4a22c but this one fixes
the thread parameter in UDP DTLS thread.
Fixes this function parameter datatype warning:
expected ‘k_thread_stack_t * {aka struct _k_thread_stack_element *}’
but argument is of type ‘u8_t * {aka unsigned char *}’
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The length and the start of the coap payload was not correct
because the received packet did not had IP and UDP header in place.
Fixes#4630
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware. Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Some "random" drivers are not drivers at all: they just implement the
function `sys_rand32_get()`. Move those to a random subsystem in
preparation for a reorganization.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Previously, post_write and execute callbacks returned 1 when handled
and 0 for error condition. However, this wasn't detailed enough and
the engine can't propagate any sort of error back to users -- so it
doesn't even check the return values in many cases!
Let's adjust the resource callback functions of all objects and the
lwm2m_client sample to return 0 for success or a valid error code.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Now that we can access resource data in the lwm2m subsys, let's use
the user provided firmware push buffer (5/0/0) to also store the
firmware pull data.
This way the size of the firmware pull buffer is completely up to the
application.
NOTE: This patch adds a 64 byte firmware buffer to the lwm2m_client
sample for this purpose.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Now that the LwM2M library can parse across multiple fragements,
let's remove the larger than normal buffer size setting.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Add configuration to http_server sample making it possible to work
with USB Device stack with Ethernet ECM protocol.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Given that 6lowpan/BLE support is still work in progress, uses
debugging interfaces to setup, has known issues, and otherwise
not widely known or adopted, provided detailed instructions,
including reasonable diagnosing steps on how to set up and test
such a connection.
Tested using 96b_carbon.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This reverts commit 1da0a9eebd.
The workaround caused a severe performance penalty, and only worked
for USB packets of 4-15 bytes in length (16+ byte packets weren't
subject to the hardware bug). Single-byte packets (very common for
cdc_acm serial port transfers) would still be duplicated sometimes.
The upcoming DMA implementation does not share the performance
penalty, and also is not subject to the bug for those sizes of packets
(though it DOES still have a problem with single-byte packets!).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If NET_L2_IEEE802154 and NET_IPV6 are enabled:
- NET_6LO is enabled
- NET_L2_IEEE802154_FRAGMENT is enabled
Thus removing setting this config options to yes where applicable.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is similar to the LPD8806 sample, but uses the WS2812 driver
instead. The app configuration is a bit more finicky, so try to
provide helpful references. This could be made more beginner-friendly
with the addition of timing diagrams, etc., but this should be enough
for an experienced developer to use.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This sample displays the colors red, green, and blue on consecutive
LEDs in an LED strip, moving the starting point where red begins
further down the strip at each time step. The color band wraps around
to the beginning when it reaches the end.
Since this is the first application in samples/drivers to have
documentation, add samples/drivers/drivers.rst as well, and include it
in the top-level toctree from samples/samples.rst.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Remove CONFIG_NET_L2_ETHERNET, as it's automatically set by the
board. This effectively makes prj_frdm_k64f.conf fairly portable,
e.g. the same config can be used for frdm_kw41z whcih uses 802.15.4
connectivity instead.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
LwM2M is intended for constrained devices. The default samples
settings are quite large by that standard and can be reduced to
reflect actual usage.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
After the LwM2M sample was introduced several HW related defaults were
added to Kconfig. We no longer need separate prj*.conf files for K64F
and qemu_x86. Let's combine them into a single prj.conf file and
adjust documentation.
NOTE: This also adjusts README.rst
Signed-off-by: Michael Scott <michael.scott@linaro.org>
We removed the default values for:
* CONFIG_USB_DEVICE_VID
* CONFIG_USB_DEVICE_PID
So put some dummy values in the sample.yaml to get things building
again.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Fixes this function parameter datatype warning:
expected ‘k_thread_stack_t * {aka struct _k_thread_stack_element *}’
but argument is of type ‘u8_t * {aka unsigned char *}’
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The relay functionality was supposed to be always enabled rather than
always disabled on the micro:bit.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The IEEE 802.15.4 UART pipe config files in
echo_server/prj_qemu_802154.conf and echo_client/prj_qemu_802154.conf
did not had proper configuration options set. This prevents
qemu<->qemu communication between the echo-server and echo-client.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use platform_whitelist to specify supported boards to make sure
mem_domain_apis_test sample will be built during sanitycheck.
Signed-off-by: Chunlin Han <chunlin.han@linaro.org>
Vendor ID and Product ID should be assigned on build time by
respective process.
For sanity check we assign some random values which are only used for
build tests and should not be used for real products.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It's been observed that that the relay toggling functionality is not
very useful, and that it's better left enabled always. Change the
purpose of the second button to instead modify the target address that
messages sent through the first button get directed to. By default the
destination is the group address, i.e. all nodes receive the message.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This sends out 2KB+ payload (i.e. guaranteedly more than 1 network
packet). When this sample was initially written, using such payload
quickly let to a deadlock somewhere in the network stack. However
as of now, running with such payload can sustain testing with
"ab -n10000" (10000 consecutive HTTP requests using Apache Bench),
so set is as a default, to serve as a mark point against possible
future regressions.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Applications may want to be notified when various events
happen in the LwM2M rd client. Let's implement an event
callback which sends: connect, disconnect and update events.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
1. Add handling block1 option in handle_request(). The basic idea is
to declare structure block_context at compiled time and use "token"
as a key to pick up the on-going block cotext. It should be able to
support multiple blockwise transfer concurrently
2. Use write callback implemented in lwm2m_obj_firmware to deal w/ the
update state transition and than call the callback registered by the
application
3. move default_block_size to lwm2m_engine.c to share between
lwm2m_engine and lwm2m_obj_firmware_pull
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
[michael.scott@linaro.org: rebased on LwM2M net_app changes.]
Signed-off-by: Michael Scott <michael.scott@linaro.org>
1. Parse firmware pull URI
2. Add lwm2m_firmware_get/set_update_cb() for application to register
callback. This is because we want to check the update_state before
we pass to the application
3. Add lwm2m_firmware_get/set_update_result() and
lwm2m_firmware_get/set_update_stat() to manage the state transition
as well as the sanity check
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
[michael.scott@linaro.org: rebased on net_app framework and
lwm2m_message refactoring.]
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This application does not do anything itself, it just waits
mDNS queries and responds to them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Previously, there was boolean CONFIG_SLIP_DEBUG, which effectively
switched between "logging off" and "debug-level logging". Instead,
switch to CONFIG_SYS_LOG_SLIP_LEVEL (the naming of the option follows
existing conventions) which allows to select any of the standard 5
logging levels.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Explicitly call net_pkt_ref()/net_pkt_unref() to avoid packet being
freed after calling net_context_sendto() at retransmit_request().
Also, do not return when net_context_sendto() returns error. Instead,
we should keep retrying.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Original coap_client implementation does not setup "appdatalen" of
net_pkt correctly and does not strip the IP + UDP headers when doing
the retransmit. This will result in malformed coap packet. Fix it by
adding a strip_headers() function to set appdatalen and get rid of
IP + UDP headers.
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
This helps to debug issues with mass connection handling (e.g. when
issues happen at ~500th connection).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
1. After calling sendto(), the packet will be unreferenced.
Call coap_pending_cycle() to make sure the packet is referenced until
we got the response from the peer or retransmission timeout.
2. In retransmit_request(), we rearrange the order to avoid the issue.
3. Remove IPv4 configuration for source code is expecting IPv6
4. Correct a typo in README.rst
5. Initialize the interface w/ IPv6 address
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When testing against etsi_coaptest.sh, test cases TD_COAP_BLOCK_03/04
will get stuck. This is because these testcases send out a blockwise
transfer but with an empty payload. Although this should be a legit
request, large-update/create handlers did not check "MORE" flag in
block1 option and always return an error when request comes with empty
payload.
Corrected as below
1. Initialize coap_block_context when first block arrives.
(SIZE1 option is not always available. In the case that SIZE1 is
unavailable, the zoap_block_context will be re-initialized each time
a new block has arrived)
2. Check "MORE" flag of block1 option. If it's the last block, then
an empty payload should be allowed.
3. Response w/ 2.04 CHANGED when the last block has arrived for
large-update
4. Response w/ 2.02 CREATE when the last block has arrived for
large-create
5. Remove adding block2 option to the response since we are not sending
back any data to the caller
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Keep the flash shell up to date with the latest flash driver updates.
- Get the driver name from soc.h
- Add a write_block_size command
- Implement flash_shell_page_layout() using flash_page_foreach()
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
At 32 bytes the snprintk call to fill the help buffer was most often
running out of room and returning an error. Let's expand it to 64.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Users can private message the bot and the bot should respond directly
back to that user rather than rudely ignoring them.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's create a static global var for nickname so that we can use it
later without having to pass it all the way through callbacks, etc.
Also limit the size to 16 bytes as IRC servers will truncate anything
beyond.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
These structures were originally intended to prototype an IRC library
which would be later moved into the subsys/net/lib/irc folder.
Unfortunately, that effort has faded and they make this code much more
complex than necessary. Let's remove them in favor of simplicity.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
For style points let's declare the text shown at the beginning
of main() function to the top of our source as APP_BANNER so that
it's obvious and presents nicely.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's simplify the parsing function which scans incoming traffic
for carriage returns and let the net_pkt_read() function cross
multiple buffers if needed. Also, gracefully skip lines which
are longer than the command buffer.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Some L2 layers such as bluetooth need to have extra buffer pools to
hold copies of packets for use with TCP. Let's add support for that
so that future enablement of other boards won't get bitten.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's migrate from using NET_LOG_* functions to the SYS_LOG
facility which allows for granular control over the display
of info, debug and error messages unique to the file that
you're in.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Let's remove all of the extra coding to handle DHCP, DNS and event
management. This is all handled by the net_app API.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
It's useless now, arduino_101 has proven not working very well with x86
gpios and CC2520 never got to work properly there.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Only ieee802154 should have been using it, but it ended in various
samples that did not require it anymore once they've been using
net_app. Unlike former samples settings, net_app settings are tied to
net_app, so let's just forget about all of it and silently use net_app.
If something goes wrong in setting net options, it will be a unique
place.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This app now depends on net_app API, so it must be enabled for all
project configs we have.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
From section 3.4.5.3 in the Mesh Profile Specification 1.0:
"A node shall implement a Local Network Interface."
Removing the Kconfig option also helps clean up quite a lot of code.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The code was causing only one byte of data to be placed in timeout
instead of sizeof(timeout) as intended.
Coverity-CID: 170744
Fixes#4057
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's dumb, because it doesn't really parse HTTP request, just always
sends the same page in response. Even such, it's useful for socket
load testing with tools like Apache Bench (ab) and for regression
checking in the net subsystem.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
CONFIG_NET_L2_BT_ZEP1656 shall only be used with hosts that are known to
not comply with RFC 7668.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
CONFIG_NET_APP_BT_NODE is required in order for the Bluetooth L2 driver
to register IPSS service.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Composite multifunction USB devices should be able to know about
configuration change, implement it through existing callback.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add information that IP addresses in prj_qemu_cortex_m3.conf file for
echo_client are set that qemu<->qemu communication could be tested.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
When TCP connection over IPv4 could not be established there was
an error about TCP connection over IPv6.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
This file is no longer needed as IPSS service is already enabled with
CONFIG_NET_L2_BT.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is the final stage of moving the LwM2M library internals to
the net_app APIs. This means we can support DTLS and other
built-in features in the future. All of the logic for
establishing the network connection is removed from the sample
app.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The LwM2M library does not use net_app APIs internally. To help
this effort let's establish a user facing structure "lwm2m_ctx"
(similar to http_client_ctx and mqtt_ctx) and start it off by
wrappering the net_context structure.
Future patches will add user setup options to this structure and
eventually remove the net_context structure in favor of a net_app_ctx.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The DNS resolver example enables mDNS client support and then
queries zephyr.local hostname. The net-tools project has example
avahi-daemon script that will response these .local queries and
can be used in testing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Whenever a buffer is sent to the driver via bt_raw using bt_send() the
buffer might not be consumed if an error is returned. In that case
unreference the buffer to avoid leaking the already allocated net_buf.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Currently, we don't have a .conf which enabled BT. This will be
re-enabled at some future date after migrating to the full net_app
APIs by setting CONFIG_NET_APP_BT_NODE=y.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
There were bunch of config options in tests/net, net-shell and
wpan_serial sample, and those options had wrong name so they
were ignored by the code.
Fixes#1428
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is a simple shell module that allows arbitrary boards with flash
driver support to explore the flash device.
- Reading, erasing, and writing by device offsets are supported in all
cases.
- If the flash page layout is available, it can be printed, and I/O
can also be done to a specified page as well.
One known issue is that writing to flash on targets that require
doubleword-sized writes (e.g STM32L4) will fail since the number of
arguments required exceeds ARGC_MAX in shell.c. Addressing that is
left to future work.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Added sample code for testing and displaying the flash layout using
the recently introduced API.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
bbc_microbit has been observed to regress on this sample and is
therefore a good candidate for CI.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
To test BMM150 geomagnetic sensor driver in polling mode,
sample application added by this patch can be used.
Signed-off-by: Punit Vara <punit.vara@intel.com>
The IP header was stripped by _net_app_ssl_mux() when it received
IP packet. This is fine but if the application expects the get
the IP header, then there is a problem. Fix this by saving IP
header to ssl_context and then putting it back in front of the
packet when the data is passed to application.
Note that this IP header is not used by net_app when the packet
is sent because TLS/DTLS creates a tunnel for transferring packets
and user can only sent packets via this tunnel.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The default IPv6 multicast address count was too small,
increasing addresses to 5.
Jira: ZEP-2560
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The echo-server sample was using removed net_app_server_tls_disable()
function, the correct one is called net_app_server_disable()
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The stack name was incorrectly specified in mqtt_publisher sample
application, this cause compilation error when certain Kconfig
options were specified.
Jira: ZEP-2566
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The server needs global enable/disable status instead of only being
able to enable or disable just the TLS server part.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The main reason is allowing to run on 6LoWPAN devices, though also to
demonstrate IPv6 support with BSD Sockets in general.
Tested on 96b_carbon.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
POSIX requires struct sockaddr's field to be named "sa_family"
(not just "family"):
http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/socket.h.html
This change allows to port POSIX apps easier (including writing
portable apps using BSD Sockets compatible API).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Normalizing variables names and make sure tag handling behavior, which
might be different among backends, does not make the test failing.
Also, improving debug logs in case of error.
Change-Id: Ic317948aab459bfa75c9a72ac48cb2d12a0d0706
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If the encryption/decryption failed there is no need to procceed
further.
Change-Id: If450e40ed6fd601b698b74c56ae21fc7f903d087
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is how it's called in the main docs, so use this same phrase in
Kconfig and samples too.
Also, added some articles to docs.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Default BT_RX_BUF_COUNT value is not enough when transfering a large
amount of data (e.g. heavy network traffic over BT 6LoWPAN). Increase
BT_RX_BUF_COUNT from default value 3 to 10.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Be sure to check for NULL pkt in receive callback, which means TCP
EOF. The fix ported from echo_server sample.
Jira: ZEP-2423
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
C++ standard mandates that main() return an 'int' even though
Zephyr does not use it. Fix build error with XCC compiler.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add cross-referenced information on the 96b_carbon and
96b_carbon_nrf51 pages which disambiguates between the two "boards".
Also describe how to flash 96b_carbon_nrf51 with
samples/bluetooth/hci_spi and 96b_carbon with samples/bluetooth/ipsp
to support a Bluetooth HCI stack on 96Boards Carbon (the physical
board).
While we're here, make the documentation page for 96b_carbon match the
format in doc/templates/board.tmpl.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Various of the printk messages in this sample app don't have
newlines. Let's fix the output by moving to SYS_LOG_xxx() macros
instead, which don't need them anyway. This also makes it easier to
tell errors apart from other messages, etc.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Add a sample application that allows a Zephyr-based Bluetooth
controller to interface with an HCI driver via SPI. This sample
implements the same BT SPI protocol already as Zephyr's HCI SPI
driver.
Currently, the sample only supports the legacy SPI API.
Provide a single configuration file, avoiding board-specific
files. Some board-specific configuration information must be provided
via other means:
- CONFIG_BT_CONTROLLER_TO_HOST_SPI_DEV_NAME
- CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_DEV_NAME
- CONFIG_BT_CONTROLLER_TO_HOST_SPI_IRQ_PIN
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Per ZEP-1958, Phase 2 of adding CC3220sf LaunchXL support,
was to "deprecate the CC3200 launchxl support in Zephyr
(redundant to the CC3220)."
Effectively, the CC3220 SOC replaces the CC3200.
This patch removes the following:
* the imported CC3200 SDK
* CC3200 SOC, board, DTS files.
* adjusts other files where cc3200 was mentioned.
Also, it fixes explicit references to CC3200 in generic
CC32xx driver files.
Jira: ZEP-1958
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Rename the BT_CONTROLLER prefix used in all of the Kconfig variables
related to the Bluetooth controller to BT_CTLR.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The documentation says that the API will automatically append the
net_buf fragment to the end of network packet fragment chain.
This was not the case and current only user for this API in
echo-server sample appended the fragment itself. The fix is to
automatically append the fragment to the end of fragment chain.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The hexiwear_k64 board can drive the leds with a pwm, so update the
rgb_led sample to work with this board.
Jira: ZEP-2025
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The hexiwear_k64 board can drive the leds with a pwm, so update the
fade_led sample to work with this board.
Jira: ZEP-2025
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The hexiwear_k64 board can drive the leds with a pwm, so update the
blink_led sample to work with this board. Reduces the maximum blinking
frequency from 500 Hz to 64 Hz because your eye can't distinguish these
higher frequencies (the led appears solidly on). Increases the minimum
blinking frequency from 0.5 Hz to 1 Hz because the mcux pwm driver can't
handle frequencies less than 1 Hz.
Jira: ZEP-2025
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Following test changes, log info have changes and previous log info
with stack guard present shows an mpu error not caused by a stack
overflow caught by mpu stack guard feature.
Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
This test launches several threads. Only last thread will overflow the
stack and an mpu exception will occur. The other threads are regulary
suspended, this triggers access to kthread structure. This tests is
failed on st and nxp platform, if 32 bytes alignement is not set.
Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.
Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit adds IPSO temperature support to the LwM2M client sample.
NOTE: A dummy value of 25C is set during initialization and does not
change.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This sample utilizes the new LwM2M library by setting up default
values for LwM2M device and firmware objects and then establisting
a connection to a LwM2M server (for example Leshan Demo Server) via
the registration interface.
To use QEMU for this purpose please see:
doc/subsystems/networking/qemu_setup.rst
NOTE: This sample currently does not demonstrate DTLS/bootstrap as
neither of these is supported by the LwM2M library.
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When unicast IPv6 address is added to network interface, it is
possible that the return value is NULL (if all the address slots
are already occupied).
Coverity-CID: 157607
Jira: ZEP-2467
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch adds a configuration file that tests Flash writes with MPU
enabled.
[david.brown: Put options in prj.conf with comments as per review
feedback]
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: David Brown <david.brown@linaro.org>
The parsing of strings with sharp notes (e.g. "100C#") was incorrectly
implemented. Now it should be correct. Additional benefit is that this
should fix Coverity CID 173632.
Jira: ZEP-2467
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The IEEE 802.15.4 settings are applied automatically by
net_app_init() function is is enabled by default.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Don't call net configuration explicitly, instead rely on net_app
auto init service.
Thus, the only difference between POSIX and Zephyr versions of these
samples are different include files. The application code is 100%
the same.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The led demo does not even enable Bluetooth by default, and in case a
custom enables it shall use CONFIG_NET_APP_BLUETOOTH_NODE.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The so called Router role don't require the IPSS, nor it should
advertise since it is not the peripheral in this case.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Make use of CONFIG_NET_APP_BLUETOOTH_NODE to enable advertising and
registering the necessary services.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sample can be used to test ambient light, RGB and proximity
functionality of APDS9960 sensor in polling mode.
Remove old sample which is not using sensor API.
ZEP-1552
Signed-off-by: Punit Vara <punit.vara@intel.com>
ReST defines interpreted text roles where text enclosed by single quotes
can be "intrepreted", for example :ref:`some name` becomes a link to
a label anywhere in the doc set named "some name", :c:func:`funcname()`
becomes a link to the API documentation for "funcname", and
:option:`CONFIG_NAME` becomes a link to, in our case, the documentation
for the generated Kconfig option.
This patch fixes uses of `some name` (without a role) by either adding
an explicit role, or changing to ``some name``, which indicates inline
code block formatting (most likely what was intended).
This is a precursor to changing the default behavior of interpreted
text to treat `some name` as :any:`some name` (as configured in
doc/conf.py), which would attempt to create a link to any available
definition of "some name".
We may not change this default role behavior, but it becomes an option
after the fixes in this patch. In any case, this patch fixes incorrect
uses of single-quoted text (possibly introduced because GitHub's
markdown language uses single-quoted text for inline code formatting).
Jira: ZEP-2414
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Count of 4 seems to cause deadlocks with some Android phones due to
other GATT activity in addition to Mesh related data.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Convert echo-client to use DTLS for UDP connections if DTLS
is enabled by prj.conf file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Convert echo-server to use DTLS for UDP connections if DTLS
is enabled by prj.conf file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Duplicate CONFIG_SYS_LOG_NET_LEVEL variable was defined in
config files so removing extras.
.config:58:warning: override: reassigning to symbol SYS_LOG_NET_LEVEL
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Couple of network samples had extra startup thread which is not
needed currently. This was an artifact before moving to using
unified kernel.
Jira: ZEP-2236
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Run http_server, http_client and https_client compile tests with
Bluetooth config. For http client tests we only use qemu_x86 as
the qemu_cortex_m3 tests failed because of too little memory.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If CONFIG_NET_CONTEXT_NET_PKT_POOL is defined, which is the
default for Bluetooth, then create the pool and use it when
sending network packets. This is needed when trying to send
TCP packets using Bluetooth IPSP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There is plenty of memory for QEMU currently so no need to
manually set the amount of memory.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If CONFIG_NET_CONTEXT_NET_PKT_POOL is defined, which is the
default for Bluetooth, then create the pool and use it when
sending network packets. This is needed when trying to send
TCP packets using Bluetooth IPSP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
CONFIG_MQTT_LIB_TLS is introduced to enable TLS support.
Also, prj_frdm_k64f_tls.conf is added to demostrate the whole idea.
jira:ZEP-2261
Signed-off-by: Aska Wu <aska.wu@linaro.org>
Use net app API since we want to enable MQTT with TLS.
mqtt_connect() and mqtt_close() are added to build and close the
connection to the broker. The caller doesn't need to deal with
the net context anymore and the most of network setup code in
mqtt_publisher is removed.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
When an app uses a construct such as:
obj-y = main.o ../../../../samples/bluetooth/gatt/hrs.o
in its makefile, it causes said object module to be built in the
source tree, not in the object tree.
When building massively parallel, this usually resuls on the files
getting corrupted, leading to bugs such as:
https://jira.zephyrproject.org/browse/ZEP-2316https://jira.zephyrproject.org/browse/ZEP-2317
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:3: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:4: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:5: *** missing separator. Stop.
as multiple build are trying to touch the same file in the source tree
and of course, race and causes a build bug.
We have known about this issue for a long time, but it requires
modifications in the build system that there is no time to tackle.
A suggested workaround is to include the source files into a local .c
file, so this is what this patch does, to remove the random noise.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
There's no need for debug logs by default in the mesh sample, and it
just contributes excessively to the ROM footprint.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This PR enables Bluetooth stack if Bluetooth L2 is
compiled in.
Change-Id: I8f8127031140f0603615af44e0809d203db32f48
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
Not easily done using RAM/ROM filters, configurations need to be adapted
to make this fit on more devices. Limit the target platforms now while
we figure out configurations.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.
Additionally, the TUN options is removed. This option was not used
anywhere.
To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
kernel APIs have changed to using K_THREAD_STACK_DEFINE to declare stack
memory as well as K_THREAD_STACK_SIZEOF to calculate it's size.
Adjust irc_bot sample to reflect those changes.
This fixes stack related page faults when running irc_bot with
CONFIG_X86_STACK_PROTECTION enabled (which it is by default for qemu).
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This sample includes builtin UDP and TCP echo servers, max
MAX_CONTEXTS=3 as set previously, they just didn't work.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Add an initial implementation for the Bluetooth Mesh Profile
Specification. The main code resides in subsys/bluetooth/host/mesh and
the public API can be found in include/bluetooth/mesh.h. There are a
couple of samples provided as well under samples/bluetooth and
tests/bluetooth.
The implementation covers all layers of the Bluetooth Mesh stack and
most optional features as well. The following is a list of some of
these features and the c-files where the implementation can be found:
- GATT & Advertising bearers (proxy.c & adv.c)
- Network Layer (net.c)
- Lower and Upper Transport Layers (transport.c)
- Access Layer (access.c)
- Foundation Models, Server role (health.c & cfg.c)
- Both PB-ADV and PB-GATT based provisioning (prov.c)
- Low Power Node support (lpn.c)
- Relay support (net.c)
- GATT Proxy (proxy.c)
Notable features that are *not* part of the implementation:
- Friend support (initial bits are in place in friend.c)
- Provisioner support (low-value for typical Zephyr devices)
- GATT Client (low-value for typical Zephyr devices)
Jira: ZEP-2360
Change-Id: Ic773113dbfd84878ff8cee7fe2bb948f0ace19ed
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's expected that there will be few socket-based samples, so move
tehm under samples/sockets/ to not clutter the main dir.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Implements asynchronous TCP echo server using non-blocking sockets
and poll, with concurrent connections support.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The coaps server sample application did not start because
number of IPv6 multicast addresses was too low. Increased
the address count from 2 to 5.
Jira: ZEP-2359
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The macros for calculating the length of the configuration
descriptors have been interchanged, fix it, and use the
correct macro for the length of the DFU mode configuration
descriptor.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
According to RFC7959 page 30, "The end of a block-wise transfer is
governed by the M bits in the Block options, _not_ by exhausting the
size estimates exchanges."
Therefore, we should check the M bit instead of total size (which
is not always available, too)
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
This disable debug options in order for the image to fit in boards
such as arduino_101 and quark_se_c1000_devboard.
For convenience this adds another configuration file with as it was
available previously which can be build using:
make CONF_FILE=prj_dbg.conf
JIRA: ZEP-2378
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some README files referenced wiki articles that have been
moved to the doc area on the website.
Fixes#668
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Upcoming memory protection features will be placing some additional
constraints on kernel objects:
- They need to reside in memory owned by the kernel and not the
application
- Certain kernel object validation schemes will require some run-time
initialization of all kernel objects before they can be used.
Per Ben these initializer macros were never intended to be public. It is
not forbidden to use them, but doing so requires care: the memory being
initialized must reside in kernel space, and extra runtime
initialization steps may need to be peformed before they are fully
usable as kernel objects. In particular, kernel subsystems or drivers
whose objects are already in kernel memory may still need to use these
macros if they define kernel objects as members of a larger data
structure.
It is intended that application developers instead use the
K_<object>_DEFINE macros, which will automatically put the object in the
right memory and add them to a section which can be iterated over at
boot to complete initiailization.
There was no K_WORK_DEFINE() macro for creating struct k_work objects,
this is now added.
k_poll_event and k_poll_signal are intended to be instatiated from
application memory and have not been changed.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Initialize the buffer to 0 and read one byte less than the
buffer size. The result should be that the last byte of
the buffer always stays 0. This way it is possible to verify
it the driver does not write outside the buffer.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Remove NET_UDP_HDR() macro as we cannot safely access UDP header
via it if the network packet header spans over multiple net_buf
fragments.
Fixed also the UDP unit tests so that they pass correctly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The config file for KW40Z has the shell disabled, as available
SRAM memory is limitted to 16kB.
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT should be used instead of
CONFIG_NET_IFACE_UNICAST_IPV6_ADDR_COUNT.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Since the controller comes with a transmit buffer size that mirrors the
maximum size of a transmit packet, use that to size the buffers that are
used in the hci_uart application to receive packets from the Host over
the UART.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The worst-case maximum number of CCC entries we need is actually
MAX_CONN + MAX_PAIRED. Provide a helper define for it and use it
whenever appropriate.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Explicitly select CONFIG_BLUETOOTH_BROADCASTER and
CONFIG_BLUETOOTH_OBSERVER in the scan_adv sample.
If the Controller is included without connections support
then only broadcaster support is compiled in by default,
hence add broadcaster and observer role support explicitly
in the prj.conf file.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>