If the Broadcast ID is initially set to 0x000000,
which is valid, comparison logic on add of an
actual Broadcast ID of 0x000000 fails.
Likewise for SID.
Moving INVALID_BROADCAST_ID define to bap.h
Signed-off-by: Lars Knudsen <LAKD@demant.com>
Two ethernet capabilities were missing. Added them to allow
the 2.5G and 5G strings to appended.
Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
CONFIG_ZVFS_POLL_MAX is now used to control the maximum number of poll()
entires. Thereby, CONFIG_NET_SOCKETS_POLL_MAX is redundant and shall
be deprecated.
Modify the defaults for NET_SOCKETS_POLL_MAX and ZVS_POLL_MAX so that
the deprecation actually makes sense instead of symbol removal. In case
the application still sets the old config, it will modify the
ZVS_POLL_MAX default.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit adds support for reading and parsing binary descriptors.
It can be used for reading the descriptors of another image, or for
iterating over one's own descriptors.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Add a Kconfig symbol to limit the maximum size of a descriptor's
data, enforced by a build assertion.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Prior to this fix the descriptors end tag was placed in the binary
using LONG. This was wrong because the tag is of type short, and
the size of the descriptor (0), should have also been placed.
It so happened that on little endian machines the incorrect linker
script yielded correct results, as the extra zeros added to make
the value a long ended up as the correct byte sequence
(FF FF 00 00). On big endian machines however, the wrong sequence
is generated (00 00 FF FF).
This patch correct this issue.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
Adds supporting code that allows the RAM load mode of MCUboot to
be used and for applications to build successfully with it.
Sysbuild can be used to build images for this mode
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Use a separate workqueue instead of system workqueue for connection TX
notify processing. This makes Bluetooth stack more independent from the
system workqueue.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
The code in shell_ops.c that calls telnet_write will assert if it
returns non-zero. For a telnet shell it's normal that the
network might disconnect unexepectedly, so that should not
trigger an assert.
Fixes#67637
Link: https://github.com/zephyrproject-rtos/zephyr/issues/67637
Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
Notifying users that the supplied timeout is being ignored is worthy of
a higher log level than debug. Any such usage should be changed at the
application level.
Signed-off-by: Jordan Yates <jordan@embeint.com>
In case of UATT, if a connection was lost while user was holding a read
or write attribute callback, `bt_l2cap_send_pdu` (called from
`att.c::chan_send`) will anyway queue a PDU and trigger tx work. The PDU
won't be sent eventually, but neither will hold an error code, which
will allow it to bypass the error check in `att_on_sent_cb` and call
`att_sent` function.
For EATT `bt_l2cap_chan_send` is used which already handles this case
and the error code is passed to `att_on_sent_cb`.
This change adds connection state check to `bt_l2cap_send_pdu`
preventing from unnecessary code execution when connection does not
exist anymore.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The timeout state is local and can block new ATT operations, but does
not affect the remote side. Disconnecting the GATT connection upon ATT
timeout simplifies error handling for developers. This reduces rare
failure conditions to a common one, without needing special cases for
ATT timeouts.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add optional statistics around the channel publishing action. Store the
time a channel was last published to, and a total publish count.
This information can be used to determine how old a given channels data
is, and an average channel publishing frequency.
Signed-off-by: Jordan Yates <jordan@embeint.com>
ZBus currently does not have a `HEAP_MEM_POOL_ADD_SIZE_ZBUS` when using
message subscribers or runtime observers, forcing the developer to set that
manually. Adding the configuration option to zbus would improve its
usability and make zbus easier to use. With this feature, zbus aligns with
the other Zephyr subsystems' heap memory allocation approach.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Add scan cb to scan delegator so that Application
can be notified when assistant starts or stops
scanning.
Also state information of Broadcast Assistant
is removed as info is not used.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
msghdr_non_empty_iov_count() is used by TLS sockets too therefore should
be available regardless of native IP sockets being enabled or not.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
When CONFIG_LOG_OUTPUT is set, it indicates that logging strings
are formatted by the application (using log_output module). It is
not needed when backend works in the dictionary mode. So far
LOG_OUTPUT was set also when dictionary mode was used and that
prevented removing of the logging strings from binary which is
an important feature of the dictionary logging.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Move log_output_flush and log_output_write (renamed internal
buffer_write() function) to the header as inline functions.
Those function are used by log_output_dict.c and there are cases
when log_output.c is not compiled in.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
IPv6 based interface lookups doesn't require native IP stack support,
hence reflect that in the API.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Fix incorrect elapsed events value when event prepare are
aborted in the pipeline. This caused premature supervision
timeouts.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix BT_CTLR_SCAN_AUX_SYNC_RESERVE_MIN such that event is not
aborted when near supervision timeout conditions.
Relates to commit ddf04997a5 ("Bluetooth: Controller: Add
abort fairness in overlapping Periodic Sync").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce BT_CTLR_PERIPHERAL_ISO_RESERVE_MAX Kconfig option
so that disabling this option will use minimum time
reservation and exercise the peripheral ISO connection event
continuation using is_abort_cb mechanism.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Introduce BT_CTLR_PERIPHERAL_RESERVE_MAX Kconfig option so
that disabling this option will use minimum time reservation
and exercise the peripheral connection event continuation
using is_abort_cb mechanism.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
seperate the autohandler from the main
hawkbit source. This way the autohandler can
be disabled if it is not needed.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add function to get the poll interval.
This is needed to seperate the autohandler
from the main hawkbit code.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
* Setting the adv data, scan rsp and adv aux ad data can happen on
overlapping buffers
* There can be other memcpy's that need to be changed to memmove but
these are the only ones I could reproduce the issue and since memmove
has a performance penalty, I left the others as is.
Signed-off-by: Yago Fontoura do Rosario <yafo@demant.com>
Remove the `work_q` parameter from `NET_SOCKET_SERVICE_SYNC_DEFINE` and
`NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC` as this feature was dropped
during review but the removal was not 100% complete.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Added a generic function `z_shell_backend_rx_buffer_flush` to clear
the RX buffer when resuming the shell. The function repeatedly calls
the backend's `read` API until the buffer is empty or a maximum of
1000 iterations is reached. This prevents unintended command
execution after `shell_start`.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
Decoder was casting uint8_t pointers to uint64_t pointers which could
result in double word instruction which does not support unaligned
access on Cortex-M. Issue was revealed when -O3 optimization was
used instead of -Os. In size optimized version, compiler was
using word load and store instructions which support unaligned
access and issue was not visible.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
To improve performance in FCS calculation, this commit replaces
the usage of the generic `crc8` function with the specific `crc8_rohc`
function in `modem_cmux.c`.
The `crc8_rohc` function utilizes a small table approach, enhancing
the efficiency of CRC-8/ROHC variant calculations while optimizing
memory usage.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Modify the BAP unicast client callback structure to be a
linked list. The purpose of this is to have multiple listeners
of the unicast client changes and notifications.
This is needed for the CAP initiatior.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit:
- creates 2 new files, jwt_ecdsa.c and jwt_rsa.c, to hold the
implementations of the corresponding ECDSA/RSA signature
algorithms;
- RSA signature is stil done through Mbed TLS's PK module which
can optionally make use of PSA (if enabled);
- ECDSA signature will instead use PSA, if possible, or TinyCrypt
as fallback.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>