Because we might get answers in capital letters, convert the answer
to small case letters and also make sure we send query in small case
latters. This makes sure that our query_hash is properly calculated
regardless of how the resolver gets the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Allocate one extra pointer for the DNS server list so that
DNS resolving code can detect the end of the list.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Most boards set zephyr,bt-mon-uart to point at the same device as
zephyr,console. It's still useful to have the possibility of having these
as two different devices, however it's useful to fall back to the UART
console in case a dedicated monitor UART hasn't been specified.
This also ensures that the fallback only happens if the console UART isn't
enabled, but a DT chosen property exists for it. Additionally, we now get a
user friendly error in case the Bluetooth UART monitor feature has been
enabled in Kconfig but there isn't a suitable UART available for it in
devicetree.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The current implementation casts the user data to the attribute value,
which makes an assumption about the user data. This commit changes the
implementation to use the attribute value read function when extracting
the characteristic properties.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
In receiving thread, continuing the loops is based on
has_ongoing_exchanges() so it does not need atomic
coap_client_recv_active variable.
When idling, it wakes from semaphore. But there was potential
deadlock when coap_client_schedule_poll() would not signal the
semaphore, if atomic variable was already showing that it runs.
Removing the atomic variable removes this deadlock.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
It is error prone to flag separate booleans, so try to use
reset_internal_request() every time we release the internal request
structure.
Also refactor the reset_internal_request() so that we reset the
timeout value so it does not trigger again.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If send() fails, we have not technically send the CoAP retry yet, so
restore the same pending structure, so our timeouts and retry counters
stay the same.
This will trigger a retry next time the poll() return POLLOUT, so we
know that we can send.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Refactor the CoAP retry handling into the handle_poll() function,
so that we only try to send retries if the socket reports POLLOUT.
Also move the receiving into same loop, so when poll() reports POLLIN
we recv() the message and handle it before proceeding to other sockets.
Also fix tests to handle POLLOUT flag and add support for testing
multiple clients.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
When transmission of first request fails, reset the internal request
buffer as there is no ongoing CoAP transaction.
Application can deal with the failure.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
If POSIX_API is not configured the close function is not available.
Use zsock_close instead.
Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
Add TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 to the list for use with x509
certificates. The LWM2M v1.1 specification says that a LWM2M client
which used X509 certificates must support this ciphersuite and
additional ciphersuites may be supported.
Signed-off-by: Jeroen Broersen <jbroersen@interact.nl>
The MCUmgr statistics only work correctly when selecting
MCUMGR_SMP_LEGACY_RC_BEHAVIOUR option. Checks the option
flag on the stat_mgmt_list and fix the behavior.
Fixes: 80476
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
This header requires bluetooth.h but was not including it itself.
Due to this we had 2 tests failing to build.
Let's just include the dependencies to this header instead of
relaying on users including the dependencies dependencies in
the right order.
Also, let's add an include guard as in a test this header was
included twice leading to weird build errors.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The second condition needs to check ARP probes only
The ACD is not properly implemented as described in RFC5227 ch. 2.1.1
The implementation incorrectly detects an IP conflict, if an ARP request
is received for the target IP.
The reason is that the current implementation checks for ARP requests
instead of ARP probes.
Signed-off-by: Andreas Huber <andreas.huber@ch.sauter-bc.com>
This resolves some addressed comments in this PR
https://github.com/zephyrproject-rtos/zephyr/pull/77930
It adds as well a section in the documentation about some
recommendations to increase ZMS performance.
Signed-off-by: Riadh Ghaddab <rghaddab@baylibre.com>
Fix compile error when BT_CTLR_PRIVACY is disabled. Compile
error seen building hci_uart sample for nrf54l15dk.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix incorrect use of BIS indices to dereference the payload
array, instead correctly use synchronised stream indices.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix discrepancy in reference management between calls to
`bt_l2cap_chan_ops.recv` when the application returns `-EINPROGRESS`.
There are two call sites, `l2cap_chan_le_recv_sdu` and
`l2cap_chan_le_recv`, that were inconsistent.
`l2cap_chan_le_recv_sdu` moves the reference, and this patch updates
`l2cap_chan_le_recv` to do the same.
This behavior is also now documented.
This bug has existed since the introduction of this feature in
3151d26572.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This allows to build the shell with BT_CTLR_DTM and/or BT_CTLR_ADV_EXT
enabled.
The issues has been introduced by commit
bf897cf941 (Bluetooth: Shell: Restructure
shell files).
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Before this patch, any unexpected socket error during poll (caused by
LTE disconnects for instance) would lead to a infinite loop because the
error state was never cleared, handled or even signaled to the user.
Signed-off-by: Benjamin Lindqvist <benjamin@eub.se>
The cache_size and lookahead_size are set at compile time using the
CONFIG_FS_LITTLEFS_CACHE_SIZE and CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE values
from Kconfig, or from the cache-size and lookahead-size properties in a
'zephyr,fstab,littlefs' compatible in the devicetree. Those values are
also used to statically allocate buffers that are pointed at by the
read_buffer, prog_buffer, and lookahead_buffer members of the lfs_config
structure.
At runtime, when using a block device, the cache_size and lookahead_size
are updated to be multiples of the underlying block device's block_size,
which may make them bigger than the original size used to allocate the
static buffers. Log an error and fail the operation when this occurs.
Signed-off-by: Phil Hindman <phindman@xes-inc.com>
Added check where stream_flash_erase_page checks if requested
offset is actually within stream flash designated area.
Fixes#79800
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Removed the LE Audio specific definition and instead
refer to the value defined by iso.h as it is ISO/Core
that defines this size, and not BAP/Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The bis_iso_qos.rx was missing in param sent in bt_iso_big_sync
Also, MSE = 0 is valid (fixed error check)
Signed-off-by: Lars Knudsen <LAKD@demant.com>
The NET_SOCKET_SERVICE_SYNC_DEFINE_STATIC() macro was changed
earlier but the compilation error was missed. Fixing the macro
call.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The value of err was not initialized to 0 prior
to calling shell_strtoul, which only sets err
on actual error.
Signed-off-by: Lars Knudsen <LAKD@demant.com>
As the socket service API is currently used by mutiple applications
(dhcpv4 server, dns, telnet), it should be marked as unstable,
according to the docs:
https://docs.zephyrproject.org/latest/develop/api/api_lifecycle.html
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Removed the generation of broadcast id inside the stack. It is now up
to the application to generate this by itself. The CAP sample has
been modified to allow either a static broadcast, or a random one.
All of this is handled in the application.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
The 12-bit signed values for the results of PBR are a bit
cumbersome, so this adds a helper function to make it easier to work
with the HCI formatted steps.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Add unit tests for bt_le_cs_step_data_parse.
Also exit early (without calling the function pointer) if the next
step would seem to read out of bounds.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Add a generic function to retrieve any data based on an
assigned numbers type. This function can in theory be
used for any data type, and not just LE Audio types, but
since it relies on bt_audio_data_parse it was made
specificially for LE Audio.
The function can be used in cases where
bt_audio_codec_cfg_get_val, bt_audio_codec_cfg_meta_get_val,
bt_audio_codec_cap_get_val or
bt_audio_codec_cap_meta_get_val (or their derivation)
are not easily applicable due to the type constrainst.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Originally, the net_mgmt task priority is very low. Based on roaming
implementation, roaming is triggered in net_mgmt task. When running UDP
test while doing roaming, the net_mgmt task won't have much chance to
run and roaming can't be triggered.
Increase it to 3, which is same value of supplicant task.
Signed-off-by: Hui Bai <hui.bai@nxp.com>