As the number of mesh APIs grows it becomes a bit cumbersome to have
everything in a single header file. Split the mesh.h header file into
multiple files in a new mesh subdirectory, and include the new headers
from the old one to retain backwards compatibility and simplicity for
apps (they only need to include <bluetooth/mesh.h>).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Sphinx is configured to properly handle function attributes that were
causing many "expected" warnings. Remove filtering for these warnings
since they're not showing up any more. (Note that nested unnamed struct
and union declarations still are an "expected" issue.)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This patch adds read permission for client characteristic configuration
descriptor. This is required by MESH/NODE/MPS/BV-06-C,
MESH/NODE/MPS/BV-07-C PTS tests.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
802.15.4, as other radio tech, works in little endian on network level.
To keeps things simple, the inner context per-interface, stores the
extended address that way. But it can be confusing in shell then, so
let's work handle these addreses through EUI-64 format there.
Fixes#4936
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Function flash_read was calling without checking return value.
(Coverity CID: 178794)
This patch cover this issue.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add a basic shell skeleton for Mesh, containing basic command for
initialization, provisioning and reset.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Logic for sending chunks of data is incompatible with adding
Content-Length: header.
Per https://tools.ietf.org/html/rfc7230#section-3.3.1:
"A sender MUST NOT send a Content-Length header field in any
message that contains a Transfer-Encoding header field."
Going a bit further in my mind: also don't send Transfer-Encoded
chunked data either when the Content-Length header is present.
In general, there will be problems if the http client library
makes payload changes without the user code knowing about it.
This patch removes the use of http_send_chunk() from the new
HTTP client code and instead sends the payload directly to
http_prepare_and_send()
This fixes an issue where every available buffer would be allocated
with repeating payload data because the for loop in http_request()
wasn't ending until we ran out of memory.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
We should not use the user suppied timeout setting in
http_client_send_req() for the connection timeout. In the
previous API the call to tcp_connect() used
CONFIG_HTTP_CLIENT_NETWORK_TIMEOUT as the timeout setting.
Let's do that here too.
This fixes -ETIMEDOUT error generation when using K_NO_WAIT
for http_client_send_req().
Signed-off-by: Michael Scott <michael@opensourcefoundries.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>
Add status error string when sending a error message from
HTTP server to client as described in RFC 2616 ch 6.1.
Previously only error code was sent except for 400 (Bad Request).
This also fixes uninitialized memory access in error message.
Coverity-CID: 178792
Fixes#4782
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This makes piped output work as the user expects. And looking at the
piped output is the only way to use sanitycheck normally because
of #4603.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
On arches which have custom logic to do the initial swap into
the main thread, _current may be NULL. This happens when
instantiating the idle and main threads.
If this is the case, skip checks for memory domain and object
permission inheritance, in this case there is never anything to
inherit.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If there is a build setup problem where a device driver has not been
setup for the entropy driver then the call to device_get_binding()
will return a NULL value and the code will continue to use this NULL
value. The result is a hard fault later in code execution.
Note that CONFIG_ASSERT is by default off so one has to turn this
configuration on to catch this problem.
Signed-off-by: David Leach <david.leach@nxp.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>
installed GDB on host might not be compatible with the binary generated
by Zephyr. Mention that we need to use the gdb that corrosponds to the
toolchain being used.
Fixes#4312
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When CONFIG_X86_MMU is enabled for arduino 101 the start address
should be aligned to 4kB. If not aligned the page tables would not
be created and the build fails.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This change changes the semantics of the environment variable
ZEPHYR_SDK_INSTALL_DIR to allow the use of 3rd party toolchains
alongside the Zephyr SDK's host tools.
Specifically, setting ZEPHYR_SDK_INSTALL_DIR now indicates that the
Zephyr SDK host tools are to be used. But not necessarily that the
Zephyr SDK's toolchain is to be used.
The documentation is also changed to explain this behaviour.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Some boards define multiple configuration which all are maintained under
the same board directory. The flasher was looking for an openocd.cfg
based on the board name, which can't be found for such boards.
Use the variable BOARD_DIR provided by cmake instead of trying to
assemble the board directory location on our own.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
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>
The conf file name must be of the form prj_<board>.conf for it to be
automatically chosen for a given board.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The restoring of the buffer parsing state was only correct for the
friend queue (which needs the app-layer data). Relaying on the other
hand requires the network layer data, i.e. it needs a different state
to be restored.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>