With pull request #16208 and #16404 hooks for calling user defined
code was implemented. These user extensions are gated by a number of
Kconfigs. The test in this pull request tests that code compiles when
these Kconfigs are enabled.
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
When reading attributes from static services their handles will not be
set and must be resolved at runtime.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The file descriptor was not closed after the test which caused
Coverity to complain about resource leak.
Coverity-CID: 198640
Fixes#16493
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Port the fix for the controller implementation to make start
encryption queueable if there is any control procedure in
progress.
Refer to #15335.
Relates to #15335, #15186, #15958 and #14636.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This name collides with one in the bt subsystem, and wasn't named in
proper zephyrese anyway.
Fixes#16604
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Fix disconnect command optional argument count to permit the
supply of Bluetooth Address so as to be able to cancel a
pending central initiated connection creation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix gatt indicate when conn is NULL and called with characteristic
declaration as the attribute argument. In this case the handle was not
advanced to the characteristic value. This is inconsistent with the rest
of the notify and indicate API
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Mesh Profile 1.0 Section 6.6:
"The timeout for the SAR transfer is 20 seconds. When the timeout
expires, the Proxy Server shall disconnect."
This will let qualification test case MESH/SR/PROX/BV-05-C pass
without requiring an explicit disconnect.
Fixes#16600
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This moves the processing packets of upper layers from RX thread to the
system workqueue so they have the same priority as the TX callbacks
which has the added benefit of making any protocol on top of L2CAP to
be executed using system wq stack.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
These options are mutually exclusive, or more specifically,
CONFIG_POSIX_API has wider scope and supersedes
CONFIG_NET_SOCKETS_POSIX_NAMES. Implementation-wise, the two
options should not be defined at the same time, as that may
lead to declaration conflicts.
Fixes: #16141
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The struct json_obj_descr definition allocates only 2 bits for type
alignment. Instead of using them literally minus 1 to encode 1, 2, or 4,
let's store the alignment's shift value instead so that 1, 2, 4 or 8 can
be encoded with the same 2 bits to accommodate 64-bit builds.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Not all serial drivers support ASYNC operation and if they do,
they might not support it on every SoC.
Add the SERIAL_SUPPORT_ASYNC option to indicate ASYNC operation
is availiable.
Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
It does make sense to initialize USB console after USB Device stack.
Note that the value is selected only if we specify USB_UART_CONSOLE
in prj.conf, not in menuconfig afterwards.
Fixes#16518
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Newer versions of GCC (e.g. gcc 9.1.1) fail to compile the version of
Grub that is used by the Zephyr build_grub.sh script. This patch updates
the version of Grub to the latest (as of June 4 2019) which includes a
number of fixes that solve the problem.
Fixes: #16624
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This extends the UpdateHub library code to allow the
use of IPV6 for communication.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
This extends the UpdateHub library code to allow the
use of CoAPS/DTLS for communication.
Refs: #13039.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
UpdateHub is an enterprise-grade solution which makes simple to
remotely update all your embedded devices in the field. It
handles all aspects related to sending Firmware Over-the-Air(FOTA)
updates with maximum security and efficiency, while you focus in
adding value to your product.
Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Basically, all driver file names should start with the driver type as
prefix: wdt_ in case of watchdogs here, and not something custom like
wdog_.
For clarity, wdog_ prefix could be changed to wdt_ in the source code
also but that's a detail and will not be addressed here.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Basically, all driver file names should start with the driver type as
prefix: wdt_ in case of watchdogs here.
Maybe 'iwdg' keyword could be removed entirely, and also in function
names. However that is not the scope of this patch.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
We had both kernel and os as domains covering low level layers, just use
one and fix the issue of the os domain not being registered.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add board support (and documentation) for the Intel Gordon Peak
Module Reference Board, a dev board based on the Apollo Lake SoC.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Add a version check to allow building with older GCC versions that did
not support this option.
Fixes#16607
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The _k_mutex linker section is used to gather instances of
struct k_mutex into a list so that init_mutex_module() could iterate
that list to perform runtime initialization tasks. In this case, we're
not defining a struct k_mutex but rather a struct pthread_mutex which is
a completely different structure. Not only those struct pthread_mutex
would be corrupted with unexpected data, but since they're not the
same size as struct k_mutex, the actual struct k_mutex instances that
follow in the list would be misaligned and get corrupted too.
There is nothing that requires runtime initialization in the static
definition of a struct pthread_mutex so let's remove the section
attribute.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit fixes the zassert_mem_equal macro to properly print
the formatting string is given as a parameter by the user.
There is an error that is an effect of directly copying the
previous implementation that was using the inline function.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
The compiler and linker was generating errors after
disabling `CONFIG_EXTI_STM32` due to inconsistency
in `interrupt_controller/CMakeLists.txt`
and not considering this option in gpio implementation.
Signed-off-by: Maciej Zagrabski <maciej.zagrabski@grinn-global.com>
These events aren't errors at all, but rather part of normal operation.
They shouldn't trigger error messages, especially given that the console
gets absolutely flooded with them if power management is activated.
Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se>
When mcumgr smp data was received over shell uart transport
it was not waking up shell thread and thus request was not
processed. Shell thread must be waken up on any incoming
data, even data which is only dedicated for mcumgr smp.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This documents the context in which callbacks are run, that is now
the System Workqueue.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Disable flow control with POSIX_ARCH since these boards tend to run
faster than normal defering the TX callback to system wq may not be
able to run before another packet is received.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes the transmission complete callbacks to run on system wq
context so they are not executed in TX thread which usually has a much
smaller, and non-configurable, stack size.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This reworks bt_gatt_notify_cb to allow passing an UUID, in addition to
that it can now accept multiple notification at once as there could be
multiple instance of the same UUID the user can set multiple set of
parameters.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This make use of bt_gatt_foreach_attr_type in gatt show-db to match
attributes by UUID.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This make use of bt_gatt_foreach_attr_type to match the CCC UUID which
previously was not possible with bt_gatt_foreach_attr.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds bt_gatt_foreach_attr_type which can match attribute by UUID
and/or attribute user_data, in addition of that the user can also limit
the number of matches.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>