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>
Next two commits will increase the mbedtls ram usage a bit and
https client and server sample test will fail.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As the net app API is automatically initialized, there is no
need to call net_app_init() by the http client and server sample
applications.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Removing CONFIG_NET_APP_SETTINGS from prj.conf file as the
sample does not use or need any IP addresses.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit will convert echo-client to use the net app API
when creating the connection to peer. Most of the network
setup code will be removed from echo-client by this commit.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit will convert echo-server to use the net app API
when creating the listening service. Most of the network
setup code will be removed from echo-server by this commit.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The network application API is a higher level API for creating
client and server type applications. Instead of applications
dealing with low level details, the network application API
provides services that most of the applications can use directly.
This commit removes the internal net_sample_*() API and converts
the existing users of it to use the new net_app API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We get some failures to build if we don't filter this test to only
boards that support uart interrupts.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Makefiles which start QEMU (make run) have been changed to operate
off of the QEMU_INSTANCE variable. QEMU_INSTANCE is simply appended
to the pid and sock file names. This makes us able to run multiple
QEMU Zephyr instances of the same sample.
Signed-off-by: John Andersen <john.s.andersen@intel.com>
There were a few different issues with the UART_CONSOLE filtering:
* Filter was incorrect - UART_CONSOLE should be CONFIG_UART_CONSOLE
* platform_exclude was used for drivers that had a #error for lack of
interrupt support. We can now use CONFIG_SERIAL_SUPPORT_INTERRUPT in
the filter for that. This catches all the various drivers that needed
don't support uart interrupts, not just the onces that had a #error
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch allows more generic USB configuration in the samples
and removes platform dependent driver configuration.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Where possible, replace the use of filter with newly added keywords.
This will speed things up and in some cases add more coverage due to bad
filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The example source code is POSIX-compatible (modulo include files),
i.e. can be built and behaves the same way for Zephyr and a POSIX
system (e.g. Linux). Makefile.posix is available for the latter.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The code has missing proper conversion from net_buf to net_pkt
that was implemented in commit db11fcd "net/net_pkt: Fully
separate struct net_pkt from struct net_buf"
The sample.yaml had incorrect whitelist string so this is also
fixed here.
Fixes#596
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The global mbedtls heap is set automatically now so no need to
set it individually in the http library.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We incorrectly had an arch_whitelist constraint set to 'qemu_x86' that
should have been a platform_whitelist, so fix that and add arduino_101
frdm_k64f to the platform_whitelist as targets that we can test this on.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
With the introduction of privacy, the system workqueue is now being
linked into the image, growing the RAM footprint considerably.
In order for the sample to fit in QFAA and QFAB variants of the nRF51
(16KB of RAM) we reduce the workqueue stack size to 512 since the RPA
update mechanism doesn't use more than 340 bytes and we stick to 16
connections maximum.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The condition in src/Makefile is not necessary since the
net_private.h is always included from wpanusb.c and is not
dependent on the transceiver.
Change-Id: I07a0bf599f328bacb8c5677f20eb221a05f30866
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit 83edd615ca.
Causes the documentation build to fail on Kconfig parsing, needs fixing.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enable application specific configuration to be easily included
and manageable via Kconfig. Add sample.
Signed-off-by: Michał Kruszewski <mkru@protonmail.com>
ISSM team wanted to integrate
"samples/application_development/static_lib" app
into their IDE. Al-ashi, Mahmoud <mahmoud.al-ashi@intel.com> found
it failed to "make flash" this app.
Also this patch added "make flash" build targets.
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Moving the net_buf_pool objects to a dedicated area lets us access
them by array offset into this area instead of directly by pointer.
This helps reduce the size of net_buf objects by 4 bytes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This adds bt_gatt_register_service using bt_gatt_service which contains
the attribute array that is then added to the database saving a pointer
in each and every attribute declared.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
GAP is mandatory service and now that the db can only be build
dynamically there is no reason to keep the applications registering it.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Removes CONFIG_BLUETOOTH_GATT_DYNAMIC_DB in preparation to the
introduction of bt_gatt_unregister.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some files have moved from their original location, or are no longer
available. For the mbedtls samples, tweak the link to point to a page
where links for current and previous downloads can be found.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit fixes compile error caused by commit 39962dc9
"samples: use k_thread_create()"
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This https-client sample starts to send HTTP GET/HEAD/POST
requests same way as http-client, to https server that can
be found in net-tools repository.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Various network samples contained QEMU slip setup instructions
or those instructions were missing. A reference doc in
doc/subsystems/networking/qemu_setup.rst file already has the
setup instructions for QEMU. So add a reference to that file
in samples/net/*/README.rst files and remove unnecessary slip
setup instructions in relevant files.
Fix various typos in readme files at the same time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The sample app "static_lib" is very important to Zephyr user, which
demonstrate how to build and link a static lib.
ISSM team wanted to integrate this app in their IDE for quark platforms.
However they find the in "static_lib/hello_world/Makefile" BOARD is
hardcoded as qemu_x86.
This patch supports other BOARD passed from build command.
I have verified this app working fine @Arduino101.
Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Add clarification that the DNS server configuration must be edited in
the respective prj.conf file.
JIRA: ZEP-2040
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The STM32F412 has PWM output capabilities. Add support to the blink_led
samples.
Tested using a Nucleo STM32F412ZG board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).
Change-Id: I75fb986fa97bd1c07c6375938430e7963297cd9d
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
The STM32F413 has PWM output capabilities. Add support to the blink_led
samples.
Tested using a Nucleo STM32F413ZH board (PWM output on pin 28 of the
CN11 Morpho connector and pin 29 of the CN10 Zio connector).
Change-Id: I3b25b09cab54265b28088ac9681aec588d9d48b5
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
The number of RX and TX buffers is increased to 64 as the
earlier limit can cause memory exhaust in some cases.
Jira: ZEP-2223
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This fix is basically a no-op as the rx_buf pointer cannot be null
in practice, but in order to avoid Coverity complaining about
it add some null pointer checks to the UDP handling code.
Coverity-CID: 170124
Jira: ZEP-2235
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of NULL terminated buffer arrays, let's add a parameter for each
that tells the number of spi_buf in it.
It adds a little bit more complexity in driver's side (spi_context.h)
but not on user side (bufer one has to take care of providing the NULL
pointer at the end of the array, now he requires to give the count).
This will saves a significant amount of bytes in more complex setup than
the current dumb spi driver sample.
Fix and Use size_t everywhere (spi_context.h was using u32_t).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Waiting for an NET_EVENT_IF_UP before trying to connect isn't sufficient
in some cases; for instance, on devices using the MCUX HAL, such as the
FRDM-K64F, the interface will have the NET_IF_UP flag set even though
the link negotiation didn't yet complete.
Executing this sample on such board will produce the following output.
Notice the "Enabled 100M..." message right after trying to connect.
[dev/eth_mcux] [DBG] eth_0_init: MAC 00:04:9f:6f:91:da
net_context_connect error Is the server (broker) up and running?
[publisher:247] network_setup: -60 <ERROR>
Bye! [dev/eth_mcux] [INF] eth_mcux_phy_event: Enabled 100M
full-duplex mode.
Even though the returned error is ETIMEDOUT, increasing
net_context_connect()'s timeout parameter to several seconds isn't
sufficient; other steps performed by network_setup() after the link has
been fully established are necessary. As a stopgap measure, try
connecting a few times before giving up (more than one connection
attempt should be made by application in most cases, anyway.)
It might be the case that we need events to monitor ethernet link
(re)negotation in addition to the NET_IF_UP bit.
Jira: ZEP-2036
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The state machine of the game assumes that the user needs to
explicitly re-select multiplayer game when disconnected. We need to
therefore make sure that advertising stays off as soon as the first
connection happens.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Occasionally the sound might stay enabled for the restart timeout (2
seconds) if the ball would hit the wall right before missing the
paddle. Ensure that it's disabled whenever the game ends.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the HTTPS connection is closed, then properly handle call to
HTTP parser init in case of error and also remove any pending
data that belong to old connection.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The buttons on the microbit cause quite easily "ghost" key presses.
Add a simple filter that ignores button presses from the same button
that happen less than 100ms from each other.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The stuff that the GPIO button callback does (in particular the printk
calls) requires more stack space from the ISR stack. Increase it to 1k
from the default 640.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This enabled testing CONFIG_BLUETOOTH_SHELL with configuration other
than btshell and enables ipsp sample to use bt shell module which
allows to disconnect, print metrics, etc.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This patch add arm core MPU support to NXP MPU driver.
With this feature it is now possible to enable stack guarding on NXP
MPUs.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Add beeps whenever the ball hits the walls or the paddle. Requires a
piezo buzzer connected to pin 0.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add initial draft of a pong game using the display on the micro:bit
and its two buttons. This draft only supports a solo game where the
ball bounces from the "roof" and lets the player play against himself.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This gives a quicke example on how to use SPI asynchronous calls with
kernel's k_poll API.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Adding a struct k_poll_signal parameter to driver's API unique
exposed function.
If not NULL, the call will be handled as asynchronous and will
return right after the transaction has started, on the contrary
of current logic where is waits for the transaction to finish
(= synchronous).
In order to save stack, let's move the device pointer to struct
spi_config. So the call is still at a maximum of 4 parameters.
Adapting spi_dw.c and spi driver sample to the change so it still
builts.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This application intents to test an SPI driver by looping over MISO/MOSI
line where the controller will then send data to itself.
It will test various buffer tx/rx schemes.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There is not enough memory to run the HTTP server sample
application in Arduino-101 so remove the config file.
Jira: ZEP-2157
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch add a controller specific write function and fixes a
documentation error in the mpu_test README file.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This patch adds the mpu_stack_guard_test to the available samples.
The purpose of this test is to exercize the thread stack guard enabled
via MPU on arm platforms.
Change-Id: I4665a20956d9e6d0dd4b5cc862e82040a53afafc
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This patch adds the Thread Stack Guards configuration option to the
synchronization sample.
This is meant to be an easy way to prove that the MPU can be dynamically
programmed on the supported platforms.
Change-Id: I77fbe6af3303ff8a2904768abd4cc9797f03c092
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Rename SOC_STM32L476XX to SOC_STM32L476XG to keep flash
size information.
Aim is to be able to distinguish flash size variants of
the SoC when needed (for instance in dts/arm/st/mem.h file)
Change-Id: I834bb5b83c24c39e90c0492a2b22a7c7802de361
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Sometime it is observed on the Arduino 101 that when we write more than
4 bytes into TX USB Endpoint, first 4 bytes are getting repeated
(frequency of occurrence ~1/3000).
This patch does following :-
1. In sample application "cdc_acm", it adds capability to
handle partial transfer data incase data is transferred partially
if exceeds maximum data transfer size.
2. It restricts write of more than 4 bytes into TX USB Endpoint.
This is work around to avoid issue occarance.
Jira: ZEP-2074
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit creates a HTTP server library. So instead of creating
a complex HTTP server application for serving HTTP requests, the
developer can use the HTTP server API to create HTTP server
insteances. This commit also adds support for creating HTTPS servers.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The net_sample_app_init() is now able to wait that both IPv4
and IPv6 addresses are setup before continuing.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Since more and more code is going to be reused by both the Host and the
Controller, this commit introduces a common/ folder that will contain
everything that is not tied to one of the two components but shared by
them.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Make sample working for other architectures.
SCSS_REGISTER_BASE and SCSS_SS_STS are defined in soc.h
Change-Id: Ie477520d2fb9bfcbbb5038ff42356a56d8180a1f
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
More general spelling fixes, and cleaning up stray UTF-8 characters
such as curly-quotes, em- and en-dashes. Use replacement strings
for |reg| and |trade|.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Passkeys are always 6 digits in length and should therefore be
zero-padded if necessary.
Jira: ZEP-2113
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This creates a common API for network sample applications for
setting up IP addresses etc. The HTTP client application is modified
to use this API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Instead of separate sample application that does everything
related to HTTP client connectivity, create a HTTP client library
that hides nasty details that are related to sending HTTP methods.
After this the sample HTTP client application is very simple and
only shows how to use the client HTTP API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In order to achieve proper sharing of configuration options, everything
that is common to both the Host and the Controller should now be placed
in the top-level Kconfig file, and Controller-only options are in the
controller/ Kconfig one.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit provides sample application for sensor hts221.
By default, it is enabled on board disco_l475_iot1
Change-Id: I535fac8a670fa89cc1cae15ea1abe9cfe4b6c56b
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The files for the Arduino Due needed to be updated to use the new
configuration when the SoC moved from the atmel_sam3 directory to
the atmel_sam/sam3x directory.
Jira: ZEP-2067
Signed-off-by: Justin Watson <jwatson5@gmail.com>
Since most of nRF5x-based boards can be used either as a standalone
development kit or as a BLE controller to connect to an external host,
add DT overlays so that the baud rate is correctly set to 1Mbit/s
whenever building the hci_uart sample application.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
We're moving the project code to GitHub folks, so change references
in the documentation from gerrit over to GitHub:
https://github.com/zephyrproject-rtos/zephyr
Change-Id: Ic491a62ed43fc799eb5698e92435cb6eb4d89394
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The sample in its default configuration waits for DNS server
configuration via IPv4 or IPv6 specific means. Until this
information is receives, DNS querying won't even start. Make
diagnostic messages explicit of this fact, because if user
doesn't have required services available in the network, the
sample will appear to just hang.
Jira: ZEP-2061
Change-Id: I56a5b7354a2d1239a35d8334ed95a15ebd19254f
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
net_pkt_get_len() is the correct API to get network packet
length.
Jira: ZEP-2076
Change-Id: Ifff6f3d5df28b3684cc8bb3758f9e8bccd5d4534
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add config file to be used for testing KW41Z's IEEE 802.15.4 driver.
Jira: ZEP-2026
Change-Id: I7042c57ad33ff72b35d24fbf28085b99b2301726
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
The dns_resolve sample application did not had project file for
two boards that the README file is talking about, so adding them here.
Jira: ZEP-2040
Change-Id: I68e825854a171b09d56df91ab80ce5d9349733f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
For stream-based protocols (TCP), adding less data than requested
("short write") is generally not a problem - the rest of data can
be sent in the next packet. So, make net_pkt_append() return length
of written data instead of just bool flag, which makes it closer
to the behavior of POSIX send()/write() calls.
There're many users of older net_pkt_append() in the codebase
however, so net_pkt_append_all() convenience function is added which
keeps returning a boolean flag. All current users were converted to
this function, except for two:
samples/net/http_server/src/ssl_utils.c
samples/net/mbedtls_sslclient/src/tcp.c
Both are related to TLS and implement mbedTLS "tx callback", which
follows POSIX short-write semantics. Both cases also had a code to
workaround previous boolean-only behavior of net_pkt_append() - after
calling it, they measured length of the actual data added (but only
in case of successful return of net_pkt_append(), so that didn't
really help). So, these 2 cases are already improved.
Jira: ZEP-1984
Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
In tickless kernel mode, time parameter of _sys_soc_suspend is in
milliseconds. Based on the kernel mode use the correct
mulitplier to convert to seconds.
Jira:1821
Change-Id: Idf156f56ece79a82729ebb124d1552a5eeb69e25
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Adds changes to enable existing kernel and timer tests and samples to
be used to test the tickless kernel feature.
Updated samples/philosophers and tests/kernel/timer/timer_api apps
Run the tests using following commands
make pristine && make BOARD=<board> CONF_FILE=prj_tickless.conf qemu
Board could be any of the following
qemu_x86
quark_se_c1000_devboard
Jira: ZEP-339 ZEP-1812
Change-Id: I1530b19b79ddeb0e2181594caf15f3ac28ff51f4
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Sys log already break a line after each line, by default, so removing
the '\n' on log messages.
Enabling support for sys log colors.
Change-Id: Ica3a601aba0bbbd2d9438b41fb7bca0aad9c05f4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Don't return without freeing the session when relevant.
Change-Id: I9e5903791f8eb54026c4bb2ddda9f1fe9f3f7bb3
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This patch contains a MPU test with a set of options to check
the correct MPU configuration against the following security
issues:
* Read at an address that is reserved in the memory map.
* Write into the boot Flash/ROM.
* Run code located in SRAM.
The MPU test application uses the Zephyr shell.
Change-Id: Ib40dc76b082b800884fd636a1509a0712227d681
Signed-off-by: Marc Moreno <marc.morenoberengue@linaro.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This sample application uses the kernel system logger already present
in Zephyr and publishes events through the SEGGER RTT protocol, so it's
available by the SEGGER SystemView application.
[1] https://www.segger.com/systemview.html?p=1731
Jira: ZEP-1463
Change-Id: If1eba4644b95175660b3040bdc4b2717b2cfc9ad
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.
Jira: ZEP-2051
Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.
Jira: ZEP-2051
Change-Id: I4ec03eb2183d59ef86ea2c20d956e5d272656837
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some incompatible changes were introduced when net and bluetooth
branches were changed at the same time.
Change-Id: Ifa03f85d26a63ade0fcc029377d54850c0e92451
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Most of these macros are not exactly exposing a buffer, but a specific
header pointer (ipv6, ivp4, ethernet and so on), so it relevant to
rename them accordingly.
Change-Id: I66e32f7c3f2bc75994befb28d823e24299a53f5c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- net_pkt becomes a stand-alone structure with network packet meta
information.
- network packet data is still managed through net_buf, mostly named
'frag'.
- net_pkt memory management is done through k_mem_slab
- function got introduced or relevantly renamed to target eithe net_pkt
or net_buf fragments.
- net_buf's sent_list ends up in net_pkt now, and thus helps to save
memory when TCP is enabled.
Change-Id: Ibd5c17df4f75891dec79db723a4c9fc704eb843d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There have been long lasting confusion between net_buf and net_nbuf.
While the first is actually a buffer, the second one is not. It's a
network buffer descriptor. More precisely it provides meta data about a
network packet, and holds the chain of buffer fragments made of net_buf.
Thus renaming net_nbuf to net_pkt and all names around it as well
(function, Kconfig option, ..).
Though net_pkt if the new name, it still inherit its logic from net_buf.
'
This patch is the first of a serie that will separate completely net_pkt
from net_buf.
Change-Id: Iecb32d2a0d8f4647692e5328e54b5c35454194cd
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t. This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.
We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.
We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.
Jira: ZEP-2051
Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This sensor is supported already with many features, using it to test
SPI and I2C is an overkill. For both basic I2C and SPI samples we have
the FRAM samples supporting both IOs.
Change-Id: I794e584bd540d5fe6353fa3370aac0f1d6d105dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
TCP requires buffers to be acked thus it retain a reference, but L2
driver actually consumes the buffer so it needs a context pool to store
to original ones.
Change-Id: Ie9083ab361d3674c33080f9e7e6c7248aaf7abc3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix doxygen comment typos used to generate API docs
Change-Id: I248d53000d8e57b902b9a18fdcfc9e995142a8b3
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add a sample demonstrating sound output using PWM to a piezo buzzer
connected to the external edge connector port P0.
Change-Id: I8c0902fd935f2eb3b9979476a7540e7a0216ca63
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Most boards enable a serial driver by default, but the hexiwear_kw40z
does not because it uses Segger RTT for the console. This sample
requires a serial driver, so add CONFIG_SERIAL=y to its project conf
file.
Jira: ZEP-1391
Change-Id: Iee813d1054378040fe9ff72a3ca1ea7bd66bcdfe
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Add support for nRF5x series GPIOTE based PWM driver
implementation.
Provides upto 3 pins/channels using one HF timer, two PPI
channels per pin, and one GPIOTE config per pin.
Change-id: I6056b199ec2cff595ba8fea9f659a0338ed4635b
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.
Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This can be useful to override the default value, for testing.
Change-Id: I23b559152c71955ff5aa6fd3643f1f40f5594194
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
DNS resolving is better done with DNS resolve API so remove
the DNS client API which is quite hard to use.
Change-Id: Ide4973a5be674414ea6e04a35c938195cce40b6a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Modify the code to use DNS resolve API instead of DNS client API
as the latter is being phased out.
Change-Id: I6a7618d770621fee1f502d2bc277a162c589108a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In order to test the coaps_server sample app on
Arduino 101 board.
Change-Id: I7b393dac03a8020b7bd515c3b5b2fd961940bc21
Signed-off-by: Wu Jiequan <jiequanx.wu@intel.com>
Added bt test code in the http_server sample app and in order
to test on Arduino 101 board, added prj_arduino_101.conf file.
Change-Id: Ie68a81ee809e8618f70b5fab6fdbd66692401014
Signed-off-by: Wu Jiequan <jiequanx.wu@intel.com>
The filter expects CONFIG_, otherwise it is noop
Change-Id: I2b0a02b6450287a090b69a12324fe7f7cf494999
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Filter was wrong and sample was not being built on any boards. Exclude
platforms that do not support interrupt based UART drivers.
Jira: ZEP-2014
Change-Id: I84a690e7c93fae52335434830b83086019cfd00d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The context buffer pool was introduced to deal with TCP holding buffers
when 6LO may modify them, therefore it makes sense to have it enabled
by default when TCP and 6LO are enabled given that the code can deal
with NULL pool in case the application don't implement one.
Change-Id: I600ca31ab40c96ee27937c2e885e332b0cee4995
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Atmel SAM family GMAC Ethernet driver is implementing zero-copy
networking. As a result it has to reserve a defined amount of RX
data net buffers before bringing up the interface. Since net buffer
pool is initialized by the network stack and this driver was bringing
the interface up in its initialization function the driver initialization
was performed, as a workaround, after network stack initialization. It
is not a clean solution. This patch fixes this by bringing the
interface up in interface initialization function. The driver itself
can now be initialized before the network stack is.
Tested on Atmel SMART SAM E70 Xplained board
Change-Id: I65886fd6db6f27a10628e393cfabd8e5f78c08ff
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Adds a max30101 sample application that polls sensor data and prints it
to the console.
Jira: ZEP-720
Change-Id: I50f28eaf9ea2ff5bfbb9fb6922c4006d5c02e739
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Both the string and image rendering may want to take advantage of
scrolling and sequential display capabilities. Consolidate the APIs so
that there's a single one for images (mb_display_image) and a single
one for strings (mb_display_print). Both take a duration parameter for
the per-frame duration as well as a mode parameter which specifies
sequential vs scrolling behavior as well as an optional looping flag.
Change-Id: Ia092d771e3f1b94afd494c7544dab988161c539e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This addresses the issues found by QA in ZEP-1012 and clarify the
documentated behavior as described in ZEP-1859.
Change-Id: I602e5749db7f6f44cf5be449b8e6f0d2ba66b69b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: Ie5ff404ac23621dbcf6ca61734ed6f72832c1ce2
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: Ib2d9b1cc4144bd84b1b89691a80dffd99212289d
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: I37c654fb0bb7ebdf288af01e41ce5497969f8968
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: I46cd75d714449de806a85dde08756c8e190488dc
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: I57d65a8888f78aa61d776f607a5db86bdb35726c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname`
to create a link to that doc from other docs.
Change-Id: Ide66f75ca8fac0d5f65fbfc50dc9d130cf45b392
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Docs need a label at the top so we can use :ref:`labelname` to
create a link to that doc from other docs.
Change-Id: I7d7b98f3a9d22350ca983b3558bf83f77fd6e379
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add a new mb_display_print() API which takes printf-style parameters
and outputs scrolling text instead of one character at a time. The
existing mb_display_str() API is renamed to mb_display_string() for
consistency, and now also takes printf-style parameters.
Change-Id: I59c42bcd74c62f05ecb6d097dc808b9e5c1984c5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Adds a simple driver to access the 5x5 LED display found on BBC
micro:bit boards. The display is so limited that no effort is done to
try to integrate with the existing console (which would likely make
the display unusable). Instead, dedicated mb_display_* APIs are added
that are specific to this display.
References:
https://www.microbit.co.uk/device/screenhttps://lancaster-university.github.io/microbit-docs/ubit/display/
Jira: ZEP-1990
Change-Id: I431b5b358b5f07592a60d3aed87eaab6ac20ce25
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This change introduces console_getchar() and console_getline() API
calls which can be used to get pending console input (either one
char or whole line), or block waiting for one. In this regard, they
are similar to well-known ANSI C function getchar/gets/fgets, and
are intended to ease porting of existing applications to Zephyr, and
indeed, these functions (shaped as an external module) are already
used by few applications.
The implementation of the functions is structured as a new "console"
subsystem. The intention is that further generic console code may be
pulled there instead of being in drivers/console/. Besides the
functions themselves, initialization code and sample applications
are included.
At this time, there're may limitations of how these functions can
be used. For example, console_getchar() and console_getline() are
mutually exclusive, and both are incompatible with callback
(push-style) console API (and e.g. with console shell subsystem
which uses this API). Again, the intention is to make a first step
towards refactoring console subsystem to allow more flexible
real-world usage, better reusability and composability.
Change-Id: I3f4015bb5b26e0656f82f428b11ba30e980d25a0
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
- Let's use samples settings
- Enable both net and 15.4 shell modules
- Change prj_*.conf accordingly
Change-Id: If7e32a42c8dc7026d0580b1e94e819e1eda82e5b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
And use them accordingly in the common code part.
Change-Id: Id91b76e5baea607c0d68eebcde6f84e4e35ca44c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It can uses CONFIG_NET_APP_IEEE802154_* options instead.
Change-Id: I2501ca2015cfc1e68c6c384cb32c21084d2cb30d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In order to simplify when 802.15.4 is selected on these samples, let's
setup the device through a common code.
For this to work, RFD is now the default.
Change-Id: I46590864442f77d83f681cc0e854c94344648856
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
s/SAMPLES/APP for name shortening. Applying the change where relevant.
Not only IP addresse will be available as samples settings there but
also IEEE 802.15.4 channel, pan_id, and more for instance.
Change-Id: I05dd24989bd0c804d9588092d67044a3e063bc88
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Updates the fxos8700 sample documentation to include board
cross-references and sample output with temperature data.
Change-Id: I8d4e4d8d287806f5480316da09d4072fcf9c05ac
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Adds a fxas21002 sample application that uses the sensor data ready
trigger to periodically print gyroscope data.
Jira: ZEP-1392
Change-Id: Ic9d3803a41f2873aef470a2a73b3f1db44d39b50
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
re-add sample that was dropped by mistake and add a top level Makefile
for building and flashing two cores.
Change-Id: Ie22ac1efa7b5373999997489a2c866de19553128
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The echo-server no longer uses multicast addresses itself,
so the multicast address setting can be removed from echo-client.
Change-Id: Ieab069849ced8a850ada6e6618d625695819be8e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The multicast address setting in echo-server was not really
used for anything so removing it from the app.
Change-Id: I8069c670388702fc46ae2f31506c982caa28212d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
At the moment CC2520 configuration options are selected inside "TI
CC2520 Driver RAW channe" submenu like:
[*] TI CC2520 Driver support ----
[ ] TI CC2520 Driver RAW channel --->
Make RAW channel depends on TI CC2520.
Change-Id: I92879b7f4391f1842c012b6c03c78956e90b9441
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
These are copied verbatim from the echo_server sample.
Change-Id: I56d1386144967177f889e12d4a173bfb6628f18b
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Enables the temperature sensor in the fxos8700 sample.
Change-Id: I2b4c306d3c5528dc32d940476c00180b5df08187
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The fxos8700 driver was previously converted to use the generic
SYS_LOG_SENSOR_LEVEL. Update the fxos8700 sample to use it too.
Change-Id: I2ef02342ce3a25e8d3a3d1b13181872ca0abdc16
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This may cause static analyser error such as the following:
Null-checking "tmp" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
if (tmp) {
Change-Id: Id04f8d052d8128003d5b91f7a8303940529ef261
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Support connection via SPI and keep I2C as the default.
Jira: ZEP-1698
Change-Id: I42a76131577a37429375364deb07e451107f5d81
Signed-off-by: Dario Pennisi <dario@iptronix.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The params command is not printing the arguments, which makes this not
so useful to verify how things work, so added it to the sample.
Change-Id: I2d71ee064f12c7353ba83144824ae46803e2ad39
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The RX callback and timeout parameters were reversed in call to
mbedtls_ssl_set_bio().
Change-Id: I285694e57a024ac3ce735e496daad690f94737ac
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Due to commit 8308b9bd2d ("net/http: Add the HTTP/1.1 API")
every user of CONFIG_HTTP_PARSER would need to add CONFIG_HTTP to
their .conf files. Which is fine for intree samples/tests as they
have been adjusted, but the rest of world working on Zephyr apps
will need to make this changes as well.
Instead, we should have each of the following select HTTP instead of
depend on it, which will make future use of these configs and their
dependencies more intuitive:
HTTP_SERVER
HTTP_CLIENT
HTTP_PARSER
NOTE: As cleanup, this commit also removes the CONFIG_HTTP added to
samples and test .conf files.
Change-Id: I81cfaa19e37333b1bf98778f8147814780e7f77c
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Networking stack has split one global DATA pool to RX and TX DATA pools
and also added net_buf pool support to each context. Update the driver
to support this new design. Since the GMAC TX descriptor list has a fixed
size but the number of TX DATA buffers is no longer limited updating the
TX descriptor list has to be guarded by a semaphore.
Tested on Atmel SMART SAM E70 Xplained board
Change-Id: I181e1cdd183e173b85d5d1711b6e78cd5165666d
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Unref the buffer if net_contect_send_to() fails to send.
Change-Id: I182125e64aabd171cd86f42fd9e1de036dd68544
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
LLVM/icx compiler gives some warnings for signed vs unsigned
pointers.
Jira: ZEP-1884
Change-Id: Ide57be898ebd1bff49c8a27aac392fa58dcae726
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch adds the HTTP Basic Authentication routine "http_auth".
Authentication parameters are defined in the config.h file.
The README file is also updated by this patch.
Jira: ZEP-1543
Change-Id: I2d531966290e87a68c54fc1ac834491ac937df22
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Set a local define with the value previously defined at the Kconfig
file.
Change-Id: I3ee424c4a1102ca00c0059cb9d0a86498806486f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Using a more efficent entropy call and proper output data
Jira: ZEP-1878
Change-Id: Ife738b84c1e56d58784b4fbc61ec0843579c4453
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
If we have not yet handled the previous RX buf, then we need
to drop the latest received one, otherwise the earlier net_buf
is leaked.
Change-Id: I1b69e07e8b3a3b87c76d923c847dc8316c128e76
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We need to unref the net_buf in error path in RX and TX.
Change-Id: Icb6d43cb6b7411a5135ea09c6ae96742566fafc4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The mbedtls_dtlsclient needs more RX buffers.
Jira: ZEP-1855
Change-Id: I80732c511dfade8fa9139e3bd26e21de73a68acd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Sanitycheck cannot link the result qemu binary because it is too
large. As a workaround, disable mbedtls to get the linking pass.
.../real-ld: zephyr.elf section `noinit' will not fit in region `RAM'
.../real-ld: region `RAM' overflowed by 192 bytes
collect2: error: ld returned 1 exit status
Change-Id: I543571505ab9412db7eac101848c6032d1550d79
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The configuration file for Arduino 101 for the DTLS client
sample needs to define IPv4 and IPv6 addresses.
Jira: ZEP-1169
Change-Id: Iabfd5f067d39faaf8796aac84642b630b11ef7f6
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
This patch replaces some routines found at the HTTP client sample
application by the ones defined at the HTTP API.
Jira: ZEP-1824
Change-Id: Id19e3e346c09716ac95b0c488ff6e6949a5fbabe
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This patch removes some routines from the HTTP server sample
application and replaces them by the ones defined at the HTTP API.
Jira: ZEP-1824
Change-Id: Ia5db424d62997e01896294e12224aa65a58db432
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This patch adds the HTTP/1.1 API for Zephyr. This API consists of client
and server context structures enabled via Kconfig variables.
HTTP parser support is enabled via the CONFIG_HTTP_PARSER configuration
variable.
Currently, this API only includes support for writing HTTP requests
(client mode) and HTTP responses (server mode). TLS support is not
considered in this iteration.
Supported HTTP methods:
GET, HEAD, OPTIONS and POST.
Supported HTTP responses:
400, 403 404. The http_response routine may be used to write
any HTTP status code, for example 200 OK.
Jira: ZEP-1701
Change-Id: Ic9ccd4d4578d6d0f3a439976ea332b031644ca7d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add the QEMU x86 project configuration file to the HTTP client sample app.
Change-Id: Ice6ae3f3559680e1d182506671984fd5f946f1d8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Fix a printk format warning found at the HTTP client sample app.
Change-Id: I9665e3e59595b383d6e809af51fe4cf3cd8f8bd8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Cast size_t to int in the http_client_cb code.
Change-Id: I36133da953669ec133421b5e7fb21bec9807fd06
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The invocation of net_if_ipv4_addr_add() should be included within the
conditional code that sets up the address added.
Change-Id: I9b4e76a6b4922b3455bc6b383431b4124d40a49e
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
GET and DEL requests may not have payloads, so it's not correct to
return with an error in those cases.
This was only noticed now that zoap_packet_get_payload() returns the
correct value for all situations.
Jira: ZEP-1754
Change-Id: Ie533041aa7a66855582ff4c5c937d943304bad84
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Bluetooth consumes buffer when transmitting them therefore any protocol
that need to retain them, like TCP, needs to have its own pool to copy
the buffers as they may need to be resent in case they are not acked.
Change-Id: I483c5a3eb4d54fae6b5b2902c69b67e8c2e0be5e
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
NATS is a publisher/subscriber protocol implemented on top of TCP. It
is specified in [1], and this is a sample implementation for Zephyr
using the new IP stack. The API is loosely based off of [2].
With this sample, it's possible to subscribe/unsubscribe to a given
subject, and be notified of changes asynchronously. In order to
conserve resources, the implementation does not keep its own track of
subscribed subjects; that must be performed by the application itself,
so it ignore unknown/undesired subjects.
TLS is not supported yet, although basic auth is. The client will
indicate if it supports username/password if a certain callback is set
in the struct nats. This callback will then be called, and the user
must copy the username/password to the supplied user/pass buffers.
Content might be also published for a given subject.
The sample application lets one observe the subject "led0", and turn it
"on", "off", or "toggle" its value. Changing the value will, if
supported, act on a status LED on the development board. The new
status will be published.
Also worth noting is that most of the networking and GPIO boilerplate
has been shamelessly copied from the IRC bot example. (Curiously, both
protocols are similar.)
[1] http://nats.io/documentation/internals/nats-protocol/
[2] https://github.com/nats-io/go-nats
Jira: ZEP-1012
Change-Id: I204adc61c4c533661eacfb8c28c1c08870debd91
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Fix the following error:
Calling "transmit(irc->conn, pong, ret)" without checking return value.
It wraps a library function that may fail and return an error code.
Coverity-CID: 163115
Change-Id: I525e1059e6a2ae3896f68760f1a8a6c68ecfc074
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Run both TCP and UDP to run at the same time. This requires two
extra threads in echo-client sample application.
Change-Id: I450a26d7ab1472150ea8f1309a43897a30bd4d90
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Create net_nbuf_frag_del() so that we can track net_buf frees.
If CONFIG_NET_DEBUG_NET_BUF is not defined, then this new function
will call net_buf_frag_del() directly, and if not, then it will
track memory usage.
Change-Id: I5f382436cebc71fdaf12baf7bf964fb63bee7aca
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The code used net_nbuf_get_reserve_{rx|tx}_data() function to
allocate a fragment. Instead of that low level function, use
net_nbuf_get_frag() instead. There are few places this is not
possible or is too big change like in few test programs.
Change-Id: Ied7e2b7db352de998b200ffa6ff82471bfa5ebe3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive lot of packets, it might happen that we exhaust
all the DATA buffers in the system. This would prevent from
us sending anything to the network.
Change this by splitting the DATA buffer pool into RX and TX
parts. This way RX flooding cannot consume all DATA buffers
that needs to be sent.
Change-Id: I8e8934c6d5fdd47b579ffa6268721b5eb3d64b6d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use context specific net_buf pool in echo-server and echo-client.
This will prevent application from allocating all available network
buffers in the system and thus preventing the core IP stack
functionality.
Change-Id: I3dbc64dd81c8a1165241426287a3530d00cbc7bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Using a more efficent entropy call and proper output data
Change-Id: I2ce71f63b6f22e5ceda79babd2eac802fa4bdf53
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.
Jira: ZEP-1764
Change-Id: I3c7716fd72e77c99fd29e4e90634c33f47f32e4c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
- Ring buffers provide no concurrency control. Since the ring buffer
is being installed as the system log hook, multiple contexts may try
to write to it simultaneously. Lock interrupts to prevent corruption
of the ring buffer.
- NULL pointers were being passed into sys_ring_buf_get() for the
'type' and 'value' parameters, causing undesirable behavior when they
are dereferenced.
- The 'size32' parameter of sys_ring_buf_put() was being passed the
number of bytes, not the number of 32-bit words.
- The 'size32' parameter of sys_ring_buf_get() was not bring correctly
initialized the size of the destination buffer in terms of 32-bit
words. This has been fixed. There is no longer a need to query the
API twice.
Issue: ZEP-1789
Change-Id: I96f9cc74f3711297727b4c5114b6c93510f4a8c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add a sample application demonstrating doing continuous scanning and
sending out advertising packets periodically.
Change-Id: I0ce88afd73bed4928ba65472051c0f83ff27a632
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The introduction of device tree broke bluetooth sample builds for the
hexiwear_k64 and frdm_k64f boards. Add these boards to the peripheral_hr
test so this doesn't happen again.
Jira: ZEP-1745
Change-Id: I3e61a83db09cbb5834bd510bff851611e43844a8
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Makes configuration for tinyTile board.
Change-Id: I823e299dad905387de85fd6d74159c7540bc7edd
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Fixes following warning:
...
warning: format '%u' expects argument of type 'unsigned int', but
argument 6 has type 'int32_t * {aka int *}' [-Wformat=]
...
Change-Id: I3ac523b7c8daf08b0c8e7b43aad270306fe5d744
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
These were simply copied from the 'lcd' test case.
Issue: ZEP-1768
Change-Id: Ie5d561c3131b04df2952523cc8dfd5a004dc1960
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.
Jira: ZEP-1764
Change-Id: I61ed7cfd97e20faad8f1e98dacef9384e8fefc73
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Change to use the device name defined by driver's Kconfig for
device binding, instead of hard-coding it which is not portable.
Jira: ZEP-1764
Change-Id: I0dc9aa2cdf426af71f1ed6dcef1ec7cec19f4c3e
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.
Jira: ZEP-1764
Change-Id: I7af234ada73302eb062340740df2fc7a8539150d
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Once all users of k_lifo migrate to k_queue this should no longer be
needed.
Change-Id: Ib8af40c57bf8feba7b06d6d891cfa57b44faad42
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes k_fifo functions rely on k_queue and port k_poll to use
k_queue directly.
Once all users of k_fifo migrate to k_queue this should no longer be
needed.
Change-Id: Icf16d580f88d11b2cb89e1abd23ae314f43dbd20
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix some style issues found at the src/main.c file.
Change-Id: I2023deb5ac4f31b2cf5d14d8313bbcfc03647898
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Move the client id define to config.h. Update the README file.
Change-Id: I1900c5e4f8c449e14279660d425501e86e07d409
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove the global bluemix flag and use a #define to set the
MQTT publisher topic and its parameters at compile time.
This change will save a few bytes and speed up computations.
Change-Id: I27bfc6b38c73d32c6105f1d506e147e9a5583097
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
It was assumed that the unit was microseconds, it is in miliseconds,
the same unit that is stored in the timeout field of the pending
transmission.
Change-Id: Ia99f363c7de4ec76a7ed229cb94a9964bcf609aa
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This adds retransmission support for confirmable responses sent by the
server.
Jira: ZEP-1732
Change-Id: I77c0c6375fa666e4cfdda4016ad1e0e90caf4ac9
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
It is possible that the buffer waiting for retransmission is modified
after it is sent, for example, it can be compacted by 6lo, and our
assumption of where is the message ID is located in the buffer is no
longer valid.
As the message ID is the only information that is necessary for
keeping track of retransmissions, we keep a copy of it in the pending
struct, as well as the destination address of the retransmission.
Change-Id: Id33d54353404628673541225a1a05e27ee08765f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This implements the /.well-known/core resouce and two children
resources (/core1 and /core2) so the link-format feature is better
explained.
Change-Id: I9dd8c69040c952c5d12a9987c1966a71b0257ef2
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This adds the resource necessary for the TD_COAP_OBS group of tests.
Change-Id: I33bd09910f74db90ad0d713e4479ab2e3ec343a5
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Add the resource for the TD_COAP_BLOCK_04 ETSI testcase.
Change-Id: Ied901db34ce79d3e1f7f8c7fd55bc398b1f88640
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The functions that retrieve net_buf will wait forever until a buffer
is available.
Change-Id: I03ddd1239f50fe4467e86e31c8fbfc9b05c8b190
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
- Let's build it with the various shell modules
- Make use of Kconfig.samples options
Thus: adding prj_server.conf and prj_client.conf to differentiate 2
instances of the app by their IPv6.
Then let's use samples/net/common/Makefile.ipstack
In the end, it is possible to build 2 times the samples this way:
make PCAP=154.pcap CONF_FILE=prj_server.conf server
and
make pristine
make CONF_FILE=prj_client.conf client
On client, or server, or both, shell commands can be used to ping each
other, check the statistics etc...
Once done, the given pcap file (154.pcap for instance) will have
recorded the traffic which can be parsed through:
wireshard 154.pcap
(Note: the "Malformed packet" warnings are not relevant, as the 15.4
frame FCS is a dummy one, it seems to make wireshark a bit lost)
Jira: ZEP-1774
Change-Id: I5590971660ecbfaac75af709124d59e1f98206fe
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
By default the net-tools package is expected to be located in
${ZEPHYR_BASE}/../net-tools directory. User can also specify
the directory using NET_TOOLS variable when running the make.
The net-tools package is located in this repository
https://gerrit.zephyrproject.org/r/net-tools
Change-Id: Ibccd7cabd567a630020fb9efbe1ec9e27b653b46
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This reverts commit 81f85f4e4b.
Need a better solution for this, the patch itself does not solve any problem
and fails on many platforms that do not have I2C enabled.
Change-Id: I060e3d7a9992db8a1ece6da5e8d3a521f4052395
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.
Jira: ZEP-1764
Change-Id: If8c14dd4eb186bace863432d454c9122461f2f9c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.
Jira: ZEP-1764
Change-Id: I3287da5c5a9df24507efa84bbf7bbb051726bc2c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.
Jira: ZEP-1764
Change-Id: I5a3e16e10f7700ec12edbd07603808cd32f15755
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Instead of using a hard-coded device name in the device binding
call, use the config name defined by the driver Kconfig as that
is safer and the app does not need to change when the device name
is changed.
Jira: ZEP-1764
Change-Id: I99efc4bcae0d1acae70f7820f69dfffbe17510a6
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
This commit updates the 802.15.4 example to work with the
nrf5 802.15.4 radio driver.
Change-Id: I8a4c80a21ebe29ce2616836b764c454979ebb2e9
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
This commit addes new configuration for examples which use
nrf5 802.15.4 radio.
Change-Id: I0c57334d071fb58bc2282feb3f4e6b949ce5d472
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
Some files made it through review process with full license header.
Change-Id: I2722b127c40b4b19500042c12e4fde85a165bae9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a README.rst file to both echo-server and echo-client
sample applications.
Jira: ZEP-1539
Change-Id: I1ee1d02a3de0295697117f448d8e13f5b161e11b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently, for the following MQTT msg fields:
- client_id
- will_topic
- user_name
- topic
their length is computed inside the routine that receives the MQTT msg.
Although this simplifies development, also imposes one restriction:
data must be null-terminated. Sometimes, data is received from other
sources and not generated by the application, so the null-terminated
constraint may be considered problematic for the user.
This patch removes the assumption that string fields are null-terminated.
Current data structures are already prepared to handle this case, so no
API change is required.
Change-Id: I5a147a5b21e0da49541cbe62baac363c8737cd3e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add the QEMU x86 prj file to the MQTT publisher application.
Change-Id: I1ba8c3a3bf818d8f6dee7ea94021a83ba5277e5f
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This README file is no longer needed as we have separate
README files in various sub-directories.
Change-Id: I38d1c4208e373aa7aa23373149ef1b89fbcda094
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
A sample application to illustrate the usage of crypto APIs.
This shows the usage of AES - CTR, CBC and CCM based encryption
and decryption.
origin: original
Change-Id: I17e4d966a70169b71a754c9cdc3f713a5d0c3ac0
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Add the HTTPS (HTTP over TLS) server sample application on top
of the current HTTP Parser Library and mbedTLS. This code uses
TLS to stablish a secure connection and HTTP parser to identify
the request and the proper response.
Jira: ZEP-799
Change-Id: Ifbbcd0347bec47d12158440e50a82dc2966334d3
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Added conf files for qemu_cortex_m3, until a better solution
than CONF_FILE=prj_$(BOARD).conf exists in the makefile.
Change-Id: I1edc4f37bb3c49ecb65abf7c93b3c9f4608d601e
Signed-off-by: Richard Peters <mail@richardpeters.de>
Modify the network setup routine to accept the following parameters:
- network context
- accept callback
- server IP address
- server port
This change will allow us to reuse this routine for TLS.
Change-Id: I1fdbaa908783c69f87863cbc597b42f39358762c
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This patch adds the QEMU prj file for the HTTP server sample
app.
Change-Id: I0b910b5ec9970a7ffe9621e19d9544d899c22132
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add information about how to run libcoap's[1] implementation of the
ETSI testcases against zoap-server.
Jira: ZEP-1538
[1] https://github.com/obgm/libcoap (branch develop)
Change-Id: I6aa5989575cc15630371aa0761bee98fb6fe1b80
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This was reported by ISSM compiler.
Jira: ZEP-1179
Change-Id: Ib54d43bbfae4c7819b1e2b82d2931bfe1201ecce
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Binding of the device failed due to incorrect device name. Update
to use the correct device name.
Jira: ZEP-1704
Change-Id: I6ca23a439357592c9c974ca746bccc35e77d996d
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
These were reported by ISSM compiler.
Jira: ZEP-1179
Change-Id: Ic625749309773611c0c6ba2905e9420e98947dae
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Use new device name for SPI device
Jira: ZEP-1704
Change-Id: Iec39468bbef54423af2b3a681dd4ae1eee866d1e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Turn down the default logging verbosity on the dhcpv4 frdm_k64f config
to focus on the dhcpv4 implementation.
Change-Id: Ifb450181add653951517a7b128b11657ec2bab62
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The example entropy_source implementation should write entropy to the
output buffer rather than to the context pointer which in this example
happens to be NULL.
Take the opportunity to reorganize the entropy_source to use all of
the entropy provided by a call to sys_rand32_get() rather than just
1/4 of it.
The entropy_source() callback from mbedtls is given a maximum amount
of entropy to return, rather than a minimum amount. Hence it makes
more sense to deliver exactly one chunk (32 bits) of entropy from the
call to sys_rand32_get() per call and let the mbedtls entropy handler
worry about how much entropy we actually need to collect (ie the threshold).
Change-Id: I57ed438de5cb1223619fde0fb8039d6eca284646
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The kernel provides an API call to get the least signficant 32 bits of
system time, use it rather than reaching under the hood.
Change-Id: I98fabdcadfd0a4fe5ae10226dabf4e6d31e88df6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The kernel provides an API call to get the least signficant 32 bits of
system time, use it rather than reaching under the hood.
Change-Id: I9c303ef949f7670f2a2d9691c342e496873e96e6
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Core stack is not removing the network buffer if app data length
is zero. So memory leak happening here.
Change-Id: I3d354b5e7008396ca7cb977631036871998165b4
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Using net_buf_unref() technically works but debugging the network buffer
allocations is more difficult if done like that.
Change-Id: Ib8e3f8b412c2f8388315c2f63cae4392f814ea2f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
size_t has different types depending on the arch selected for
building. Correct format identifier is %zu in this case.
Change-Id: I4388fcd8c5eb8bcd5997bb921bd80b4c2175b24c
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Fix build break introduced in commit 6b013c4721c5
("net: nbuf: Add timeout to net_buf getters")
Change-Id: Iaa521c6a49ae740eaee5276936442ab8aa4c47ba
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This commit changes the net_buf getter functions in nbuf.h
by adding a timeout parameter. These function prototypes
are changed to accept a timeout parameter.
net_nbuf_get_rx()
net_nbuf_get_tx()
net_nbuf_get_data()
net_nbuf_get_reserve_rx()
net_nbuf_get_reserve_tx()
net_nbuf_get_reserve_data()
net_nbuf_copy()
net_nbuf_copy_all()
net_nbuf_push()
net_nbuf_append()
net_nbuf_write()
net_nbuf_insert()
Following convinience functions have not been changed
net_nbuf_append_u8
net_nbuf_append_be16
net_nbuf_append_be32
net_nbuf_insert_u8
net_nbuf_insert_be16
net_nbuf_insert_be32
net_nbuf_write_u8
net_nbuf_write_be16
net_nbuf_write_be32
so they call the base function using K_FOREVER. Use the
base function if you want to have a timeout when net_buf
is allocated.
Change-Id: I20bb602ffb73069e5a02668fce60575141586c0f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit changes Kconfig prefix for ieee802154 drivers to
IEEE802154_*. This is done for consistency with config prefixes
used in other subsystems.
Change-Id: Ibbb4d96d2b748f4f13135bde85304ec34c5a90a6
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
Set protocol family value only after the buf is verified
to be non-null.
Change-Id: I0ce7bab3539087d0f522b4bb3024f46a7eb3c15f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This patch adds a basic HTTP client sample application.
The following HTTP 1.1 methods are supported: GET, HEAD,
OPTIONS and POST.
This sample application does not define an API for HTTP,
for more information see ZEP-346.
Jira: ZEP-827
Change-Id: Iee63a53f2ef424964f040eba20326d648249fc24
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The README was referring to a specific version of the boot loader.
Since the boot loader version is expected to change in future
and Zephyr code would also correspond to that version, it is better
to not mention any specific version. Instead, the requirement
is to use the latest version of the boot loader.
Change-Id: I04082eec4af16426f6456702c521e8f61bd4e0df
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Add missing README.rst files to the last two samples.
Jira: ZEP-1540
Change-Id: I8dfa6489c6c65872594d4416870e2a41e701595d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Reduce the pressure on the common RX buffer pool by reusing HCI
command buffers also for the Command Status or Command Complete
response to them. This also implies removing the existing Kconfig
variable for the command buffer sizes since the size is also dependent
on maximum Command Complete event sizes. Instead, reuse the RX buffer
size also for HCI Command buffers.
Change-Id: I006b287d64a0c9ca40de741aa9a424a49a927385
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
A subsequent patch will start reusing HCI command buffers for
receiving the response, so the distinction of received vs sent data
headroom would just make the code unnecessarily complex. Instead, just
merge these two variable into a single one.
Change-Id: I31d846331939f1a2270df7ed0c75112825e16493
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Reduce the accelerometer sampling frequency for polling mode.
So, cpu has more time to fetch the sample.
Also add some waiting time for the new frequency setting to
take effect.
Jira: ZEP-1532
Change-Id: If5c1d8a2b5f30b232a212f2775306ca397b9f80c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove CONFIG_GPIO from the prj config file. It is redundant.
Change-Id: Ife4301e7ce480a9002cadcddfd5eaa569900a391
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Use a static buffer for sending UDP payload instead of reading
values from memory.
Change-Id: I037db5cd9b8784966d481c36e8cbe92d19760475
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Compiler was giving "Unused variables" warnings if IPv6 was
enabled and IPv4 was not, and vice versa.
Change-Id: I3b17534bb8bdef207512ea5b618e138edb420871
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IP address and port number were incorrectly parsed if
user used udp.upload command.
Change-Id: Ib37d481012af5e186a1e342c92d10ddef9fe35b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IP address family was not set correctly when setting up
the connection. This lead to connectivity error in udp.upload
command.
Change-Id: I598ff2675f97e10e2033763a497f7583c94f3840
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add the HTTP server sample application on top of the
HTTP Parser Library.
This sample application is based on TCP and HTTP chunk
transfer code found at:
https://gerrit.zephyrproject.org/r/#/c/9977/
A README file with sample output and a detailed
description of this application is also provided.
Jira: ZEP-820
Jira: ZEP-1542
Jira: ZEP-1556
Change-Id: I649104a256190577000bbac118136d5bc21f83bf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This enables these samples to interoperate with Linux 6LoWPAN over
Bluetooth implementation while that is being fixed, in the long term
we might remove it from the samples once Linux is fixed.
Jira: ZEP-1656
Change-Id: I8ca9fe5a27f43cebc75b6fe5a436a5e8fcee26d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The DNS client sample application was updated to use IP addresses
from the prj_*.conf files. This patch updates the README file to
reflect those changes.
Change-Id: Ic72510be8da208aef19fb188560221e1c2386457
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Fix references to Qemu section and references to boards.
Change-Id: Ib2174ff698d57d3272073eecc71209e047961aaa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Copy the documentation from the Wiki over here, the cross linking
between online documentation and Wiki and duplication of information was
inconsistent and confusing. Put everything in one place.
Change-Id: Ia3aaec1b431477e2ec54dbec2ccaa655870b0ee3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It doesn't really make sense for GET requests to have payloads, we
shouldn't even be checking if they have any payloads.
Change-Id: I4bb8cccd6c733a5825c2ca5067a990937c7045a6
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
- Reorganize some CONF variables and add the CONFIG_NET_SAMPLES_xxx
variables to the DNS sample application.
- Remove all the numeric IP addresses
- Use the CONFIG_NET_SAMPLES_xxx variables to define the IP addresses
Change-Id: Ib294d338f163f03ea1b47143b489d916578c532d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
- Move the MAX_ADDRESSES macro to config.h.
Document the meaning and usage of this macro
- Delete unused defines
Change-Id: I035feb605611e564db15cba77d6a3dce8409ca18
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add the FRDM_K64F board to the DNS sample app testcase.ini
Change-Id: Iea8f7d09ed0d793711a5807f4bb67ed35ebf52c1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit adds the MQTT Publisher sample application for Zephyr.
The following MQTT API routines are exercised in this sample:
- mqtt_init
- mqtt_tx_connect
- mqtt_tx_pingreq
- mqtt_tx_publish
- mqtt_tx_disconnect
The following MQTT API data structures are used in this application:
- struct mqtt_ctx
- struct mqtt_connect_msg
- struct mqtt_publish_msg
This sample application exemplifies how to send MQTT PUBLISH messages
with different QoS values.
A README file is also included in this patch.
Change-Id: I2b41b276d5178a2cd1b07b031c38bff481885fff
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Enable zperf code to support TCP using the native IP stack
when testing the network throughput.
Change-Id: I3e58754cfff65525ad15e63adf57f1ea22e4559d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When CONFIG_NET_DHCPV4 is selected, ignore the CONFIG_NET_SAMPLES_MY_IPV4_ADDR
setting and instead used DHCPv4.
NOTE: This commit also adds a placeholder for DHCPv6 behavior which is not
yet functional.
Change-Id: Id31fcb99be46e966babf18f94b5dec151920dedc
Signed-off-by: Michael Scott <michael.scott@linaro.org>
When CONFIG_DNS_RESOLVER is active, the PEER config will be ignored and
instead a DNS query for DEFAULT_SERVER will be used.
Change-Id: If2c699944027f3c6a8ae9654f9cda0d7dca387c8
Signed-off-by: Michael Scott <michael.scott@linaro.org>
NOTE: You must set CONFIG_NET_IPV6=n in the project .conf file for
the CONFIG_NET_IPV4 setting to take effect.
Only 1 IP connection is active at a time. And when both are active
CONFIG_NET_IPV6 takes precedence.
Change-Id: I34a75f8d44db986810648d82a65d2ed29fc9a940
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Often IRC messages are split across multiple netbuf fragments.
Let's fix the message processing to account for this.
Change-Id: I3835af6adf337d27c28a0beeb72848dcc838772c
Signed-off-by: Michael Scott <michael.scott@linaro.org>
IRC won't allow 2 users to use the same user name, so let's add
a random number to the end of "zephyrbot" to make it semi-unique.
Change-Id: I56349de21823d8fd2c52646656615b42fc12de5e
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Currently, status can be 0 when a NULL buffer is sent to
on_context_recv() so let's not include status in our check.
And in the future, status parameter may be a non-zero value indicating
an error condition. So modify check to include positive values as well.
NOTE: Also make sure to use NET_ERR in these cases and not NET_INFO.
Change-Id: I8eac9a86d22b3b5624cd7a4e9d99e57afcac035f
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Instead let this be set via the project .conf file
Change-Id: Id8d7b46cc0888b83593b6f82dae619fb42c6ae3f
Signed-off-by: Michael Scott <michael.scott@linaro.org>
chan->irc won't be set after the "JOIN" transmit succeeds.
Change-Id: I935b0a44c94ec3d2c91b73db92bfd2005c27bb7f
Signed-off-by: Michael Scott <michael.scott@linaro.org>
samples/net/irc_bot/src/irc-bot.c:368:36:
warning: 'c' may be used uninitialized in this function
[-Wmaybe-uninitialized]
for (cc = &chan->irc->chans, c = c->irc->chans;
^
As suggested by Leandro Pereira <leandro.pereira@intel.com>
adjusted to:
for (cc = &chan->irc->chans, c = chan->irc->chans;
Change-Id: Icd490059e0b97f95408dd7bad3f1783a215c5edb
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Making a bit more room in these buffers. Some were not big enough
in certain cases, while others needed more room in general.
Change-Id: I47a4bb8c6635305f55dee323f7293b2e4cbed55a
Signed-off-by: Michael Scott <michael.scott@linaro.org>
K_FOREVER timeout in net_context_connect() will wait until
SYNACK has been received and we're ready to proceed with socket
communication.
To make the code as clear as possible, let's remove 2 callback
functions and relocate that code inside zirc_connect().
Change-Id: I6c64852ad5f48b24e1e6a58a741981e7d07bfd40
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Due to code restructuring we should move the following
functions higher in the code (above zirc_connect):
zirc_nick_set()
zirc_user_set()
zirc_chan_join()
Also relocate the function declaration for on_msg_rcvd()
to the top of the code.
Change-Id: I3936fb645b709dcbcfcc4212c127db819974c046
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Users can locate and edit these easier when they are at the
top as a #define.
Change-Id: Iecb53999cef1e70a80a28c7be5664ccde0fe7acf
Signed-off-by: Michael Scott <michael.scott@linaro.org>
By moving panic() function up to the top, other functions can be moved
later and still be able to call it.
Change-Id: I4290d1509cc64fc3f5fc5ec109cc19058090e6dd
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Instead use helper function where necessary.
Change-Id: Idcb47d02966731d7ef18588d1dccc8031a38d9d0
Signed-off-by: Michael Scott <michael.scott@linaro.org>
The aim of this helper function is to remove duplicate code for setting
the parameters of in_addr structures.
Change-Id: Id882a5947c47a9b6f92924ce8fb04023540fbb8d
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This allows for a set app stack and threaded functions to be used later.
Change-Id: I647a3defdf6eb4cca2a4a21192b20641f5bf8d4a
Signed-off-by: Michael Scott <michael.scott@linaro.org>
This is a sample IRC bot program, written using the new IP stack API.
All it does is join an IRC channel, wait for some commands, and react
to them:
!hello will greet whoever sent the command
!random will generate a pseudo-random number and send it back
!led_toggle will toggle an LED in the board [1]
!led_on will turn the LED on regardless of its current state
!led_off will turn the LED off
!rejoin will part the current channel and join again
!disconnect will quit from the IRC server
As far as the IRC protocol goes, it doesn't do much more than this, but
it should be straightforward to add support for other things (such as
notices, CTCP, DCC, etc) if someone is inclined to do so. However,
that's way beyond the scope of this sample, which is to show how to use
the network API to write a TCP client.
Some things are still missing as an example of how to use the APIs,
namely DNS resolution, automatically setting up the network with DHCP,
maybe saving settings on EEPROM. These are good candidates to be added
in the future.
[1] The LED code has been shamelessly stolen from the CoAP sample code.
Change-Id: I7152e97c0726f3559db545579ae8ae8d07bf04cd
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Michael Scott <michael.scott@linaro.org>
It will setup IPv4/IPv6 addresses. Telnet is ran in the background,
along with net and kernel shell modules.
See the README.rst for more information how to start and use this
sample.
Change-Id: I3e935014c79b534aab43a6fa8256792b23abb38e
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Allow build-testing zoap-server with support for the CC2520 radio.
Change-Id: I986afd7b15208d477bd79f42a52dd45b217214cb
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
In case the user wants to use BOARD make variable to conveniently use
another board with this sample.
Change-Id: I6dd0656da223218d116dd498c1336c890563b212
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
net_addr_ntop() will convert IPv4|6 address to string form.
Renamed existing net_sprint_ip_addr_buf() to net_addr_ntop()
and adjusted parameters as per API.
Jira: ZEP-1638
Change-Id: Ia497be6bf876ca63b120529acbadcfd9162a96e3
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This configuration file allows using the device 802.15.4 radio for
IPv6 networks.
Change-Id: I9b3ee9a64acb71e97e4e8f7aae3e619196ad0462
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Currently, the function accepts a struct sockaddr * but the code
immediately type casts this to either in_addr or in6_addr. This is
incorrect behavior as the first field in a sockaddr is sa_family_t
and not address data.
So without special knowledge, a developer will use a sockaddr structure
as the parameter and then wonder why the address information isn't being
set correctly.
Let's change this parameter to void * which makes this function similar
to inet_pton().
Jira: ZEP-1616
Change-Id: I1fc9368da999d90feb07c03fac55dcc749d4eba6
Signed-off-by: Michael Scott <michael.scott@linaro.org>
Tested on Atmel SMART SAM E70 Xplained board
Origin: Original
Jira: ZEP-1492
Change-Id: If6acbaabf0857425684e0ab2d4db513e5bbc7b77
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
bytes_read should be an int, all uses of it in this sample are of type
int. Lets clean this up so when building with newlib or in the future
when uint32_t might change its definition we don't have issues.
Change-Id: Ief7bfb48948df50cec45b4707ef7676d13173f34
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There are a few arrays we use with print_number and parse_number. These
functions expect a const uint32_t so lets have the arrays for TIME_US,
KBPS, and K match.
Change-Id: I6347b06af2374d702144084bb6b538a478fb8fac
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Instead of using a hard-coded string, make the sample use the Kconfig
variable for the device name.
Change-Id: Ib09f594e1cba221f9064318572bd90d38bd2733a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Change BREDR_NAME to DEVICE_NAME so it can also be used as the LE
device name.
Change-Id: I9ef55d9dff098372d47d9d5754ad7a7163a65bc0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
SENSOR_CHAN_*_ANY will be deprecated, so use the new SENSOR_CHAN_*_XYZ
enum values.
Change-Id: I91cf25864613a934feab65588969d10c52fd4fe6
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
This commit enables echo-client application to start to
send data over TCP connection.
Change-Id: I9acdaae7f1e8411952c30caeedc9c1fb07cdd448
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Option CONFIG_NET_IPV6_NO_DAD is not used anymore, clean project
configuration files.
Change-Id: I368e076d2f79f1d4bc86edee11ff5befe37362c8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The cause for this change is TCP. Until now, the radio strategy driver
(ALOHA or CSMA) was providing the actual nbuf, and not the buffer
fragment, counting on the fact that the loop was using
net_buf_frag_del() which made so, iteration after iteration, buffer
framgent to be always buf->frags. The problem with this logic is loosing
the fragments that might be still referenced by TCP, in case the whole
buffer did not make it so TCP can retry later and so on.
Instead, TX now takes the nbuf and the actual frag to send. It could
have been working with just a pointer on the data, and the whole length
of the frame. But it has been avoided due to possible future devices,
that will be smarter and run CSMA directly in the hw, thus it will
require to access the whole buffer list through the nbuf.
Change-Id: I8d77b1e13b648c0ec3645cb2d55d1910d00381ea
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The option is no longer used so it can be removed.
Use CONFIG_NET_IPV6_ND option instead.
Change-Id: Ibaa3d3deb52b8b176e85f8b9e1d8c80c1026aea1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This is meant to test telnet console easily, as echo_server already
enables net shell module etc.
Change-Id: I045340ae5d6e179ea5ce1416cd7d67c6956bd973
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add configs for MCR20A device to echo_server and echo_client.
Change-Id: Ic0e310c0eb2eefe6ce5752a20b0c079b7ea8757c
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Only CONFIG_NET_SLIP_TAP will select SLIP, UART_PIPE,
UART_INTERRUPT_DRIVEN and SLIP_TAP. Otherwise apps will crash on
qemu.
Jira: ZEP-1617
Change-Id: Ibefbe708deb05e28b43ed4225211a5af655cec8d
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Use printk(), snprintk() instead of printf() and snprintf().
CONFIG_STDOUT_CONSOLE is anyway disabled by default so printf()
will not output anything without it.
Change-Id: Ide24e4d669e9821289189ed28e30a596120d9611
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Instructions to verify DHCPv4 client functionality in QEMU and
FRDM_K64F.
Change-Id: I623128186387c0c3237c8e759b949a3d0fde0993
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
After queueing full packet to RX queue we set pkt_curr to NULL, if we
get right after that SLIP_END we shall check for pkt_curr to avoid
NULL pointer assignment.
Coverity-CID: 157574
Change-Id: I2be40a652867e73b4a1994f529dc21980ecb35b4
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Some applications are not prepared for using multicast address and
specifying the interface, so it may be convenient for the user to be
able to use a unicast address when communicating with the
samples. This aligns this sample with most of the networking samples.
Change-Id: Ic97ea5a346a650751b6e2cbfefad25a3e700278c
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Samples instructions are to follow the rst format so they are
consistent with the rest of the documentation.
Change-Id: I37f06139484a4632e5b9c720ce1317feab68358b
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Add a label in the arduino 101 document for the flashing
bluetooth instructions, and link to that instead of the
wiki page (deprecated).
Change-Id: Ie39240cdf4881356f634d21ead1d7ae93ccd60a1
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Change hard url into :ref: to board documentation
Change-Id: I9d8a585bb0e7274cf3233eadac2e303cc98ef86a
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
At the default sample rate of 400 Hz, there is not enough bandwidth on
the UART at 115200 baud to print every sample. Fix by decimating the
sensor data by 4 before printing to the console.
This issue was discovered after fixing ZEP-1507.
Change-Id: I451ec9873ca93fe417d5d5a2d6d13b5e921c7611
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Changed README to RST and updated the formatting.
Jira: ZEP-1537
Change-Id: I012854daff6883cf462a3cc0246c73a8767dcd66
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
The headings on some .rst files were not following the expected
heading order of using # for h1, * for h2, = for h3, and - for h4
This patch fixes that, and the doc/templates/*.tmpl files created
for folks to use as templates for creating board and sample docs.
Change-Id: I0263b005648558d5ea41a681ceaa4798c9594dd9
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Printing values as <integer_part>.<fractional_part> gives undesired
results for negative numbers, so print the values converted to floating
point to avoid this.
Change-Id: I871b8461f2d643a2adce67df064e9f5e6d506319
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
If we receive 0 byte packets from the network, we need to
ignore those as otherwise it is possible to leak network
buffers.
Change-Id: Id4b5b0d03c0b6d1e16634ff2d1960ea4728c8aa1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Because net_buf_frag_del() returns the next fragment in the list,
we can use the return value which makes the code nicer looking.
Change-Id: Ic3d0155417b52a34bfbaa918570ff9af95aee468
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Return and clean buffer when fragment can not be allocated.
Coverity-CID: 157590
Change-Id: Ic8844609da4049623a6cf0c2ae037b2b777542e9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Print assigned address and other information if client receives
anything from server. E.g. subnet, lease time and router.
Change-Id: I759d59522930401766452eb1fb3d57d1a8295a67
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
ENC28J60 has numbers on the board. Documentation has information about
signals only. Wiring will be easy with pin numbers.
Change-Id: I0afd6058a9417b679ef6358304737bf256aa3522
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
These logs are mandatory to spot buffer leaks. Unfortunately, they are
still not detailed enough to spot the actual place where the leak
happen.
Change-Id: If36dfa7a54aa1546fb268301f369b5ecd046e276
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In case of a GET request do not error if there's no payload or queries
parameters.
Change-Id: I29b2225700c83a8a2dad166146288dd55bd8f3de
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This resource verify the capability of the server to send a response to
a POST including a Location-Query option.
Change-Id: I4b663e813eb713d7e93a3c2f8cfd58c335b24cde
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The CoAP test suite expects a specific path included in the
Location-Path option in the response.
Change-Id: Ib7616f9ad318fa93dc862f686429edb5084306e3
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The Californium tests expects that all GET responses include the
Content-Format information of the response. In our case, all responses
are of type plain-text.
Change-Id: I08844825f31ed8f4c54020a41b9172cef5da6d70
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
So the sample zoap server application is more conformant, include the
token from the request, if any, in the response.
Change-Id: I5aacc1a3f81ebeaf473d327163c952b829489b01
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The Californium test suite considers an error responding a NON_CON
request with a ACK response, even if the spec says it is valid, so add
support for using the correct type of response according to the
request.
Change-Id: I211c8a135b8db83af442a1d645b7ea0826dbbdec
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This allows to verify that the CoAP server is able to handle a
blockwise PUT request.
Change-Id: I801e353a27b10a5266748591d023bcb607db6bb4
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This adds support for TD_COAP_BLOCK_01 and TD_COAP_BLOCK_02 tests,
which test that the CoAP server is able to handle GET requests with
blockwise tranfers.
Change-Id: Id0d1703adcf5d4e76dd1bc489c8bcc94a3fd90bc
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This resource is used to verify that the CoAP server is able to send
responses in two steps: 1. only acknowledge that the request was
received and is going to be handled; 2. The actual response, with the
payload.
Change-Id: Ia77cc0ee9805e6cc120c57f4598c68ad364882a0
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
DHCPv4 sample was running on main stack. Updated to run on its own
thread. Update config options (removed unnecessary ones and separated
few options for easy readability).
Change-Id: I3be38ca4cd4bcfa62e2613b90b104679cff2517e
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This patch removes legacy configuation variables found at the
prj_arduino_101.conf file of the DNS sample application.
Change-Id: I74e370a7be177f809d805525cc18f594a59e38c0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
All sample applicatons in Zephyr, using the ENC28J60 driver, set
the ETH_ENC28J60_0_GPIO_PIN Kconfig variable to 19.
However, in the Kconfig.enc28j60 file this variable is set to 24.
That default value, 24, was used only during the first iterations
of this driver and never used again.
In this patch, we set the Kconfig variable to 19 and simplify
project configuration files by removing one line.
Change-Id: I3d5fd9da04a3f10845d2a409de56f5b9c235e995
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove CONFIG_GPIO=y for the Arduino 101 board. This configuration
is now set by default in the board configuration file.
See commit 8f96628064.
Change-Id: I6fa73a5785d78c51f03a0af48fc2aa8cc7636c7d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is very handy for debug purposes. It provides us with a reassurance
that at least something is happening, even if initialisation does not
complete (hangs forever).
Change-Id: I6ac1bfec84f8a6694f82d14fdc5d2a27aa1fc634
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The k64f has a random driver the TEST_RANDOM_GENERATOR config is not
necessary.
Change-Id: I73bc4076cac459388d9dd9bf3eb89c8cb5ba7db7
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Also remove dependency on STDOUT_CONSOLE, it is not being used.
Change-Id: Ib7488b1e2df3892c1daa2e12da05fcc1266ac9aa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The original buffer fragments can be used to send back a reply directly
since Bluetooth doesn't add anything to then.
Change-Id: Ifeac0e6c3abbd527c79912abc5f5b833b0b52171
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The idle stack already defaults to 256. The ISR stack size of 640 was
intended to make the app fit on 16k nRF51 variants and is now the
default, i.e. it doesn't need to be explicitly set anymore.
Change-Id: I8db3c080e1f84c65b27f931fa48c75bd90a2d3cd
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
HTML documentation shows misaligned text that may be a bit confusing.
This issue was caused by wrong indentation. Furthermore, board specific
instructions to build the image does not include any instruction header.
This commit fixes the above described issues.
Change-Id: Ie965e09f32f46a9d69aac28c4b389084f06b31b6
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove the convert_to_double function and use sensor_value_to_double
from sensor.h.
Change-Id: I92ef4219057f431917f4c8e9d46d4ee2074b423b
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
Remove the type field from the sensor value structure. All values will
have the type previously defined by SENSOR_VALUE_TYPE_INT_PLUS_MICRO.
This simplifies the interface, as apps will know what value type to
expect. Apps that prefer to use double values can optain them using the
sensor_value_to_double function.
Change-Id: I3588d74258030eb16c3f89d8eead13cca4606b18
Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
This makes it possible to setup a Bluetooth connection using net_bt shell
commands.
Change-Id: Ie4ae7e61345315ef987a00b6b5a28c0419f6b1c8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the interface is not UP wait for MGMT event if that is enabled.
Change-Id: I4866c23d1e6f5b1a7cf212434d794673d7e756ce
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
CONFIG_NETWORKING_WITH_BT no longer exist, instead
CONFIG_NET_L2_BLUETOOTH shall be used.
Change-Id: Ide353b7620228e431c535768b37749994caf8e8b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
It was missing for arduino_101.
Jira: ZEP-1574
Change-Id: I08fc0961b94f5f7b1b787ebf52e7d9922e38006c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
TCP didn't actually have a way to signal synchronous receipt of a FIN
packet. Extend the recv_cb API to allow a NULL buf argument with
status==0 (by analogy to Unix's zero-length read) to signal EOF.
Update docs too, and also echo_server which wasn't prepared to handle
this situation.
Change-Id: I7dc08f9e262a81dcad9c670c6471898889f0b05d
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The NET_SLIP Kconfig choice option doesn't really do anything for us,
plus we get warnings related to setting CONFIG_NET_SLIP=y in prj.conf
files.
Warnings like:
warning: override: reassigning to symbol NET_SLIP
warning: override: NET_SLIP_TAP changes choice state
So remove NET_SLIP choice and remove CONFIG_NET_SLIP=y in the prj.conf
files.
Change-Id: Ibccf9cf167f4c8a4df480ca0396bf83fcf60df1e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename cc2520 directory to hw and use it as generic
test application for the 802154 hardware driver.
Change-Id: I1c21505b7eb295279190f011a99c80e762178730
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add common log level for all IEEE802154 drivers.
Change-Id: If92c96b14e630d4482aadf9cacb25662d6663399
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Reformat and consolidate the samples/net/README and dns_client/READMExxx
files according to the RST spec.
Change-Id: I735190245204854ac5527e18971cc4c6478423e5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Update the zperf/README.rst file with the following information:
- Homogenize the usage of "zperf", "iPerf" and "Zephyr"
- Update the Supported Boards section
- Clarify some instructions
- Add the Requirements section
Change-Id: Idfb29e2a5db9a78c19a6a27923f134583ebe5822
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Rename the project configuration files to pass the build.
The Makefile specifies the following format for the conf file:
prj_BOARD_PROF.conf. However, there are two files with the
following format: prj_BOARD_IFACE_PROF.conf. So, rename them
to avoid build errors.
Change-Id: I75e0d4169db881583b5f9a2b67deee46f66b6c97
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove commented line in the zperf/Makefile file.
Change-Id: Id869f21e923d3bb39fc31c5216ce29d78a0e1805
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove the reference to CONFIG_NET_UIP in src/Makefile.
Change-Id: I960413c17496c4b70b9c171a54ccfca4951b858b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Update these scripts to explicitly call out python version 2. Some
distributions have started making /usr/bin/python version 3, and other
distros have expressed a desire to do the same.
Also use the
#!/usr/bin/env python2
construct instead of an explicit path so that the user can more easily
use their own python install by just placing it earlier in the path
Jira: ZEP-1548
Change-Id: I36dccc652353ba8bd58c483dba3ce61d3643de00
Signed-off-by: David Brown <david.brown@linaro.org>
Sample projects that pair the frdm_k64f board with a cc2520 require
additional pinmux settings beyond the standard frdm_k64f pinmux. These
settings used the private k64 pinmux API rather than the public pinmux
API.
Because the mcux pinmux driver now always supports the public pinmux API
(vs. the k64 pinmux driver which only supported it in pinmux dev mode),
we can convert the frdm_k64f_cc2520 projects to use the public pinmux
API and the mcux pinmux driver.
Change-Id: Idfae8393171b007d8629e34bfae64255f55c6792
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Removes unnecessary CONFIG_ETH_KSDK project settings from the net
samples. Some of the configs no longer exist (MAC0-2), some are not
valid (MAC3-5) due to RANDOM_MAC=y, and the rest are already enabled by
default by the SoC and board.
Change-Id: I27079b8bb142ebc507885f3b1de07e282c813506
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This patch moves pwm driver samples to samples/basic and also convert
documentation of PWM samples to RST.
Jira: ZEP-1536
Change-Id: Ib2b3ff8b1722a26618e9a6fe416e2138d82ca28b
Signed-off-by: Punit Vara <punitvara@gmail.com>
This will replace the current goal of 'make qemu' with 'make run' and
moves Qemu handling into its own file and into the boards instead of
being architecture specific.
We should be able to add new boards that support some other type of
emulation (by adding scripts/Makefile.<emu type>) and allow the board to
define their own options for the use type of emulation.
'make qemu' will still work, however it will be deprecated, starting
with this commit it is recommended to use 'make run'.
Jira: ZEP-359
Change-Id: I1cacd56b4ec09421a58cf5d010e22e9035214df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
These samples/tests fail to build on some of the nRF5x platforms. We
don't need Bluetooth enabled for these tests so we can reduce footprint
by turning it off.
Change-Id: I87e62a1d70f80d2bc22414d6a9e591e36ad9fa06
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add global option for legacy configurations and enable by default for
backward compatibility. Disable option on tests and keep it on legacy
samples and tests.
Jira: ZEP-964
Change-Id: I0831e2aa74d438b1ac74eb762186cb220a504beb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Disk IO functions are used by both FS and USB Mass Storage.
This patch refactors those from FS directory to a separate one.
In addition existing, config options were modified to make
stuff meaningful.
Jira: ZEP-1276
Change-Id: Ia2a2e18f3dbbbdb964c3dc0427d8138ad86134cd
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Remove legacy option and use SYS_CLOCK_EXISTS where appropriate.
Change-Id: I3d524ea2776e638683f0196c0cc342359d5d810f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Various sensor samples are hardwired to expect returned sensor values
are represented as doubles. In each case this assumption is incorrect.
Introduce a generic sensor_value to double helper function and adjust
the samples to use it.
Change-Id: I89c788686576562b84e07a36064640231340c33b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This will allow inclusion of documentation files that exist outside of
doc/ and will make it possible to add rst files across the tree,
especially for boards, samples and tests.
Change-Id: I7afcf92d99f504b2bc0b2b7e3452acb2f8e08294
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Cut wait times by 4, in chunks in 25ms instead of 100ms. This allows to
see what is going on, but with much faster transitions, which makes the
demo slightly less boring.
Change-Id: I32fdd6e41a9af1fe9aa8a8f186de7945986b3a71
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This is easier to test the 15.4 layer instead of hard-coding sample
logic.
Change-Id: I2376dec3dad9e2ceca3f61bd88bf5709f1bc1390
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It's currently hard to find a Beacon enabled network. So let's switch to
active scan for now.
Change-Id: I192e7c3128f9488fb680ea7f23221b2b4aa52188
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It will print-out the results, if any.
Change-Id: If988a6dc3c4504a8d4aa947d3d3f949870b638c8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fixes two references to yaip that were were left behind after net/yaip
was renamed to subsys/net/ip. The zperf sample needs net_private.h, so
the include path is updated. The dhcpv4_client sample doesn't need it,
so the path is removed.
Change-Id: I189f1b58191524330254a5b7b31a9a4974956728
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
SW0_GPIO_INT_CONF shall allow boards to define the
interrupt configuration for SW0 without having to modify
the button sample app.
If SW0_GPIO_INT_CONF is defined set EDGE to it, otherwise
used default EDGE value.
Change-Id: Ia697e06debc341463ed9cdee1db564f3727d27e3
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
With LE Secure Connections the longest packet we require is 65 bytes
long: 64 bytes of Public Key data + 1 byte SMP opcode.
Extend the size of the L2CAP pool blocks so that they can fit such
packets and therefore one can use 70-byte
CONFIG_BLUETOOTH_CONTROLLER_TX_BUFFER_SIZE to achieve LE Secure
Connections pairing without HCI fragmentation.
Change-id: I2f11b4277ec5a24ceba79bccc7d84c64065b6e84
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Displays the present value of the indicators in the Handsfree
application.
Change-Id: I666ff2b15e70de8c1a26b902077d79c5c1a9d5fe
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
The following readings were obtained after running the peripheral and
central_hr apps in qemu combined with the controller (hci_uart) on nRF51
and nRF52:
Main Stack 380
Idle Stack: 68
ISR stack: 532
Controller RX Stack: 388
HCI TX Stack: 516
The numbers set in this change provide a safety margin from the ones
measured empirically.
Change-id: Ice7ad7f081502e0ea1accf856a7937c0bf0783b2
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This port ipsp sample to use the native stack so it can be used once
again.
Change-Id: I7975b017b0aa5bd81a1701692ec81527e39d4701
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
HCI ECC commands are causing freezes in the controller build. Until
further investigation is done disable them to avoid issues when running
the controller standalone.
Change-id: Ifab0fa362348b72e88adaa5250c914770e4a70ba
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
For consistency with RX_STACK_SIZE and the rest of stack sizes, rename
to use the normal naming scheme.
Change-id: Ib8d484482466fa8d629e6329e07b927abdd6f598
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This helps simplify code that was previously combining net_buf_add()
with memcpy().
Change-Id: If44cf9cd651aba5e544e36567869f147468663eb
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To customise test builds and support test related features such as time
stamps and a boot banner, introduce a Makefile variant that is dedicated
to testing.
Initially we introduce a new config overlay that is used for all tests, in
this case we enable BOOT_BANNER and BUILD_TIMESTAMP. This will print the
current version and the date, useful when reporting bugs and also an
indicator that the system has booted before the test has started.
For example:
[QEMU] CPU: qemu32
***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Dec 21 2016 19:57:13 *****
tc_start() - Test Nanokernel CPU and thread routines
Initializing nanokernel objects
...
..
Change-Id: I224318cdeb55a301964ea366dbc577e2e3a09175
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Let's make net stack having its own level of debugging through sys_log.
It replaces NET_DEBUG by NET_LOG_ENABLED, which is then semantically
better: someone wanting to log the errors might want that not only for
debugging.
Along with it, CONFIG_NET_LOG_GLOBAL option is added, in order to enable
all available logging in network stack. It is disabled by default but
might be found useful when warning/errors need to be logged, so it is
then unnecessary to selectively enable by hand all CONFIG_NET_DEBUG_*
options.
It is possible, locally, to override CONFIG_SYS_LOG_NET_LEVEL by setting
the level one want to NET_SYS_LOG_LEVEL. This can be useful on samples
or tests.
Change-Id: I56a8f052340bc3a932229963cc69b39912093b88
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Re-instate the init_app()call which was accidentally removed by commit
commit 34f9391c9cf5 ("dhcpv4: Report address acquisition.")
Change-Id: Ic5ef70fd855a5bcb3ea1171de652994db493f4bb
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This will help to track only what's wanted (ipv6, tpc, udp, else...) if
needed to.
Change-Id: I5c2e5e582db629b5d0e1cd98004f693c50f532a4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It will be thus possible to enable only the error logging, or the other
sys_log levels.
Change-Id: I0c0ed789f7cfbb4811320e8f8249151288274873
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
printk can do the job properly.
Change-Id: Ib743328e046bdb29be26adfe5cd007aaa758cd64
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
When building the echo_client sample app, the following warning
is found:
echo-client.c:37:
echo_client/src/echo-client.c: In function 'send_ipv4_data':
include/logging/sys_log.h:108:20: warning: format '%d' expects argument
of type 'int', but argument 7 has
type 'size_t' ...
So, this patch changes %d by %zu to remove that warning.
Change-Id: I8a3822bca6d5988e531684d647de93bd77aabf9b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
When using SLIP for TAP networking between guest and host, the correct
option is CONFIG_NET_SLIP_TAP. CONFIG_SLIP_TAP only enables it on the
SLIP side, it should be enabled on the networking stack, as well.
Change-Id: Ie1dacd07eb5a0891a572b08268a865f05a373690
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
When using SLIP for TAP networking between guest and host, the correct
option is CONFIG_NET_SLIP_TAP. CONFIG_SLIP_TAP only enables it on the
SLIP side, it should be enabled on the networking stack, as well.
Change-Id: I76226db9c587f1b5e9613244adab8f916ad94013
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Use the network management interface to catch and report IPv4 address
acquisition in the application.
Change-Id: Idd1bcaac90fffbd617600a7713206599e547826f
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Add build test to sanity_check to get a complex net app being built
for frdm-k64f.
Change-Id: Ib136f7964b65ad2167a3ed4484bff3bfe2a7ebad
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This moves the shell component into its own subsys and groups all
related files and options into a single place.
Additionally, one Kconfig option will now be required to enable the
shell:
CONFIG_CONSOLE_SHELL=y
The header files was also moved to include/shell/shell.h and can be now
referenced with
#include <shell/shell.h>
instead of
#include <misc/shell.h>
Updated documentation as well.
Change-Id: Iffbba4acfa05408055e9fd28dffa213451351f94
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
replace include <nanokernel.h> with <kernel.h> everywhere and also fix
any remaining mentions of nanokernel.
Keep the legacy samples/tests as is.
Change-Id: Iac48447bd191e83f21a719c69dc26233216d08dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The README.txt file is updated with information about wiring
and building. A testcase.ini file is also added by this patch.
Change-Id: I7354d844ac3dec41f0c9af02ede5da26f3ad0398
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The dev name for spi in the sensor sub-system was changed to
SPI_SS_x from SPI_x recently. Let's use the new name in the
sample app.
Change-Id: I78cdf21fce16290503c303e0de1432b4587486aa
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The addresses used by the client were still made reference to the types
used by the old network stack.
Change-Id: Iaba919cb072e3295c9b371cc8fe493284c5b523b
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The legacy IP stack was removed from the source tree, so this changes
were made to adapt to the native IP stack, but this might not work on
the galileo platform due the ethernet driver not being tested on the
new stack on TCP, but to have the reference application ready when
it gets integrated
Jira: ZEP-1448
Change-Id: Ifa6ea0afb3bc532dfb92b09debbf6eee59e38a25
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
The shell_cmd structure has three parameters and only two were
initialized. So, this commit initializes the remaining parameter
and also adds the ARG_UNUSED macro to avoid compiler warnings.
Change-Id: I667a4e9839ec5acd526df0bb465beb2062518315
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add ARG_UNUSED to some function parameters to avoid
compiler warnings.
Change-Id: I5db5bc536f1eeb084e08d2fbe4a8b0a8456e67a5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Also remove mentions of unified kernel in various places in the kernel,
samples and documentation.
Change-Id: Ice43bc73badbe7e14bae40fd6f2a302f6528a77d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Move logging out of misc/ to its own subsystem. Anything related to
logging and any new logging features or backends could be added here
instead of the generic location in misc/ which is overcrowded with
options that are not related to eachother.
Jira: ZEP-1467
Change-Id: If6a3ea625c3a3562a7a61a0ba5fd7e6ca75518ba
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If we have Bluetooth or GPIO SCH we need multithreading right now
so disable any platforms that enable these features from running
this test.
Change-Id: I1ea35636e1382aac0f266fe73441619f9ac00d53
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove CONFIG_BMI160_TRIGGER_SOURCE_GPIO from prj config
file. It is not being used any more.
Also change CONFIG_STDOUT_CONSOLE to CONFIG_PRINTK. The
whole sample is using printk instead of printf.
Change-Id: I4ac7db37da1e45aed2457ace9e82385e37143c36
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Removing useless options, refining the logging and of course setting the
right IP to make it work.
Change-Id: I0c0c1979d590bc4c4fcb3a1d1a252b87b0153511
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
When zephyr receives a 15.4 frames it allocates 1 RX buf (nbuf) and 1
DATA (buf), and it gets queued on net stack for post processing.
Problem: receiving a lot of frames is just completely nominal and very
fast (timing is critical in radio, and the rx thread of the radio driver
has a high priority, much higher than net stack's rx post processing).
So guess what happens when CONFIG_NET_NBUF_RX_COUNT=10 though let's say
12 packets are coming in?
The RX buffer pools gets empty and soon the system hangs on getting a
newly allocated one.
This proper CONFIG_NET_NBUF_RX_COUNT tweak fixes the issue, however some
future work will reduce the need of so many RX meta buf:
- l2's recv could be called right away at net_recv_data, before queuing
the buffer for post-processing, but this could affects reception
timing on radio side, which is critical.
- An l2 pre-processing (in the middle of what current l2 recv does)
could be implemented, it would be technology depenedent (aka: not
mandatory on all l2) and could quickly decide what to do and at best
drop the whole, or at least drop the RX meta buf (frag would still be
kept). Let's see.
Jira: ZEP-1427
Change-Id: Ic75b02efa36e35b450c02b3e6439a8d73f03f839
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This patch adds the project file for the FRDM K64F board, it also
updates the README_IPv4 file to include instructions for using the
DNS resolver with the FRDM board.
Change-Id: Ic9b92c2fed2636b56044309dc3be7c829d828d35
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
enc28j60 can work up to 25Mhz, let's set a divider of 2 on the 32Mhz
host clock then. This require to mimic CS with a gpio in the SPI driver.
Change-Id: I98f84fa793a614cdbb566be39a262ff825101255
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This will help testing dhcpv4 through frdm k64f ethernet port.
Change-Id: I7cf47d77b79041fe7ab408355d1a9f9332fc1f54
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This helps to test enc28j60 along with dhcpv4
Change-Id: I884f0aba0a04c3cc0d015d327cb9c100759d45ea
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Removes left over CONFIG_NETWORKING_WITH_BT which has been deprecated.
Change-Id: Ida3a2c2dba6e44f112711170f883c0582c3ee7ed
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fixes echo_client and echo_server samples.
Fixes compile error:
...
src/built-in.o: In function `fdrm_k64f_cc2520_pinmux_setup':
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
samples/net/echo_client/src/../../common/cc2520_frdm_k64f.c:93:
undefined reference to `_fsl_k64_set_pin'
...
Change-Id: I590f88f6bd083a30deea77fa860f001a3a55b278
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit adds the DNS client section to the samples/net/README file.
Added text includes a quick description of the application and
references to documentation already available in the tree.
Change-Id: Ia7ef3aea19069df5be2d8f14344b1afa750b22bd
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit adds the ARG_UNUSED macro for the status variable in
the udp_received callback.
Change-Id: I8c592cab72ccf5ba314742ef705e96d4a4d067e9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit validates the size of the buffer used to store the
incomming datagram in the udp_rx routine.
Furthermore, two expressions related to the rx net_buf are now
executed before returning on error, avoiding a possible memory leak.
Change-Id: I30dc0a2d57dc207590387f1a9ab79945a1157ef5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The DTLS client will use and asynchronous signaling method to
receive, this makes the sample work on QEMU
Jira: ZEP-1233
Change-Id: I28f074c4736f84c10e6be8119a5ba50b138fcc0d
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Previously, the domain names used in this application were
not very useful to proof that the DNS client was able to handle
multiple IP addresses.
In this patch, the number of domain names is increased. Some of them
may return multiple IP addresses as shown in the README_IPv4 file.
However, results may vary depending on the network setup.
Change-Id: Ic713ce48b4afa592c1480311f4394de6e57bf3fb
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This patch introduces a k_sem that will block until:
- data is received, or
- the user-provided timeout expires
This change allows us to simplify our previous DNS client
implementation.
This change is related to ZEP-1357 because we are refactoring the
DNS client API removing the continuous update of the net_context_recv
routine that seems to be causing issues after the kernel's update.
Jira: ZEP-1357
Change-Id: If01c9274ac8f096f0095a2872f86be2e007212ee
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit introduces the dns_context structure.
This new structure will reduce stack overhead due to
the simplication of the dns_resolve routine signature.
Furthermore, the timeout parameter is now int32_t
instead of uint32_t.
The dns sample application is also updated.
Change-Id: I5d789656bacbd23c4654edce5d116a88dc42c354
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This enables Bluetooth L2 driver with CONFIG_NET_L2_BLUETOOTH and
removes CONFIG_NETWORKING_WITH_BT which has been deprecated.
Change-Id: I6a75c105e45a1b748abf6a70234d415c5121bcdc
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables Bluetooth L2 driver with CONFIG_NET_L2_BLUETOOTH and
removes CONFIG_NETWORKING_WITH_BT which has been deprecated.
Change-Id: I6f8b0e756f6e066b4b9cf9dec22f52fd72155c98
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Common code found in samples/net/common
App is built with:
make BOARD=frdm_k64f CONF_FILE=prj_frdm_k64f_cc2520.conf
Note: debug messages are enabled on many parts of the system, and these
are killing the timings. So it's not unusual at all to see rx errors on
cc2520 side. Without most of the debug, much less error will occur (if
any when dbg is fully disabled).
Change-Id: Ib6f0868c300652270661e72e80108804308164ab
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add support for resuming from deep sleep on the ARC.
Change-Id: Ic1e17e318a1121ac3c5ac2b6fb86ba00c78fd872
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
Directly use AON GPIO trigger instead of IPM.
In the past, SW did not allow arc to receive AON GPIO interrupt.
So, interrupt from BMI160 was routed to x86 cpu. Then, x86 cpu
passed the event to arc through IPM. But, SW was updated and arc
is able to directly receive interrupt from AON GPIO now. So, IPM
is not needed any more. Both IPM and GPIO triggering code is there.
We just need to change the configuration by modifying the prj
config file.
The x86 code will be removed since it will not be used any more.
Change-Id: Ibc4250a34218cc52bf4c726cf70617cfdea3b2e8
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Adds extern "C" { } blocks to header files so that they can be
safely used by C++ applications.
Change-Id: I767a04635b38d8ef7a02e8c7da3a5c99b0bc7709
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
There are static initializer macros available for most kernel objects
which we should use whenever possible.
Change-Id: I496f4d05d26801eddd21fae53bdd4fcdc3246fe3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Moved all libc Kconfigs to where the code is and remove the default
Kconfig for selecting the minimal libc. Minimal libc is now the default
if nothing else is configured in.
Removed the options for extended libc, this obviously was restricting
features in the minimal libc without a good reason, most of the
functions are available directly when using newlib, so there is no
reason why we need to restrict those in minimal libc.
Jira: ZEP-1440
Change-Id: If0a3adf4314e2ebdf0e139dee3eb4f47ce07aa89
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
nano_cpu_idle/nano_cpu_atomic_idle were not ported to the unified
kernel, and only the old APIs were available. There was no real impact
since, in the unified kernel, only the idle thread should really be
doing power management. However, with a single-threaded kernel, these
functions can be useful again.
The kernel internals now make use of these APIs instead of the legacy
ones.
Change-Id: Ie8a6396ba378d3ddda27b8dd32fa4711bf53eb36
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The format string passed to printk is trusted, and this is just sample
code anyway.
Change-Id: I267e1e3a9b6720c4216624bf0c2590ce42c6c681
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
In order to keep the initialization process light-weight, remove
net_buf_pool_init() and instead perform the initialization of the pool
and buffers in a "lazy" manner. This means storing more information
in the pool, and removing any 'const' members from net_buf. Since
there are no more const members in net_buf the buffer array can be
declared with __noinit, which further reduces initialization overhead.
Change-Id: Ia126af101c2727c130651b697dcba99d159a1c76
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This reverts commit 7a74fb0454.
This commit breaks the sample. The sample code has a bug which will be
addressed in a separate patch.
Change-Id: Ic44faeafced4415765fded04e2493e306fc35331
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Restructure the RANDOM Kconfig to match the structure used in other
drivers with a single top level menu. Move the true random number
generators to appear first in the menu, with pseudo generators at the
bottom. Do not present pseudo generators if a true random generator
is presented.
This change implies that tests, samples and applications that require
the random driver interface must now select CONFIG_RANDOM_GENERATOR.
In order for tests and samples to build (and run) on platforms that
have no random driver it remains necessary to select
the CONFIG_TEST_RANDOM_GENERATOR.
Note that CONFIG_TEST_RANDOM_GENERATOR retains its original purpose of
enabling a random driver that delivers non random numbers for the
purpose of testing only.
Change-Id: I2e28e44b4adf800e64a885aefe36a52da8aa455a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Remove CONFIG_TEST_RANDOM_GENERATOR from each test and sample where it
is not required.
Change-Id: I949f8e93c2cb1881622a5e48efeb87c43122a170
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Remove SENSOR_VALUE_TYPE_INT as it is the same as
SENSOR_VALUE_TYPE_INT_PLUS_MICRO with val2 set to 0.
Change-Id: If5a9c579b7267701c27f40fd887acae47d64edc5
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Remove SENSOR_VALUE_TYPE_Q16_16 as it is not used by any driver. Future
drivers can use any of the remaining value types.
Change-Id: I984143cc65d6a6fd0477f310ac17c62498cc05b8
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Until now it has been necessary to separately define a k_fifo and
an array of buffers when creating net_buf pools. This has been a bit
of an inconvenience as well as blurred the line of what exactly
constitutes the "pool".
This patch removes the NET_BUF_POOL() macro and replaces it with a
NET_BUF_POOL_DEFINE() macro that internally expands into the buffer
array and new net_buf_pool struct with a given name:
NET_BUF_POOL_DEFINE(pool_name, ...);
Having a dedicated context struct for the pool has the added benefit
that we can start moving there net_buf members that have the same
value for all buffers from the same pool. The first such member that
gets moved is the destroy callback, thus shrinking net_buf by four
bytes. Another potential candidate is the user_data_size, however
right not that's left out since it would just leave 2 bytes of padding
in net_buf (i.e. not influence its size). Another common value is
buf->size, however that one is also used by net_buf_simple and can
therefore not be moved.
This patch also splits getting buffers from a FIFO and allocating a
new buffer from a pool into two separate APIs: net_buf_get and
net_buf_alloc, thus simplifying the APIs and their usage. There is no
separate 'reserve_head' parameter anymore when allocating, rather the
user is expected to call net_buf_reserve() afterwards if something
else than 0 headroom is desired.
Change-Id: Id91b1e5c2be2deb1274dde47f5edebfe29af383a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Disable MDEF option and set it only in legacy projects.
Change-Id: I2e1f011eb1f876af929140e36f71f0efb5e955c1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Correct some syntax error and update some comments. There is
no functionality change.
Change-Id: I86c922c8aabcc4464b86f33ad7edf6056b1d765c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The gpio device driver name for the sensor sub-system was
renamed to GPIO_SS_x from GPIO_x recently. Let's use the
new gpio driver name for the sensor sub-system in the app.
Change-Id: Ie06b072d31e23e74c3ac41a4590845b24a020ed1
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The random driver, if enabled, is initialized by the kernel
initialization function. There is no need for applications or tests
to re-initialize the driver.
Change-Id: Ib4712dda937a7a83a8079c8aa662cec03c5416f8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The sample was reading the sample values regardless of return
value of the fetch sample function, now it exits the function and
prints an error message
Coverity-CID: 157576
Change-Id: If9a909ed9b617357a032c5632ac04984846d6744
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Remove two configuration parameters related to gpio used as spi
chip slect from prj config file. since they are already in
arduino 101 board config.
Change-Id: Iebaab605d8a6394e27c70ebbf4bac37a24665522
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
This sample fails if the main stack size is 1024, so this patch
increases the value to 1280.
Change-Id: If5e21c09234e2ca8178e8dde684361844fababca
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Fix compilation issues that show up if SYS_LOG is mapped to printk
instead of printf. Unlike printf, printk is annotated so that the
compiler catches incorrect format specifiers passed to it.
Change-Id: Iab7cc6da110e9c98720211a6f773dcf055a3a411
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This patch adds Beetle to the Watchdog test case.
Jira: ZEP-1300
Change-Id: I371ca2f89aaec8e07f45cfa04fc2618d009cf487
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Fixing a tiny build error found through sanitycheck.
Change-Id: Iee9a3ac135380ddf70e2902b532f6f28d417715c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Adds a fxos8700 sample application that uses the sensor data ready
trigger to periodically print accelerometer and magnetometer data.
Change-Id: I43fef6cd6090b58d8d0168a25558a3a05781ea5d
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This allows to fine tune TX stacks size depending on selected HCI
driver. If needed it can be used to tune for monitor too or other
logging mechanism used.
Change-Id: Ib501921da0b786e151083760d85ec58fe3c08b60
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Use BT_STACK_NOINIT for tx stack declaration. This makes sure stack
it properly alligned and account for k_thread overhead.
Change-Id: I704958fcc3ce02aba913f6eaee13ae50d2a81591
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
bt_enable_raw() needs to be called before spawning the tx thread,
otherwise there might be an HCI command processed from the UART
before the HCI driver has been opened and therefore initialized.
Change-Id: I050158bd48bebaf8fa2cf6b11efb54b531f70079
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
From stack_analyze function, used isr stack is 368 bytes
with the controller build, main stack is 288 bytes and idle
stack is 56 bytes. Hence, configuring sizes of 512, 512,
and 256 bytes for isr, main and idle stacks respectively.
Increased max connections from 16 to 20 utilizing the RAM
free from the reduced stack sizes.
Change-id: I67d073fd1893cafc53d36e89035a6fd931488a46
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Implement the 2 HCI commands that provide ECC public key
and shared secret generation:
- LE Read Local P-256 Public Key
- LE Generate DHKey
Jira: ZEP-1246
Change-Id: I79388bfdb9f2e28b9377b4bb6ee2caca25f33f3e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
CC2520 is not embedded on an arduino_101, it is however possible to wire
one, and thus it requires to provide cc2520_configure_gpios() function.
This one, being common to a101 is found in samples/net/common.
Change-Id: I86f2734847edb3f6a968522afccc3099ed854d13
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Commit https://gerrit.zephyrproject.org/r/#/c/6971/ changed the
location of some include files, making compilation fail.
Change-Id: I43c124be28b55e550ef2204ca9faa7031665fb4a
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
This commit updates the dns client application to use the
new kernel API.
Change-Id: Ibf920532b02a1561bfb38f69e5dd994ab21574bc
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
* Moved networking code into subsys/net.
* Renamed net/yaip to net/ip at the same time.
* Fixed the tests/net to compile
* Fixed the Makefiles and Kconfig files in subsys/net
to use the new location of the IP stack
Change-Id: Ie45d9e8cb45a93fefdf969b20a81e3b1d3c16355
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Port the zperf network performance tool to native IP stack.
TCP support is missing from this version.
Change-Id: I2648e7d81014bb0cae8cf50854b0ae5f89a6567c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we cannot send a network packet, do not quit as that is
really not necessary here.
Change-Id: I7613d46bdbc849b75aaf0fc71c58beba810fd658
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As the default board is qemu_x86, make sure there is similarly
named config file that can be used by default.
Change-Id: Ibc480d3b4eecc2601e3670c8da19be9c01833c36
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use by default a board specific config files for both
echo-server and echo-client sample applications.
This makes more sense than using the network technology specific
config file that was used earlier.
Change-Id: I155fc138f4b0ed1166f4e25267513afc3fb6fd76
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Remove legacy stack artifacts from the echo-server and echo-client
config files.
Change-Id: Icc591b9540495c4ee181517369b0df9bb91972bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This enables application debugging using qemu target:
export QEMU_EXTRA_FLAGS="-s -S"
make qemu
Was tested with echo_server
Change-Id: I1906dea2fbc5afe03b11729d2edb8f3629a629f8
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
As the native IP stack is now the default, there is no need
for corresponding Kconfig option.
Change-Id: I08e4992f540f928a2b7378e8803e634e38725348
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit removes the old MQTT and NATS publisher and subscriber
applications that were based on the uIP stack.
Change-Id: I7ba8e155e32ba0aa53c8dec1b6c0cc5170d70943
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit removes the legacy Contiki based uIP stack.
The new native IP stack must be used after this commit.
The commit also removes following things:
- legacy cc2520 driver
- legacy ethernet drivers
- legacy IP stack samples
and changes these things:
- disabled tests that only work for legacy IP stack
- select new IP stack by default
- enable random number generator by default as it is needed
by the new IP stack
Change-Id: I1229f9960a4c6654e9ccc6dac14a7efb9394e45d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
My IPv4 address was missing because of complex set of #ifdef's.
Change-Id: I6768587d3e104a57c10756bc43267f26068aa3cb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Nbuf data size needs to be set to 128 bytes, specifically for
wpan sample.
Debug output kills timing, and thus can generate spurious failures on
reception, so limiting it to errors by default.
Change-Id: Ia918361d07369dacbe577e26855d7ef6ed865f7b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The used IPv6 or IPv4 address can be set in the config file.
This way one does not need to edit the source file to setup
the desired IP address.
Change-Id: Ic900bd4694481b4b035026ad0ba7b9280eb84e4a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Let the echo-server listen any configured IPv4 address
by default.
Change-Id: Ib83c5e069ae1e26615c37fa980bc4009b5a5e40c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If user has enabled DHCPv4 support, then do not try
to set static IPv4 address.
Change-Id: Ia359f578044d72b951f53c509c92c09d575207f0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we want to receive packets to multiple addresses, the solution is to
listen on the ANY address, and add the address to the interface in
question (already done).
Change-Id: I383cc1401f1236ee05bdb010252a9f9909aa15bd
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Before using the LED we must set the direction of the GPIO pin to
output, and the LED will turn on when that GPIO pin is 'low'. So, for
our purposes, the LED is active low.
Change-Id: If8e6ce05ff2f3ddb7b17a87b172a91f7276194a4
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
'board.h' includes the definition of LED0_GPIO_PORT and LED0_GPIO_PIN,
without this include the fallback was used, as if the board in question
didn't have any LEDs.
Change-Id: I78ebdb2e2ffc41dff5011dcf9e33e09d70950e81
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This adds a configuration profile allowing this example to run on a
Quark SE C1000 devboard.
Change-Id: Ic04fd30a91ed0a1fc8c3a3b3a6e397f0722f50b1
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Nbuf data size needs to be set to 128 bytes, specifically for wpan
sample.
Debug output kills timing, and thus can generate spurious failures on
reception, so limiting it to errors by default.
Change-Id: Ia0b8c904e0bc66a7922af4f317db623db6c51462
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This adds the required code to echo server so that it works with TCP as
well.
Change-Id: Ib45dd91a52a60ddb4d8f0ae11175ceb52199c398
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Including shell allows to execute some kernel commands and make sure
system is not crashed.
Change-Id: I6157229614655dc7e523f1cf0f84ee7c58d7a717
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Due to huge delays with DEBUG log level change it to INFO.
Change-Id: I81caf78fc6e9e064c2ed8e18caa99351028af62a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In a case transmit is failed send ack to the driver with zero sequence
number which is not used for valid seqs.
Change-Id: I1047de9ab5de636c5a8983f31376046757c4dc0c
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Following replacing semaphore with timeout semaphore transmit may not
be finished returning error after which communication stalls. Allowing
3 retransmits solves the issue.
Change-Id: Ibad05c2eac43dd6bb0ed72aaf16a7a2ef4185067
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Having 1024 bytes was really unsufficient and creating a lot of weird
bugs everywhere.
Change-Id: Ib642744fa6dfc9f3a699a0dc2f0c1783dc6f87b2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Semantic has changed in k_sem_take in comparison with legacy
nano_sem_take.
Change-Id: I06129b6f15f66266919bf371c2358e5634109156
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is meant to test echo applications with 802.15.4 L2 directly in
qemu.
Change-Id: I0edccd8c39360421dc77e0064147221d86877bdf
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Previous commits support auto configured IPv6 addresses so no
need to manually tweak the address settings.
Change-Id: Ie641212981a04229721c84990a54876977d9cfc4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit fixes the case when we receive large amount of
data and then copy it into new fragments. If the MTU is larger
than the fragment size, then it is possible that we might
overwrite net_buf memory and crash. This is typical in ethernet
network.
Change-Id: Ib1c65819c3bc718ec04f558e3df235246b5655dd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The DTLS client will not longer use the legacy IP stack.
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I7402a188fc7501873d98d3b6cb2f03ee51f3506b
This commit allows echo-server to listen all defined addresses
specified to its network interfaces.
Change-Id: I52874210f6987c75d7921e514399a9eda55911bb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
SLIP buffer size depends on maximum IEEE 802.15.4 frame size and start
byte.
Change-Id: I1cb0a848dce6b0c85bf11408733d777f7a3b03c9
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Remove unneeded SET_HW_ADDR_FILT since it is handled by other
commands and add missing opcodes.
Change-Id: I4b6488e6cee742b79c16789e817795138506dc77
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It's 127 by default as soon as 802.15.4 l2 is selected.
Change-Id: I6c29d88bb3277a15fe54693027caf320bc3d9fc4
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This demo showcases how to expose resources that are exposed using the
link-format feature.
Change-Id: Iad9421082fae3212cae58e6d6e9b88fa170678b8
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Forcefully set the IPv6 address in echo-client so that we
can use that address when sending data. Normally this should
not be done like this as the system should autoconfigure itself.
Change-Id: Id24f9aa84b30a3da941bb6b9e4522c7218687e12
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Makefile modifications to be able to be compiled with the unified kernel
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Change-Id: I0fce5d3f6b28df0cff4b7c0b554a787996e8c966
Print packet hexdump and interrupt related debug only when
VERBOSE_DEBUG is enabled.
Change-Id: Ieb997e3537a9a2316d1435372948004dd93babab
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Update information related to simple web server info.
Change-Id: Ib0155c116a3d53b374a7401eb6e9d1599390dba3
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Print packet hexdump only when VERBOSE_DEBUG is enabled and remove
debug print in empty functions.
Change-Id: Ifd3ae59001233f0237c4b7575bd92607c93e2ea0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Forcefully set the IPv6 address in echo-server so that we
can use that address when sending data. Normally this should
not be done like this as the system should autoconfigure itself.
Change-Id: I99041539c50f994f5d3ddaabaf5cac8599d82078
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This is a sample app using ECJPAKE crypto algorithm on DTLS, using mbedTLS,
native IP stack and the enc28j60 SPI Ethernet Driver
Change-Id: I658c3d9a54cfdd164a4147903125400f223c6e0a
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
It is the responsibility of the callback to release the buffer.
Change-Id: Id80f5f9ca190868a7c173994bb7ec7ee7f6251b7
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
When retrieving the address of a peer from the net_buf, care should be
taken so it happens before the 'data' pointer of the buffer is modified,
which causes the macros to retrieve the address from invalid positions.
Change-Id: I466fb989119ab5f7d0ac3899979670675bdaa946
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This change is related to patch called
"net: Adapt to new behavior of net_buf_frag_add"
This version removes extra net_nbuf_unref() from
the code. The unref was done because net_buf_frag_del()
did not remove the double ref from the list element.
Because of the other patch, the list does not have
double ref any more, so we need to remove the extra
unref in couple of extra places.
Change-Id: If90e01c24b9b4e68afbfa283850d2a1ecb3065ed
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Change definition name suffix to WPANUSB
Change-Id: I3456ebff061866a67b7a07b33f6ff83a31a2d7a8
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit updates the README files to reflect that ZEP-1036
is already solved.
Information about ZEP-1097 and ZEP-1098 is now included.
Change-Id: I3c83160962d308d374823e086bbf083dca988606
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit modifies the conf and Makefile files of the DNS client
application.
Inside the Makefile, the CONF_FILE variable is updated to include
the BOARD name, therefore prj_'board_name'.conf is used from now on
to refer to the conf file. The right conf file is selected by passing
BOARD='board_name' to make.
Configuration variables at the conf files are also homogenized.
Change-Id: I6f5aaad0b52d458bceb90b315aba2b31f085c0a0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Implement serial-radio protocol used in Contiki-based border routers
to interact with 802.15.4 devices connected over serial or USB-serial.
Change-Id: I938b34ca32ae7a08e5d48e3bea585cda6c98c113
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This creates initial TCP handling logic but does not yet
enable fully working TCP connection.
Some of the connection logic is taken from FNET TCP
implementation.
Origin: FNET 3.6.1
URL: https://github.com/butok/FNET/blob/master/fnet_stack/stack/fnet_tcp.c
Change-Id: I1e100d9fa9c91437562b933d94d0bd3db1a5885e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Current net_nbuf_write() api just appends data to last fragment. And
doesn't write data based on offset. That's why renaming this api.
New net_nbuf_write() apis based on offset will be coming soon.
Change-Id: Ie8e13e5f6091a279b62b6d8b0b3928a5187e75b0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit adds support for the Arduino 101 board with the
ENC28J60 Ethernet module.
Change-Id: Ib852e9cfb2b3b2188d3320e00d6bc24620e187f5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This is a sample app using ECJPAKE crypto algorithm on DTLS, using
mbedTLS, and native IP stack
Jira: ZEP-900
Jira: ZEP-943
Change-Id: Ica17b047aab11b989d3e8c8f6ac1b79e3041053a
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
This ports zoap to the native stack.
Just for reference, and totally not scientific, here are the numbers
using the old stack:
$ size outdir/qemu_x86/zephyr.elf
text data bss dec hex filename
34657 10316 16916 61889 f1c1 outdir/qemu_x86/zephyr.elf
With yaip:
$ size outdir/qemu_x86/zephyr.elf
text data bss dec hex filename
30575 9148 6164 45887 b33f outdir/qemu_x86/zephyr.elf
Jira: ZEP-818
Change-Id: I7992a3e2af7d419081ee5a64d7cc2d49fb628ead
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Extends the echo server and echo client samples to work with YAIP
network stack with ethernet L2 layer and ENC28J60 ethernet device
on Arduino 101 boards.
Jira: ZEP-859
Change-Id: I242e5555aff18741bf00a551424b081b5396f4b3
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
This commit adds the DNS Client sample app on top of the new native
IP stack. This sample app supports IPv4 and IPv6. See README_IPv4 and
README_IPv6 files.
Origin: Original
Jira: ZEP-793
Jira: ZEP-855
Jira: ZEP-975
Change-Id: Id78bd634c44e216fd45b395c91d95b71ef68c976
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit removes the legacy DNS client sample code.
This patch is part of a commit series that will add support for
DNS client services on top of the new native IP stack.
Jira: ZEP-793
Jira: ZEP-855
Jira: ZEP-975
Change-Id: Ieb3366b21a365b8f77e576109c64c0fc4218aabb
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
In some cases the BT header files are missing and the compilation
will fail when done by sanitycheck script.
Change-Id: I484e1f0c23975053e947bc57ff3c9f4042fad71e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Export ieee802154 radio over USB to be used in other Operation Systems
like Linux. In this scenario Linux SoftMAC driver would be used
implementing ieee802154 stack inside Linux.
Currently tested to work with Raspberry Pi and addon ieee802154 board.
Change-Id: Iabcbbfcaad8e3935a63faca50a19fb624e78a351
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This will use the dedicated UART pipe driver to send/receive IEEE
802.15.4 "radio" frames.
- make
On one console:
- make qemu1
On a second console:
- make qemu2
Note:
net-tools is needed, cloned into net/tools
https://gerrit.zephyrproject.org/r/#/admin/projects/net-tools
Change-Id: I833cd40238b0653bb5b9a9b462fb4d5d2a3504b9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- net tools directory is now in net/tools
- fixing the 80 chars line limit
Change-Id: I079880fa3449beffb326369ab23550dcba3ccf20
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
More samples will come. Current one is meant to test ieee802154 with
cc2520 on quark_se_devboard target. Some future sample will show how to
use the Qemu uart pipe fake 802.15.4 radio driver for testing on one
host.
Change-Id: Idea2b16cde091c7da926ca8aa71912fbfd0a3d62
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If no IP stack is seleceted, selecting one of the 2 cc2520 driver will
automatically select the relevant stack.
Change-Id: Icca22da190dc790ce6d302e14c45732f902e02ae
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- new stack options are renamed and placed in their respective menus
- new stack Kconfig gets normalized (tabs vs spaces, etc...)
Change-Id: Ia68f6589fed464bbdd76dc0812775684b2f94a58
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Add socklen_t addrlen parameter to net_context_bind(),
net_context_sendto() and accept callback.
Currently the address length option is not really mandatory
as we can figure out the length from the address family.
But if we are going to support other protocol address families
it might be needed.
Change-Id: I59206465c3259050c469c5b2150221646a9a08d7
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When running echo-server in the Zephyr device (either a real
device or qemu), set the IPv4 address to be 192.0.2.2. The host
IPv4 address should be set to 192.0.2.1 in this case. This change
is similar to IPv6 address change made earlier (now both IPv4 and
IPv6 addresses on device side end with "2", on host side, with "1").
Change-Id: I639b7be4403b4b2f38f01675d0ef56eaabf0f82c
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
When running echo-server in the Zephyr device (either a real
device or qemu), set the IPv6 address to be 2001:db8::2.
The host IPv6 address should be set to 2001:db8::1 in this case.
Change-Id: Ia967cecabece4b06a2f5a12b11c68a9de4aeb2af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The prj_slip.conf file should be used for qemu-to-host
communication only. It is not usable for testing between
two qemus.
Change-Id: Id06813a1b36f33f585e06df3f29479891ea3d2d8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fix the correct location of net-tools project files to
samples/net/README file so that the user can test the
echo-server and echo-client apps using SLIP and Qemu.
Change-Id: Ic34fa6e67da916c63e4f138e1e0def5d7632c80c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Debugging messages in 6lo are enabled as well.
Change-Id: I8fea044216e3c4e60d742ebc7256489832ae09ac
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Meant to setup a real 802.15.4 device, changing channel, pan id, etc...
Change-Id: I221ad197aa221bc8f9ec67d0fd523da2023f7979
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Echo-server no longer reverses the data as doing it
when we have a fragment chain is quite challenging.
Change-Id: I298669f3ddba67000672320e7b3b14f72e9f12d4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
net_context.h is missing and one variable had a wrong name.
Change-Id: I4aac2f5c12cea39553fb86d1bd497c88f0ef1963
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
net_core.h is the ground brick of the IP stack, and thus should not
include other headers that might include net_core.h also: this would
create circular dependencies.
Change-Id: I70c17b736788528e4e0b4b5b2c478098b049c9b1
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This allows to test things between qemu and host when
using slip.
Change-Id: I27e17de9f0d8c2c8406f0afdd66c295e827f87a0
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Use 192.0.2.0/24 address space that is specified in RFC 5737.
Change-Id: Iff2545f5b0f4817c99813c986d57801e166967a3
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Check if we have received IPv4 packet and call a handler
function to process it.
Change-Id: I9f9e5f0888d2c3b91401c98f4925647ddce09962
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This echo-server does not yet do anything useful.
Change-Id: I317051b3a2bfb0a80584ad385c2f308978a243cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This implements a modified version of CDC ACM class driver
in a WebUSB compatible way. It adds the WebUSB descriptors,
custom and vendor requests handlers so that the host OS and
browsers can get the required BOS descriptor and supported
origins from the device. It also adds a custom interface
class so that the interface will not be claimed by the host
CDC ACM driver.
A simple echo app also included in this commit to demonstrate
how to create and use a WebUSB interface, as well as the
communication between browser and WebUSB enabled device.
WebUSB Spec: https://wicg.github.io/webusb/
Origin: Based on CDC ACM device class driver in Zephyr
Jira: ZEP-744
Change-Id: I2eac10bd718e8fce35cda52e7c2ac425c3210e23
Signed-off-by: Sudarsana Nagineni <sudarsana.nagineni@intel.com>
Tag all legacy kernel tests and samples as such.
Change-Id: I43b24acb71c282ed14ff6e6ef06c9542bad86f6a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Exiting from the test case when the i2c device is not found, this
to avoid a null pointer dereference
This issue was reported by Coverity
Coverity-CID: 151982
Change-Id: Ib11224ef2a78170f6e4d20545f645b4f2ea4a181
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference.
This issue was reported by Coverity
Coverity-CID: 151980
Change-Id: I7aafbc993674c8874a16b5a9213108f5769114ec
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Removes a redundant check flagged by coverity.
Coverity-CID: 152005
Change-Id: I8cc3a64c42e04a2d52deed11d9022ed4a49baaa7
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
By adding external hook to sys_log we will allow applications
the flexibility of using various output mechanism such SPI,
flash, FS etc.
Jira: ZEP-1172
Change-Id: Ie32a5e52c3946ada0349b75a35cc107bb29385a1
Signed-off-by: Yossi Havusha <yossi.havusha@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove nano kernel references found at the README files.
Change-Id: Id42f4797561f3d7674110bb84531b5f6e487decd
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit replaces the x86 asm line:
__asm__ __volatile__ ("bswap %0" : "=r" (x) : "0" (x));
by the sys_cpu_to_be32 macro.
By removing the x86 asm instruction, the nfc_hello sample app
can run on other platforms.
Jira: ZEP-1348
Change-Id: I440e96cd06e70a88552d179a2288c9918e6ca0b0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
To have one project use more than 32 priorities. The preempt priorities
are also aligned so that they straddle two priority bitmaps.
Change-Id: I0f0862110d876e40fde45a0d105b769e8603d644
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
If an i2c transaction fails the sample will hang the program into
an infinite circle.
This commit will remove the infinite circle and report back the
error code from the i2c transaction.
Change-Id: I38d350a805af6bec43f2fa8d4af6ce4e3cc27662
Coverity-CID: 151991
Coverity-CID: 151992
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
If the gpio or spi devices are not found there is no
need to keep the device busy in a loop for this particular
sample.
Since it is not possible to continue execution it is better
to simply end the application.
Change-Id: Ie25ea970a479db2a2f339ca2b37f88541a45ef97
Coverity-CID: 151973
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
Fix usage of an uninitialized variable detected by Coverity.
In theory GCC should pick up this situation, but it does not. I've
experimented with adding -Wextra and -Wuninitialized but I cannot get
GCC to complain. I might be missing something else, but in the
meantime, this is a simple fix to remove this issue.
Change-Id: I6fec37719719dfaf7077ce1f464605c93efa8ea2
Coverity-ID: 152054
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Using the K_* macros makes it easier to read what exactly the various
timeouts are.
Change-Id: Ia405d3760b8e600af7e33a7221ef6ec717708973
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Proceed to LCD programming only if device binding succeeds.
Otherwise, dereferencing a NULL pointer will happen. This
was caught by Coverity.
Coverity-CID: 151986
Change-Id: Ibdb658f530203428aa3e53f358e0788fc1502b06
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Stop the app from running if device binding fails. Otherwise,
dereferencing NULL pointer will happen. This was caught by
Coverity.
Coverity-CID: 151988
Change-Id: I8245d938498a51123249fbd069935900ad660314
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The memcmp is a comparison between two strings or buffers.
So, the length should be the buffer length, not the length
of the pointer to the buffer. This was caught by LLVM.
Jira: ZEP-1179
Change-Id: I7fd6b199686b19e7f4a2e1288897483e69ad091e
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
This commit fixes a missing function return check reported by
Coverity.
Coverity-CID: 151949
Change-Id: Iedf090b7f2ded9f20ff6d796f1cd5c02990b0a4e
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference
This issue was reported by Coverity
Coverity-CID: 151980
Change-Id: I44f13131d44c7c093781e1f11f8481e7ef8175c9
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Exiting from the test case when the gpio device is not found, this
to avoid a null pointer dereference
This issue was reported by Coverity
Coverity-CID: 151982
Change-Id: Ifaed47b2b48359dacfdb3111ca2895d5912779e6
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
The data structure member being used is character array,
dereferencig this array gives **char instead of the expected
*char type.
This issue was reported by Coverity
Coverity-CID: 152030
Coverity-CID: 152033
Change-Id: Ied67e4b2d47017e6ad5e40b9b6fca1b496c483ed
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
The sensor_channel_get return code is now evaluated.
Change-Id: Ib931d6caba65af7195bad53c62e6e5a3033b49e8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Remove redundant platform filtering and only use SOC filtering
Change-Id: Ib823e076a874ce61a235eca63eebb7f19d2fdd30
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
The variable type mismatching was caught by LLVM.
Jira: ZEP-1179
Change-Id: I084406601badc64c257cbdd82b9c8b7509549303
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The variable type mismatching was caught by LLVM.
Jira: ZEP-1179
Change-Id: I402c348af142342e37e93619c4da6e3a5bfd82da
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
This sample was created intially when there were no other
samples in place to enable the CONFIG flags to build code
inside those flags. However, those CONFIG flags are now
guarded with corresponding "SUPPORTED" flags which are
enabled based in Kconfigs of socs based on their support
for that power feature. This app is for x86 and those
features will not get enabled for this configuration. If
it is still required, then we would need to fake such
support in Kconfig.board of qemu_x86. Removing it, because
those flags will get enabled by sample and test apps of
socs that support the power features, causing code inside
them to get built.
Change-Id: I647be9289a49d69880811abee499a4efd61bbc6a
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Cleaned up and removed some unnecessary code to avoid
distraction from main sample implementation. Updated some
logic based on new PM interface in soc area. Updated README
to indicate it supports x86 and ARC and updated sample
output of both architectures.
Change-Id: I1c9c8348dae403b7ca6fe17ab867e3fbef06ae60
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Switch left-over usage of TICKS_NONE and TICKS_UNLIMITED to the new
unified kernel counterparts K_NO_WAIT and K_FOREVER.
Change-Id: I2f2a16360e816f9f8791eb216deb3c70b8cc87df
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In addition to providing documentaton, we also modify the static_lib
example to use outputexports instead of the double-include
Makefile.toolchain trick. For this to work well we need to fix a tiny
bug in the dependency handling in Makefile.inc.
Change-Id: I6571bc681bc34155f37cff1eccc2ea12ed52ef07
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Sample to show the USB UART console output.
Jira : ZEP-775
Change-Id: I70220daf8e63a0847b10cc094665ef6a4bc38907
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
convert all sensor drivers to use threads and the unified kernel API and
remove all legacy APIs.
Change-Id: Ica43ea74ecbbf85273f718f182c413a9dcd8abc6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The API to disable _sys_soc_resume notification is currently
called _sys_soc_disable_wake_event_notification. This is
misleading because it is possible that the ISR from which
_sys_soc_resume is called could be from a different interrupt
with higher priority that happened before interrupts were
enabled. More accurately, it is a notification of exit from
kernel idling after pm operations.
Jira: ZEP-1271
Change-Id: I83747f2cacac1bc17f135d12f4aa4478970fc02d
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Switch from fiber_start() to k_thread_spawn(). Also switch to
k_yield() from fiber_yield() in the same go.
Change-Id: I2dc480310f981112063651b61b0ceedf38601bee
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Use defines from k_fifo intead of legacy API.
Change-Id: Ib8cf0d88240ef145da550b8cf83d2580e7140521
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Only net_receive() is using non-special value for net_buf_get_timeout
so this change is included here. Other users are using special values
which are already correctly handling ticks vs ms change.
Change-Id: Ib12d34ac5a546b36fa7b35615f082c82a256bd07
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Use new sleep API or remove sleeps where not needed.
Change-Id: I88c0973e57eb4970b68b3f4fa428683191b1a7f0
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This fixes warnings related to the use of nano_delayed_work.
Change-Id: Ie20fb47fc6d5c486ff885ad583354eb715d12c1b
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Currently the ideal buffer counts for a controller-only build are 6 RX
buffers and 7 TX buffers: ATT_MTU of 158 bytes can be sent in one
connection interval of 6 tx/rx -es wherein connection interval is
7.5ms
Change-Id: I64b4620c5e8e7db8d7ed72fa1db82e266e121f27
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove redundant semicolon from the end of a while loop.
Change-Id: I02cef7879efe0d6eeae59595e14fb1d9b00a6d52
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If support for the controller assert handler isn't enabled the
function shouldn't exist.
Change-Id: I72076eb1001980f102a0404c91d22e41582ced25
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Don't use a controller define if controller support is not enabled.
Change-Id: I837b3b66f010dfbdf2d9099acd85fa29fce954b7
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Restructure the Bluetooth options more logically.
- Both host and controller are now behind the same high level
CONFIG_BLUETOOTH.
- Selecting controller support disables other HCI driver selection, so
the controller isn't in the same list as HCI drivers any more.
- Under the top-level there's a "Custom stack" option, which when
enabled opens up the option of choosing CONFIG_NBLE.
There are various other cleanups and simplifications in this patch as
well, since splitting these up would have been fairly tricky while
making sure all test cases still build.
Change-Id: I5bb715cb9d20201cb8b72fbd149c8a09a4b2d7d2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When building Zephyr in the controller-only configuration,
assertions that happen in the Link Layer code are not visible
to the Host which is running on another HCI and connected via
UART or USB to it. This patch allows the Controller code
to output the assertion line number when in such a configuration,
allowing the Host to view the event to help debugging.
The event format used is temporary and will be replaced by a
standardized Vendor Specific specification to come at a later
time.
Change-Id: I013ca6783a3fdedc47b171132919dd4798c66285
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The BBC micro:bit doesn't have UART HW flow control, so it needs to be
disabled to build for the board. The baudrate is also lowered to
115200 since 1Mbps is likely to be unreliable without flow control.
Change-Id: I1725a2a1e46cfbc0f57b4f5c4ee57ff52d9670e9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add Low Power States support to the power shim layer
and show the usage in the quark_se sample.
States are defined as follow:
- SYS_POWER_STATE_CPU_LPS: SS2 with LPSS enabled
- SYS_POWER_STATE_CPU_LPS_1: SS2 with LPSS disabled
- SYS_POWER_STATE_CPU_LPS_2: SS1 with LPSS disabled
Jira: ZEP-994
Change-Id: Ie4b93f6e539cb53fc035be00280b66b2cb0d9fea
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
This reverts commit d4d9ac2d21.
This is broken:
core:static_lib(master): sanitycheck -T .
Generating LALR tables
Cleaning output directory /home/nashif/Work/zephyr/sanity-out
Selecting default platforms per test case
Building testcase defconfigs...
1 tests selected, 28 tests discarded due to filters
total complete: 1/ 1 failed: 0
1 of 1 tests passed with 0 warnings in 0 seconds
Traceback (most recent call last):
File "//home/nashif/Work/zephyr/scripts/sanitycheck", line 1887, in <module>
main()
File "//home/nashif/Work/zephyr/scripts/sanitycheck", line 1879, in main
ts.testcase_report(LAST_SANITY)
File "//home/nashif/Work/zephyr/scripts/sanitycheck", line 1551, in testcase_report
rowdict["ram_size"] = goal.metrics["ram_size"]
KeyError: 'ram_size'
core:static_lib(master): find -name *elf
core:static_lib(master): make pristine
make -C mylib clean
make[1]: Entering directory '/home/nashif/Work/zephyr/samples/static_lib/mylib'
Makefile:19: *** $(O) is not set. Try `make all-mylib` from hello_world. Stop.
make[1]: Leaving directory '/home/nashif/Work/zephyr/samples/static_lib/mylib'
Makefile:37: recipe for target 'pristine' failed
make: *** [pristine] Error 2
Change-Id: I61700b0df34790aef94a6700c7c7e0605343787f
Signed-off-by: axy <anas.nashif@intel.com>
In addition to providing documentaton, we also modify the static_lib
example to use outputexports instead of the double-include
Makefile.toolchain trick.
Change-Id: Iafe045ccc5dbbbd4063f836cc63057b4b06f7727
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Add a sample app to demonstrate the usage of Fujitsu SPI
FRAM.
It uses SPI 1 on quark spi controller and gpio 20 as CS.
Change-Id: I30c83bdd8312ca0cab7a62e397c0cb4ade0821cb
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The convention for Zephyr sample names is to use _ instead of - for
delimiting words.
Change-Id: I08a63e9f600deb38183f81ddb8f8bf407b6eec2e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Sample to put the device in USB mass storage mode via
config options.
Change-Id: Icaf4839d8e8ac0526d1b723adc87607d6b4df9d7
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Making a reference to the common work queue code should not necessarily
drag in the system workqueue, since it is possible to use a workqueue
that is not the system workqueue. This is done by moving the system
workqueue into its own code module.
Moving the system workqueue to its own code module allows removing the
NANO_WORKQUEUE and SYSTEM_WORKQUEUE kconfig options, and compiling the
common workqueue code and system workqueue all the time. They are only
linked in the final image if a reference to them exist, same as the
other kernel modules.
Change-Id: I6f48d2542bda24f4702e7c2e317818dd082b3c11
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The README files provided with the samples contain references to NBLE,
which is not a publicly supported solution for Bluetooth. Simply
remove these files. If the need arises to provide application-specific
information in the future we can add back per-application README
files.
Jira: ZEP-1183
Change-Id: I81b3ea5491d50fb16062ccd5a421ddc8fcb7ea42
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.
Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add kernel functions to kernel module and make it part
of the shell sample.
Change-Id: If5e8ff8ce7b8edbbb8d62509964700b007eaf88b
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Port the sampe apps to use unified kernel and its apis.
Change-Id: Iee0a21df8008f27cfdbc9db50b66bd183d531f9c
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
QMSI 1.3 natively supports restoring the SoC and peripherals
after sleep.
The Zephyr Power Management shim layer is updated
in order to support QMSI functions.
The following functions have been added:
void _sys_soc_set_power_state(enum power_state);
void _sys_soc_power_state_post_ops(void);
In order to fully support deep sleep, the function
_sys_soc_set_power_state now support saving and
restoring CPU context and returns to the application.
_sys_soc_set_power_state function also abstracts
QMSI cpu states and enable the application to choose
between C1/C2 or C2LP states.
The QMSI power states are mapped as follows:
SYS_SOC_POWER_STATE_CPU_LPS -> power_cpu_c2lp
SYS_SOC_POWER_STATE_CPU_LPS_1 -> power_cpu_c2
SYS_SOC_POWER_STATE_CPU_LPS_2 -> power_cpu_c1
SYS_SOC_POWER_STATE_DEEP_SLEEP -> power_soc_deep_sleep
SYS_SOC_POWER_STATE_DEEP_SLEEP_1 -> power_soc_sleep
The following functions have been removed:
void _sys_soc_set_power_policy(uint32_t pm_policy);
int _sys_soc_get_power_policy(void);
FUNC_NORETURN void _sys_soc_put_deep_sleep(void);
void _sys_soc_put_low_power_state(void);
void _sys_soc_deep_sleep_post_ops(void);
Those changes are propagated to the samples.
All calls to QMSI are removed.
Jira: ZEP-1045, ZEP-993, ZEP-1047
Change-Id: I26822727985b63be0a310cc3590a3e71b8e72c8c
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
These testcases can't build on common platforms with 16K or less of
memory.
Change-Id: Iade2aa423f42a1f174a5ebb5d183b362917f503e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove this sample app. The component is no longer on the
board (quark_se_c1000_devboard).
Change-Id: I342616781e6f343cfc66b89cbdf85de5844f6f4a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Use unified kernel for lcd hd44780 app.
Some delays were rounded up to multiples of millisecond, since
k_sleep only takes multiples of millisecond. Based on the lcd
datasheet, this should not cause any problem.
updated some comments based on what the code is actually doing.
Change-Id: I533c822dbaea0246dcd62a76cc23ce0d8edd4630
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Use unified kernel for the watchdog sample app.
Change-Id: I6b53f066033a451c3aafe7f3a528c7f3461ae305
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Ability to use Zephyr shell by multiple modules simultaneously, each
module for its own usage.
Old shell implementation enabled the user to call only one module
commands, not all of the modules simultaneously.
Change-Id: I0ef8fa2fd190b7490c44fe91d1016363258302c9
Signed-off-by: Yael Avramovich <yael.avramovich@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix minor style issues with excessive whitespace for alignment and
lack of 'static' for the tx_fiber_stack.
Change-Id: I0c761e94e6a6789a3772b08b0774cd1a5e73c2ef
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Right now the hci-uart samples doesn't really work anywhere else than
nRF5x, so make that the default configuration. Also rename the old
prj.conf to generic.conf to give a generic starting point for creating
configurations for other targets.
Change-Id: I1c940339b457d0e77c8ddad4b2474fc7e5b12a51
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In 3 of our UART driver implementations the ISR is exclusively
used and enabled for the RX path. The existing logic was
susceptible to a stall situation where a polled out transmission
would be interrupted by a reception and then the ISR code
would loop forever due to the TX event being signalled (although
the interrupt itself was disabled) causing the ISR to keep
looping for an RX interrupt.
Change-Id: Ic379e58b1c974aca3cee37d2d81f12c3726fb160
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
There's no need for this app to use the HCI driver API directly.
Change-Id: Ie5acfbfb09fc3f86c3f29f22fbf7da7db1ff2127
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
These options were only needed for a MyNewt-based nRF51 firmware on
these boards (the MyNewt BLE stack is called Nimble, hence the
prj_nimble.conf sample config files). With a Zephyr-based nRF51
firmware these options are no-longer needed, so it's not appropriate
to have them default to enabled. Instead, if they are needed, require
the app-specific configuration to enable them.
Change-Id: Iefbee4d97590af4e11bcedea05fe61f32a147b83
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We are building for unified kernel by default. This avoids running the test
twice.
Change-Id: I2951464f448b3019c236ce5943df55c052b427d9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Make it run on Qemu only, this test is not intended for HW.
Change-Id: I842d7456f9238221ef5b661749136f4418d5ab16
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
ztest was not working with unified kernel and v1 APIs and not many tests are
using ztest right now, so instead of making it work with old APIs, convert it
to unified kernel completely so that new tests written using ztest would be
unified kenrel based.
Change-Id: Ibfcc7783dcb266abbd388662ba61c4b55d32b10c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a new pwm app (rgb led) using the new API.
Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.
To demonstrate the usage of the new PWM APIs, this app
to drive a rgb led is added. It will use the new API
pwm_pin_set_usec().
This app will be located in a new sub directory.
Jira: ZEP-745 ZEP-1029
Origin: Original
Change-Id: If8e5d8ab22dcf8b7cf3665e38949715c61ca9c03
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Add a new pwm app (motor control) using the new API.
Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.
To demonstrate the usage of the new PWM APIs, this app
to drive a servo motor is added. It will use the new
API pwm_pin_set_usec().
This app will be located in a new sub directory.
Jira: ZEP-745 ZEP-1029
Origin: Original
Change-Id: I65857848e64d0478c4e12d1317b2089cdd1ecf5c
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Add a new pwm app (fade led) using the new API.
Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.
To demonstrate the usage of the new PWM APIs, this app
to fade led is added. It will use the new API pwm_pin_
set_usec().
This app will be located in a new sub directory.
Jira: ZEP-745 ZEP-1029
Change-Id: I8d929a21f7de88307c47b52f98f131e00b2fdbe7
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Replace existing APIs which will be deprecated by
the new API in this app and rename the app.
Following the recent pwm RFC, all existing APIs will
be deprecated. Two new APIs will be added. The changes
for the new APIs and the required driver function have
been posted.
Since the two existing APIs (pwm_pin_set_period and
pwm_pin_set_values) used by this app will be deprecated,
this change is to replace them with the new API
pwm_pin_set_usec().
To demonstrate the usage of the new PWM APIs, more apps
will be added. All the apps will be located in their own
sub directories. The existing app is actually one to
blink LED. So, it is moved the "blink_led" sub directory.
Jira: ZEP-745 ZEP-1029
Change-Id: Icc3fbf6b6c25db9590c63bc08f40ec62c87c0f16
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Some minor cleanup and rename of c file to main.c
Change-Id: I8635c9c044f194c5527cd696e9065656403d10c4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It's important that this configuration stays within the limits of the
Arduino 101 nRF51 (which has only 16kB of RAM, unlike most others that
have 32kB).
Change-Id: I359061f8a41f1373f254c49bff00f551f915bd70
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
For the current purposes it's enough to build these tests only for the
ARM and x86 qemu targets. This also avoids false-positive failures on
platforms that don't have enough memory.
Change-Id: Icbbfc0603feba6bb1ec8a3054f8cdf0800f49ca1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Since net_buf_get() for the avail_acl_tx FIFO is called in
interrupt context (ISR) it cannot wait, and it will fail
immediately returning NULL if it fails to acquire a buffer.
During LE Secure Connections pairing, when there is a fair
amount of packets coming from the host, the FIFO was running
out of buffers causing the packet to be dropped instead of
forwarding it to the controller.
The number allocated now matches the amount of TX buffers
in the controller, so that normal HCI flow control (from
the Host to the Controller) will kick-in preventing any
buffers from being dropped.
Change-Id: Ifad4fbac84ae938eb0e68b73a80a02ba79b6ff6e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Adjust the dhcp_client sample Makefile to select a project
configuration based on BOARD rather than interface hardware. This is
more convenient for supporting other hardware than the current
organization and is consistent with various other samples.
Change-Id: I0f59b632144dfa875dc036ec6f4aa4f6657a79bc
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This makes all Bluetooth samples and tests being build with unified
kernel. main() is now executed from init thread and specifying task
for it in mdef file is no longer needed. By default main stack is
1024 bytes and this should be enough for BT samples.
Change-Id: I6674eea2c028b78ada5190acef72937186738af2
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Whenever the writer of a FIFO is an ISR and the reader a fiber it's
important to make sure that we give the chance for other fibers to run
in case the FIFO keeps getting new data from the ISR without ever
running empty.
Change-Id: I6b40461713d4acfdc6fcec13ff90c9697ff01935
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The bt_driver API was created when Zephyr only had a Bluetooth host
stack, but no controller-side functionality. The only "driver" that
was needed for the host was the HCI driver, and hence "HCI" was
omitted from the name.
With support both for host and controller Zephyr will be getting more
Bluetooth driver types, in particular radio drivers. To prepare for
this, move all HCI drivers to drivers/bluetooth/hci/ and rename the
bt_driver API bt_hci_driver.
Change-Id: I82829da80aa61f26c2bb2005380f1e88d069ac7d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
CONFIG_ARC_INIT defaults to 'n' now days so there's no reason to try
to explicitly disable it in the sample config files.
Change-Id: I88df06ba23bdac697f0767384f7b88e3bd9fced9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a config file for boards using the Nordic Semiconductor nRF5x
ICs with reasonable defaults in terms of UART configuration and
controller settings.
Change-Id: Iaa5904c96c0f40a2749b7dda0398dd35fa809f24
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Include zephyr.h instead which properly includes nano or unified kernel
headers.
Change-Id: I41c848092d022e2b0737ae6b2b53084eaf9bc6a7
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Due to the fact that ISRs run at priority 1, the LE_Rand
command was not being rescheduled after CPU sleep to be
able to fill its buffers. By performing all TX (to controller)
work on a fiber, the RNG ISR is able to run and the command
can be executed synchronously in the fiber context.
Change-Id: I3b658e1cab3f80ae655cc88566639a122a361a08
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add short descriptions for what the hci-usb and hci-uart applications.
Change-Id: Ie06cfa1678243e97b49e5594a00086cbf3c343be
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Lets not confuse user with this code, it is clearly not a sample.
Change-Id: I3a0209fb34b2c97383b0f5382f156b80470fdaf7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Created unified kernel build setup for the power_mgr sample
app. Currently it shares the same source file between
micro and unified kernels. This is to help test and add new
features from unified kernel. In future, separate source will
be created for unified kernel. After transition is completed,
microkernel version will be removed.
Jira: ZEP-1140
Change-Id: Ic3a0b5cb3adc0749a7084ad785a041fee5875f56
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Also demonstrates use of k_thread_spawn() and K_SEM_DEFINE().
Change-Id: Id2f32ea38d2b5fea40f90a7ef6665231e4158cb3
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
- remove useless Kconfigs
- remove SPI DW kconfigs, we now use QMSI driver
- Cleanup readme and turn into ReST
Change-Id: Ie1f39e0afabf499fa81627ded59adf267e01993a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Enhance documentation and build for Quark D2000 Devboard by default.
Change-Id: I3417c31a8898a076465d25f45d7821820b480290
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The test is modified to key on CONFIG_TASK_MONITOR instead of
CONFIG_MICROKERNEL, since that is what it was really interested in.
Also, this allows the unified kernel to work w.r.t. task monitoring,
since that is a concept that is alien to the unified kernel, since there
are no more task transitions recorded as part of a kernel server. The
unified kernel does not have a CONFIG_TASK_MONITORING option.
To make this work, since the kernel_event_logger sample makes use of the
philosophers demo, the latter had to be modified as well. The nanokernel
philosophers demo would not work with the unifed kernel since it
identifies as a microkernel, and in that case the test would be looking
for symbols defined in an MDEF file, which the nanokernel demo does not
provide of course; the same thing applies to the nanokernel
kernel_event_logger sample. Instead, the demo defines NANO_APIS_ONLY=1,
which is really what it is interested in. To allow that definition to
exist, the nanokernel philosophers demo and both the nano/micro
kernel_event_logger samples add src/ directory with its own Makefile and
add their own phil_fiber.c and phil.h files, which simply include the
original files from the microkernel philosophers demo. As a final
change, the kernel_event_logger samples need a different prj.conf file
for the unified kernel, since it needs a bigger idle stack than the
default, since the kernel event logger does work in the idle thread when
the kernel goes to sleep.
Change-Id: I4cac45a32d09d6ca1de052a368b3219f64889869
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
A bit of work has to be done by someone why wants to run the demo with a
different number of threads than the default.
Fixes ZEP-1077.
Change-Id: Ibb5cfed2bd9984bcf0f9d65f957f32daf4c5211e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Microkernel and nanokernel tests now use customized source code
to eliminate use of MICROKERNEL and NANOKERNEL config options.
Change-Id: Ic3617df34487911af1607ab46f469c5e1212d3f7
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This sample justs outputs the SPI FLASH IDs.
I think we should improve this to also output done, otherwise
it looks like its stuck or something.
Change-Id: I18d5919c1e25bb5aaa9ceba53793cc14b15f3c77
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
Add a new sample application in sample/bluetooth/hci-uart
that acts as a bridge between a UART and the BLE Controller.
It receives commands and ACL data in H4 format over the UART
and passes them on to the BLE Controller to be processed.
It also conversely forwards all events and incoming ACL data
generated by the BLE Controller to the UART.
The application uses the hci_raw interface to pipe the data
to and from the BLE Controller and UART.
Change-Id: Iff7696166a82fe363b2ad4e1abea40103899f927
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This way the application can reuse the same callback for multiple CCC
since it can track what CCC is affect by checking the attribute pointer.
Change-Id: I608da643aea07de26b65d67e6db3268d717d0f53
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This will be reverted once input is supported in QEMU.
Change-Id: I4bc946f1634bf9ebd17b697f0da7ce2f813e5725
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
These platforms don't have the hardware and will always fail.
Change-Id: I637d39f003bd1d507da0b5bb6fa12118040fcd63
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Got out of sync with the revised signature of k_stack_init().
Change-Id: Ib4c67c75f30055583a457bfb13f8dacc9929ee88
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Old markup was using %(target)s, which is not the right markup to use,
so it was faiing to build.
Change-Id: Idbe99cfdd695284dc2a66e5823bc65a1417fbfd3
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Implement resources so they conform to what the ETSI plugtest suite
expects.
This allows the zoap-server sample to pass most of the tests of the
CORE[1] group, only TD_COAP_CORE_09 is not implemented.
Tests involving lossy networks weren't run as well.
The tests were run against the libcoap[2] client.
[1] ETSI CoAP test description
http://www.etsi.org/plugtests/CoAP/Document/CoAP_TestDescriptions_v015.pdf
[2] libcoap
https://libcoap.net/
Change-Id: Ifa3ed21a93052e02f47e99d7cb6d9d4b28e576d8
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This sample uses the grove temperature and humidity sensor and displays the
read values on the grove LCD.
Change-Id: Id6fb6171c26c97f1b01008fa06a4dc85287d7545
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When the sample fails, it's difficult to identify whether it failed
during the configuration or transfer stage. Provide a little more
information which will allude to the nature of the failure.
Change-Id: I5272ce73f56b0e51c8439d5510e512b616665705
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This removes ipss_listen since it does depend on the old network stack it
cause build problems with yaip and anyway its code is only used by ipsp
sample while the net samples does not use ipss_listen at all.
Change-Id: I23987670548741bde8800115d473a3bab242153b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This prepares the way for more controller-side HCI implementations
which can be named hci-<transport>.
Change-Id: I6f82db4b7b7096a122f32def9fe9025a7b811244
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
* Gets rid of k_current_priority_get(). Users can just call
k_thread_priority_get(k_current_get()) instead.
* Declares k_thread_priority_get() in kernel.h, where it
really belongs.
* Removes duplicate declaration of k_thread_priority_set().
Change-Id: I616ae6f2e06c95ecba3b92324186b3fa29162fd1
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Using AON for GPIO kconfigs is very specifc to quark se, there
is no need to make this special for this platform. Use the
existing scheme instead.
Change-Id: I946431490380dc0f537d6056277a94c9c9c80fed
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Simplified some documentation, removing inconsistencies and making
it easier to understand by separating PM infrastructure areas and
soc specific components that implement the hooks.
Removed the DEVICE_SUSPEND_ONLY policy as it is redundant and
causes high complexity in the flow. It is also not practical
to use it because it was meant to be used without doing CPU or SOC
low power state operations. This means it would do device PM
operations in the ISR of the system timer used by the scheduler.
This can disrupt the scheduler time.
Added a check of a flag around the notification sent from the ISR
of the wake event and created APIs to set/clear it. This will
allow disabling the notification when not needed from
_sys_soc_suspend().
Jira: ZEP-972
Change-Id: Id7aa7d2683384eabed518d4efac446ecc84c3498
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
The path and port used by zoap-client were different than the ones used
by zoap-server.
Even if they are different applications, for consistency, it makes sense
for them both to be able to talk to each other.
Change-Id: I883d59c77bc3800b4f0965ba7bcf96a08e545d29
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
uIP keeps the port separated from the IP addresses, so if the
application wants to communicate with a remote endpoint we must also
have the port information available.
Change-Id: I8e2b01fe5717166e1f9cebcc74b2056325b8ccc3
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Origin: Original
Change-Id: I0927c25fbbba5d4863f199d058d311c10d52d784
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The demo can be configured to use different object types for its
synchronization: SEMAPHORES, MUTEXES, STACKS, FIFOS and LIFOS. To
configure a specific object, set the value of FORKS to one of these.
By default, the demo uses MUTEXES.
The demo can also be configured to work with static objects or dynamic
objects. The behaviour will change depending if STATIC_OBJS is set to 0
or 1.
By default, the demo uses dynamic objects.
The demo can be configured to work with threads of the same priority or
not. If using different priorities, two threads will be cooperative
threads, and the other four will be preemtible threads; if using one
priority, there will be six preemtible threads of priority 0. This is
changed via SAME_PRIO.
By default, the demo uses different priorities.
The number of threads is set via NUM_PHIL. The demo has only been tested
with six threads. In theory it should work with less than six threads,
but not with more without making changes to the forks[] array in the
phil_obj_abstract.h header file.
Change-Id: If7a0a34b216929a661245fd921a32ec413df8a4a
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This is a nanokernel sample and the MDEF file is not being used at
all.
Change-Id: I344adfa9394329258144de88521764974238f6a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.
Jira: ZEP-850
Change-Id: I01c825c7eb44d6c321f2ffb88e8899da528921dc
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This board is not being used or tested and does not actually
run on any hardware, remove it in favor of well supported boards
for this CPU.
Jira: ZEP-850
Change-Id: Ied681b6059ad74f9d019054292c919a9f938e7d3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Update the power sample and drivers with the new device driver power
management API using the existing logic
Jira: ZEP-954
Change-Id: Idd94232e458767635973e94e9fc673c01612c1e2
Signed-off-by: Amir Kaplan <amir.kaplan@intel.com>
This fixes the UUID 128 bits to use the right byte order so it can be
decoded properly:
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
Length: 21
Flags: 0x06
LE General Discoverable Mode
BR/EDR Not Supported
128-bit Service UUIDs (complete): 1 entry
Eddystone Configuration Service (a3c87500-8ed3-4bdf-8a39-a01bebede295)
Change-Id: Ia4aacaf3557d74a248f63cbffb2adb73b076d38c
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Excluded Quark D2000 because there is not enough RAM to
build the sample.
Change-Id: Icc772e0aaca2be8731eae8f986eed17782beb445
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
In many cases there is no need to define a macro for printing to
the console, just use the correct variant directly.
Jira: ZEP-240
Change-Id: I9952deda4bfc60424f01fca2443d037562d13d0d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
.ini format supports long lines by prefixing the continuation with an
empty line. Adding a backslash makes the backslash part of the value.
Change-Id: I0a1ade3a6bdf12281e61d06e21d7233d4b624b48
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Boards that cannot support microkernel applications for memory resources
are excluded from microkernel build test.
qemu nios2 board is excluded from nanokernel because the Altera JTAG
UART not implemented yet
The kernel even logger buffer size for nanokernel was reduced from 1000
elements to 500 to allow the sample to fit in the Quark D2000 board.
Jira: ZEP-698
Change-Id: I0c5cc4c0bfc27940a758dcdd8ff0e01ad7f4b88c
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
The sample applications for task profiling requires a default
project configuration file that can be used as reference for
any other board.
Quark SE dev board has some optional optimizations that can
be added using the prj_quark_se_devboard.conf file.
Some redundant symbols were removed to simplify the reading
of the configuration.
Jira: ZEP-698
Change-Id: I71d584d4454392e740f8b7a2c2f47206b76c3abf
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
This patch adds the micro support for the shell application
Change-Id: I4499a8660323f1fa61ff3bbf6e7a3026a7dba77a
Signed-off-by: Yong Li <sdliyong@gmail.com>
This commit removes deprecated APIs and replaces them with routines
that provide similar functionality without the flexibility originally
offered by the deprecated APIs.
Removing deprecated routines will help us to be prepared once the
new IP stack is ready (ZEP-793). Furthermore, this commit will also
help us to move our current DNS Client implementation to the lib/iot
directory, as specified by ZEP-847.
This commit removes the netz library from the DNS client sample
application. UDP functionality is replaced by primitive routines.
Specifically, the following changes are applied by this patch:
- Remove netz routines
- Remove app_buf data structure
- Introduce primitive data types in the DNS client code
- Introduce primitive network routines
- Add a header file containing configurable parameters
Jira: ZEP-793
Jira: ZEP-847
Change-Id: I0302133da77308f0cdd9ace2c0265e6b77673ff0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This is only meant for Contiki based IP stack.
Change-Id: I53cbcb7da0bd13ad87243fd70974cec0bd31072e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adding these tests allows to find issue with QMSI update.
Change-Id: Ib247bee6a5dbdd60aed759b4908e9ae7751d5f78
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Change tags to reflect the type of samples, in this case it is all
about sensors.
Change-Id: I9f87e8683dd52fd757cd07ba5aa9fad99d17ab38
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove this app, since the sensor is not on the
board any more.
Jira: ZEP-763
Change-Id: I931acfe9f01b817bc0b24a4e0745bf759e53da90
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
Don't try to detect the UART device manually, the list is missing a
bunch of boards (the Quark SE sensor subsystem variant, and both
Arduino 101 halves). There's a config variable for that.
Change-Id: I903e52dcb6025e5da824faadb5e4bc59221fa210
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This output is going to a terminal device, not a Unix tty descriptor
which will cook the output for us. Newline moves the cursor down.
Carriage return moves it to the start of a line. We need both.
Change-Id: If93d1a85d16cea93b4788fa55e694a7b77055bfe
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
- Set default board to Quark SE Debvboard
Jira: ZEP-690, ZEP-760, ZEP-782
Change-Id: I7f7cc45b527a116f88cf45796e46b429ae6f0060
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
HID over GATT Profile Specification states:
'The HID Device shall use LE Security Mode 1 and either Security Level
2 or 3.'
Change-Id: I2cfc1d9df76b4e8a8b2be7e87d18a7a5f3a19ea8
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a sample that implements HID Service peripheral, the current
descriptor map is for a generic mouse so when connecting to a Linux box
it will create a input device like in the following output:
input: Test HoG mouse as /devices/virtual/misc/uhid/0005:1D6B:0246.0035/input/input98
hid-generic 0005:1D6B:0246.0035: input,hidraw2: BLUETOOTH HID v5.29 Mouse [Test HoG mouse] on XX:XX:XX:XX:XX:XX
Change-Id: Iccf07926ecc7363f4f47e1aa9df506a722e7e2d3
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a HoG service sample which can be shared with application
samples.
Change-Id: I6893ff409b254d0a616b2ba558fd629ce9edf1d4
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a timeout to switch from configuration mode to beacon mode
following the recommended behavior from the spec:
The connectable timeout should be at the very least 30 seconds to let
enough time to user to start a configuration application.
Change-Id: I8f262c447ed1622e377fd7a05dde78c7b6b0560d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Treat the sensor subsystem as an independent board that can send
messages to UART and disable IPM and the messaging interface. IPM
can be enabled by applications that require such interface.
Fix all samples that are affected by this change to make sanitycheck
pass.
Jira: ZEP-451
Change-Id: I3df6af16adefaefec02b97778d6c68ffc920ac35
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Removed tests that will fail when using ISSM toolchain because
there is no g++ inside.
Example:
export ZEPHYR_GCC_VARIANT=issm
export ISSM_INSTALLATION_PATH=<ISSM PATH>
sanitycheck -p arduino_101 -p arduino_101_sss -p quark_d2000_crb \
-p quark_se_devboard -p quark_se_sss_devboard
Change-Id: I532d4f0e0095472cbf3428cb8355167a320a10a0
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
Casual building in the tree leads to regular messups where I forget to
clean up the outdir first when switching platforms and the build fails
in strange ways.
Put a $(BOARD) subdirectory under outdir, and use that at $(O) when
the user does not provide an output directory.
Note that "make pristine" continues to remove the entire outdir,
including other architecutres (so as to make the tree pristine).
Also update a few spots where outdir was mentioned in documentation to
clarify the new scheme.
Change-Id: I365eec06ea440f17380b9f9ace5f5d34b9bed4dc
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Change the api argument format following the API
argument definition change in the driver. Some
definitions of CONSTANTs were changed accordingly.
Correct some comment error.
Jira: ZEP-642
Change-Id: I1b34640aa70f1597076e035e2b3b576d8337129a
Signed-off-by: Baohong Liu <baohong.liu@intel.com>
The KNOWN_ISSUES file describes issues and workarounds for the NATS
and DNS sample applications.
Change-Id: I9a33a82073707dbdd4109e0740108b99c42ad772
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Excluded Quark D2000, Nucleo F103RB, Olimexino STM32 for the
sample test_15_4. Boards doesn't have support for 15.4 neither
enough space.
JIRA: ZEP-738
Change-Id: I963509a77cdf6a8ff2efee2f2d4a498e3c07f9b5
Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
Kconfig allows selecting NETWORKING_WITH_15_4_TI_CC2520 even if the
current board doesn't support it, and also selects it by default. This
breaks building the 15.4 sample with qemu_x86. Add a config option for
having CC2520 support and enable the choise only if it is available.
In addition, remove unused function from iee802154 code, as it now
fails the tests.
Jira: ZEP-697
Change-Id: Ib082f82acdd0f86d3306bbd3bb827f61b0fd0be1
Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com>
According to last comments posted in ZEP-632, the unref routine must
be called only when net_send reports an error.
Jira: ZEP-632
Change-Id: I11553edf2c7d686c3e58617c2e05b6f18962955e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>