Use NULL instead of "", fix typos, and indicate app-key-add last
parameter as optional (to match the command implementation).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add support for sending messages that add, delete or overwrite Label
UUIDs, and add commands for these to the shell. With the help of these
commands it's possible to pass Transport Layer PTS tests (in
particular TNPT/BV-05-C) by manually adding a Label UUID through
module subscription, since the test case itself does not do this.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
QEMU_INSTANCE should be a parameter to *make*, not cmake, so people
can run few instances of the same sample without building each of
them separately in separate dirs.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Compute the length of the TX payload that is transported in one
IPv4 or IPv6 datagram taking into account UDP, ICMP or TCP
headers in addition to any IPv6 extension headers added by RPL.
The TCP implementation in Zephyr is known to currently carry at
maximum 8 bytes of options. If the protocol is not known to the
stack, assume that the application handles any protocol headers
as well as the data. Also, if the net_pkt does not have a
context associated, length check on the data is omitted when
appending.
Although payload length is calculated also for TCP, the TCP MSS
value is used as before.
Define IPv4 minimum MTU as 576 octets, See RFC 791, Sections 3.1.
and 3.2.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The code would unconditionally clear sent_req in update_timeout(),
which would e.g. cause us to switch to Friend Polls if the Friend
didn't respond to a Subscription List Add/Remove on the first attempt.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The purpose of using something less than the configured poll timeout
was to cover the case where the LPN establishes Friendship before the
provisioner has completely configured it. However, there's the "more
data" flag in the initial Friend Response, and we now also have a
public API to request for more messages. Both of these features
diminish the value of having a reduced initial timeout. Also, some LPN
test cases do not expect us to send frequent polls initially, causing
failures with the PTS.
Therefore, introduce a Kconfig option to set the initial timeout, and
make it default to the actual poll timeout.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Many apps, the mesh shell included (due to PTS test requirements)
benefit from exposing LPN state and polling outside of the stack.
Introduce new APIs for these, and add code to the mesh shell module to
take advantage of them.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/5097.
The desired behaviour is that when a flag that is given through the
zephyr_* API conflicts with the zephyr_library_* API then precedence
will be given to the zephyr_library_* API. In other words, local
configuration overrides global configuration.
We choose to rely upon the compiler for sane behaviour when flags are
in conflict. Compilers generally give precedence to flags given late
on the command line. So to ensure that zephyr_library_* flags are
placed late on the command line we create a dummy interface library
and link with it to obtain the flags.
Other options were considered, source file properties would also have
higher priority. But that would have required some kind of
post-processing stage that applies all the source file properties.
Linking with a dummy interface library will place flags later on the
command line than the the flags from zephyr_interface because
zephyr_interface will be the first interface library that flags are
taken from.
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
The Health Fault Test & Test Unacknowledged messages are supposed to
be sent for more than the Node Composition Data Company ID. It's true
that some PTS tests require the message to be ignored for
non-composition data ID, however that's something that should be
covered by the application that's used for testing, and not the
generic Health Server Code.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add support for sending Health Attention messages, as well as commands
to use these new APIs from the shell.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There was a lot of code duplicated in the Foundation Client Models for
waiting on a specific status message. Refactor this into helper
functions (one per client model).
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add support for sending Health Period messages, as well as commands to
use these new APIs from the shell.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The Company ID 0xffff is treated as invalid in some contexts, so use a
valid one. Also, the Health tests require the Health Fault Company ID
to match that found in the Composition Data.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a callback to the Health Client Model context, so that the
application is able to receive Health Current Status messages that
some Health Server Model publishes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add the needed Health Client API for sending Health Fault Get, and add
a command to the shell to utilize it.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Not all boards require the various binary formats zephyr generates. So
be selective based on the arch, SoC or board and only geenrate the
binaries actually needed.
Fixes#5009
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
With the introduction of controller's advanced features
Kconfig option, some of the dependent options where not
enabled in the init tests build. Fixed by enabling the
advanced features Kconfig options.
Also, updated conf files to reflect latest set of Kconfig
options supported by the Bluetooth controller subsystem.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixes the following compile error when CONFIG_BT_CTLR_LE_ENC
is disabled:
subsys/bluetooth/controller/ll_sw/ctrl.c: In function
'isr_rx_conn_pkt_ctrl':
subsys/bluetooth/controller/ll_sw/ctrl.c:2613:29: error:
'LLCP_ENCRYPTION' undeclared (first use in this function)
(conn->llcp_type != LLCP_ENCRYPTION)) ||
^~~~~~~~~~~~~~~
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixes:
subsys/bluetooth/host/hci_core.c: In function ‘set_static_addr’:
subsys/bluetooth/host/hci_core.c:4043:1: error: label ‘generate’ defined
but not used [-Werror=unused-label]
generate:
^~~~~~~~
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
As the nRF5x BLE controller uses TIMER1, TIMER2 and PPI
indices 0-13 (and 14-15, if PA/LNA feature is enabled),
the software based PWM driver needing 6 PPI channels has
to use PPI indices outside the BLE controller used range.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
PA/LNA feature being not default enabled, keeping the PPI
indices used for this feature at the higher indices would
allow use of these PPI indices by other drivers, for
instance the nRF5 software PWM driver.
Software PWM driver provides 3 PWM pins/channels using upto
6 PPI channels. If BLE controler where to use 0-13, then
14-19 PPI indices can be used by the PWM driver.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
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>
Run file through doxygen -u doc/zephyr.doxyfile and generate
a clean config with latest options and documentation.
Signed-off-by: Anas Nashif <anas.nashif@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>
Replace use if void * declaration related to memq links with
more readable memq_link_t.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>