The CCP API for the Call Control Profile works on top of the
TBS API, and will eventually replace parts of the TBS API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If a time-intensive task (like coredump storage over logging interface)
is run in the task watchdog callback, the hardware watchdog might
reset the system before the task finishes.
Increasing the delay from 1s to 10s, which should be sufficient for any
use case.
Signed-off-by: Martin Jäger <martin@libre.solar>
The commit changes requirements for stream_flash_init, where size
can no longer be 0 and has to be explicitly set, to avoid situation
where size autodetection, invoked by size == 0, would miss changes in
layout and silently allow overflow of Stream Flash into other partitions.
There has also been new Kconfig option CONFIG_STREAM_FLASH_INSPECT,
set to y by default to keep legacy behaviour, that can be used to turn
off stream_flash_ctx vs device inspection, allowing user to shed
inspection code once it is not useful anymore.
Fixes: #71042
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
The commit moves Settigns initialization out of stream_flash
initialization function into: stream_flash_progress_clear
stream_flash_progress_load and stream_flash_progress_save.
This slightly increases code size (~56 bytes on Arm) but allows
to initialize Stream Flash even if Settings subsystem fails
to initialize and continue providing its basic functionality.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
If logging (CONFIG_LOGGING) was disabled, then the shell
could not build. Ideally the (test) functions should not
depend on logging, but rather only CONFIG_BT_TESTING.
The shell commands were also properly guarded.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
RFC6455 section 5.1 specifies that "A server MUST NOT mask any frames
that it sends to the client". Implement this for websocket write calls
via ZVFS, by storing in the websocket_context whether a socket is acting
in the client or server role, and using this to determine if sent data
should be masked.
Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
Adds a new error code that can be used to signify that a query was
valid but the response was not valid
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The DHCPv4 options always assigns the DNS address if the router
provides one through the DHCP callback. There are times a developer
may not always want to assign the server from the router, but only
manually assign them. Adding a Kconfig option for assigning the DNS
address and defaulting to true to not interfere with previously
expected functionality.
Signed-off-by: Kris Wolff <kwolff@wavelynx.com>
Latest supplicant uses 1K buffer size for sending control message via
socketpair, so reducing the NET_SOCKETPAIR_BUFFER_SIZE to save memory
footprint. There are 4 socketpairs for supplicant only case, and 6
socketpairs for hostapd case, update the heap size correspondingly.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Refactor the NRF_ECB isr_ecb function to reduce redundant
common code.
Updated the unit tests to use Bluetooth Specification
defined test vectors.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The cdc-acm workqueue thread name is set before initializing it right
now, which results in an empty thread name as apparently it gets cleared
by k_work_queue_init. Fix it by moving the thread name setting after the
workqueu is initialized and started.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The functions did not verify the provided parameters before
sending it as a control point operation.
This also fixes a bug where BT_BAP_BIS_SYNC_NO_PREF was not
allowed when pa_sync=0.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.
Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Check that the GATT settings added when bonding to a peer and
subscribing to a CCC are correctly deleted when calling `bt_unpair`.
Testing hooks have been added in the Bluetooth settings abstraction
layer to know which key are being added/deleted.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
`bt_gatt_clear_cf` was calling `bt_settings_delete_ccc` instead of
`bt_settings_delete_cf`. This was causing some settings to be left over.
Fix the issue by using the correct function.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
For waking up the poll() use eventfd() instead of socketpair()
so we save some buffer space and one file descriptor.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
For the shell RFCOMM case, these is a stack overflow problem when do
disconnect, so need to increase the CONFIG_BT_RFCOMM_DLC_STACK_SIZE.
Set CONFIG_BT_RFCOMM_DLC_STACK_SIZE default 512.
Signed-off-by: Make Shi <make.shi@nxp.com>
gatt_unregister() clears handles if those were auto-assigned by host.
This resulted in Service Changed indication not beding sent since
call to sc_indicate() pass already cleared handles.
This was affecting GATT/SR/GAS/BV-01-C and GATT/SR/GAS/BV-07-C test
cases.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The BASE doesn't affect the BIS sync value, and should thus not
change it.
This fixes a bug where the broadcast sink may prematurely
set the BIS sync value to e.g. 1 before actually
syncing to the BIG.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When all sectors have non-zero data, NVS would fail to init.
Add recovery path option to erase the all sectors and reinitialize.
This could occur due to non-empty sectors, or corrupted data.
Signed-off-by: Cory Andrew Mayer <corymayer@meta.com>
add test for reconfigure, release, suspend, abort and disconnect.
app_config_req and app_reconfig_req always accept the req,
so don't need to handle reject case.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
Implement the bt_a2dp_stream_reconfig: Modify reconfig_req callback to
pass codec_cfg to application. Remove reconfig_rsp callback,
config_rsp is used. Remove reconfigured callback,
configured callback is used.
move the status to common struct bt_avdtp_req,
use same bt_avdtp_ctrl_params to process control-like avdtp
cmds (start, open etc), use the same a2dp_ctrl_ind to process
control-like cmds (start, open etc), use the same
bt_a2dp_ctrl_cb to process control-like cmds (start, open etc),
use the same bt_avdtp_ctrl to process control-like cmds
(start, open etc), optimize getting a2dp conn by index,
use sem to replace mutex and optimze the lock codes to be
based on context/instance.
Signed-off-by: Mark Wang <yichang.wang@nxp.com>
The commit adds Kconfig option CONFIG_STREAM_FLASH_POST_WRITE_CALLBACK
that allows to turn off support for callback invoked after data
is written to storage device.
If the feature is not used disabling it allows to save some storage.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Calling `net_buf_reserve` removed any previous reservation, which
includes the reservation by hci_ipc to hold the H4 type byte. This
resulted in a out-of-bounds net_buf_push in hci_ipc.
This commit also enables asserts in hci_ipc in the audio bsim test,
which reveal the out-of-bounds write.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Cmd_register uses a fixed channel as the rfcomm channel. Cmd_register
doesn't require parameters for channels.
Signed-off-by: Make Shi <make.shi@nxp.com>
Previously added type casting was still causing coverity to complain.
This time casting multiplication before bitshift operation.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Retreiving IP address from the networking interface assigned to
a PTP port could result in NULL dereference or undefined behaviour
when passing NULL to `memcpy()` function. Added check on addresses
returned from functions retreiving IP address from an interface.
Signed-off-by: Adam Wojasinski <awojasinski@baylibre.com>
Add support for the bt_hci_evt_le_cis_established_v2 event in
the host.
This provided additional information to the host and application
about the CIS paramters. Especially the peripheral gets new an
important information such as the SDU size and interval.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>