Create a slightly smarter algorithm for choosing how long to advertise
each subnet. This is particularly important for the mesh_shell app,
since it uses a 10 second NODE_ID_TIMEOUT, meaning starting Node ID
advertising through user interaction would only succeed in advertising
one subnet (due to this being configured to 10 seconds).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Mesh Profile Specification 1.0 section 7.2.2.2.3:
"When the server starts advertising as a result of user interaction,
the server shall interleave the advertising of each subnet it is a
member of"
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Node ID advertising is short lived, so it's important to make sure
that subnets that get it enabled are first in queue to start
advertising.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We'll soon extend the start functionality with a bit more stuff
(prioritizing the started subnet), so in order to avoid excessive code
duplication, create helpers for these actions.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Until now the proxy server code would only advertise with the first
subnet. Introduce tracking of what the last advertised subnet was, and
give each subnet 10 seconds of advertising at a time.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add configuration client model support for NetKey Add message, as well
as a mesh shell command for calling the new API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There are files in the cloned copy of the Zephyr tree needed to setup
the development environment, so there's a bit of chicken and egg
problem.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Footnote reference in a code block is ignored. This text shouldn't
really be in a code block anyway, so just make it a paragraph with a
trailing footnote reference.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
With a clean Ubuntu install, following the getting started page
instructions for linux, only python3 is installed. Apparently (by
design), a python3 install does not create the symbolic link for
/usr/bin/python so the doc/Makefile complains.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
External serial flash on this board is 4MB.
Previously, this was confused with internal flash, which is 1MB.
Fixes#1270
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
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>
The reachable calculation for ND is using fractions combined with
integers and getting rounded to very small results (1ms or 0ms).
Let's split up the fraction into it's numerator and denominator
and perform the math in a better way to get the correct results.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
It is supported to add give extra flags to the linker from the
commandline like this:
cmake -DEXTRA_LDFLAGS=-Lmy_dir path
But unfortunately this was broken during the CMake
migration. Interestingly, the reason that it was broken is that KBuild
was also partially broken. KBuild would pass on EXTRA_LDFLAGS when
object files were linked together into built-in.o files, but it would
not use EXTRA_LDFLAGS for the final link into an elf file.
This patch fixes EXTRA_LDFLAGS.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
The logic for choosing to relay from the GATT bearer to the
advertising bearer was still buggy. This patch refactors the logic to
a separate helper function to make it clearer.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5008.
It does so by splitting up gen_syscalls.py into two scripts with a
json metadata file to communicate syscall metadata between them. The
parsing script parses header files from include/ and writes syscall
metadata to a file if the contents changed. The generation script
reads from the json file and generates syscall code.
The build system DAG now looks like this:
always_rebuild -> json -> syscalls -> offset.o
The script for generating json will do so only if the content changes,
this ensures that the entire DAG does not always do a full rebuild.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Testcase developed x86mmu specific, to validate
existing APIs. This checks for the PDE/PTE set
on the address and returns if some violation occurs or not.
Signed-off-by: Akhilesh Kumar Upadhyay <akhilesh.kumarx.upadhyay@intel.com>
The command handler already has support for decoding from hex, however
it was not using the decoded value when calling the client API.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In uart_nrf5.c the IRQ masks for the TX READY and ERROR events are
incorrect. This pull request fixes the mask values so they are
according to the nRF51/nRF52832/nRF52840 product specification.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
If relaying is not supported, or disabled, the Relay Transmit state
will normally be 0, which is not what we want to use when proxying out
packets from GATT clients. The bt_mesh_net_relay() function is also
used for sending out locally originated packets, in which case the
Relay Retransmit state is also the wrong one to use (the Network
Transmit state should be used instead).
This patch makes sure we only use the Relay Retransmit state for
packets originating from the advertising bearer, and for all other
packets use the Network Transmit state.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The bt_mesh_net_relay() function was missing several important checks
for whether a PDU should be relayed or not. In particular, it would
relay a packet from adv to adv even if the Relay state was set to
disabled, as long as GATT Proxy was set to enabled. The code would
also relay packets to the GATT Proxy bearer if the Relay state was set
to enabled but GATT Proxy was set to disabled. This patch addresses
both of these issues.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the Relay state is set to Not Supported (0x02) the Config Relay Set
message should not change the state, rather just return its current
value.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The genrest.py script used to create configuration options documentation
from the KConfig files generates slightly incorrect OPTION directives
(with an extra colon at the end). Sphinx 1.5 didn't care, but Sphinx
1.6 does, so fix this now in preparation for upgrading Sphinx to the
current version.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Since we moved around where yaml, dts, and fixup files exist we need to
update the docs to reflect those changes. Also, try and make the docs
at little more generic to changes that are occuring.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Some API material (from doxygen comments) wasn't included in the
generated documentation because there was no doxygengroup Sphinx
directive to display them. This PR add content into appropriate places
in existing documentation (e.g., Bluetooth Cryptography APIs into the
Bluetooth API doc) and creates two new collections for Display and
Miscellaneous APIs.
Comments added to the .rst files to mention doxygengroups that are
intentionally excluded (because they're organizational groups containing
subgroups that are included).
Sorted the Bluetooth API list, mostly.
Fixed a couple doxygen group titles defined in the include files, and
added a few patterns to filter new "expected" errors from the document
generation process.
Legacy and deprecated APIs remain left out, as intended:
http_legacy (net/http_legacy.h)
spi_interface_legacy (spi_legacy.h)
zoap (net/zoap.h)
fixes: Issue #5051
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The beacon cache handling was severely broken in the way that the
cache_add() function was incorrectly mapping net_idx to array index,
which could have lead to array overflows.
To fix this, while also cleaning things up, move the cache to the
actual bt_mesh_subnet struct. This e.g. lets us avoid having to track
the net_idx twice.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
https://www.bluetooth.org/errata/errata_view.cfm?errata_id=9807
"If the computed Beacon Interval is less than 10 seconds, it should be
set to 10 seconds. If the computed Beacon Interval is greater than 600
seconds, it should be set to 600 seconds."
The lower limit is already covered by how frequently the delayed work
callback gets called, so we just need enforce the 600 second maximum.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Whenever there's a security change (Key Refresh or IV Update) we
should immediately send beacons to any Friend Queues or connected GATT
clients. Introduce a helper function to do this, and make sure it's
called from all places that change the Key Refresh or IV Update
states.
This fixes test case MESH/SR/PROX/PB-12-C.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Added Inter-IC Sound driver (based on SSC module) for Atmel
SAM MCU family.
Tested on Atmel SMART SAM E70 Xplained board
Origin: Original
Jira: ZEP-2509
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Added DMA (XDMAC) driver for Atmel SAM MCU family. The driver provides
private DMA API to be used by the SAM family device drivers. Public
DMA API to be used by user space programs is currently missing.
Tested on Atmel SMART SAM E70 Xplained board
Origin: Original
Jira: ZEP-1609
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Getting warnings from Kconfig after generalising how CPU_HAS_FPU is
configured on the architecture level. 2 Boards were settings this value
in the wrong place.
Fixes#5211.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This makes it clear why 18 is a valid minimum network PDU length to
enforce. This is particularly important since as of writing this patch
there's at least one PTS test case which sends too small PDUs, which
could potentially lead to people thinking the implementation is at
fault (it's not).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>