- Add sink PACS register for PBP public broadcast sink example to make
it work with PBP broadcast source
Signed-off-by: Vinit Mehta <vinit.mehta@nxp.com>
Corrected a typo in the project name within the Bluetooth
samples directory. The incorrect name was causing confusion
in documentation and build processes. This change updates
the relevant file(s) to use the correct project name, ensuring
consistency across the Zephyr repository.
Signed-off-by: Gomaa Mohammed Eldebaby <gomaaeldebaby2211@gmail.com>
Add a workqueue to handle readvertisement after
disconnection from central. This avoids performing
advertising operations directly from the disconnected callback,
ensuring better thread safety.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Avoid busy-looping before BLE connection and introduce
a semaphore. Check for NULL conn before retaking
semaphore after disconnection.
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Avoid redeclaring 'err' inside a nested block, which shadowed the outer
definition.
This cleanup prevents confusion and potential logical bugs.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Added bt_le_set_default_phy in hci. This handles
the HCI_LE_Set_Default_PHY HCI command.
Added call to bt_conn_le_set_default_phy in central_gatt_write and
peripheral_gatt_write samples.
Signed-off-by: Ravinder Singh <ravinder.singh2@infineon.com>
The code was accessing bits 1 and 2 (but not 0), effectively needing three
bits, but still requesting only 2 when calling ATOMIC_DEFINE().
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Previously, reponse slot value is 5* 1.25ms = 6.25ms , on nxp rw61x
platform, host got the periodic adv report v2 and after about 6ms,
send reponse data cmd, it is too late , so always rpt the 0x46 too
late err code to host , in order to send the response , so make rsp
delay update to 10ms.
Signed-off-by: Alex Zhou <alex.zhou@nxp.com>
- Added support for CAP_COMMANDER in configuration to allow tmap-cg
and tmap-ums roles to be validated. For CG and UMR, CAP INITIATOR
and CAP COMMANDER roles are mandatory. Without this support, config
"CONFIG_BT_TMAP_CG_SUPPORTED" & "CONFIG_BT_TMAP_UMS_SUPPORTED" are
not getting defined and function fail during "valid_tmap_role()".
- Replaced iso_pool user-data size from 8 to kconfig setting
"CONFIG_BT_CONN_TX_USER_DATA_SIZE" to allow conn_iso_send()
to success. Without it the user-data for iso_pool configured
with value 8 but the kconfig "BT_CONN_TX_USER_DATA_SIZE" has
default value as 16 causes conn_iso_send() function to fail.
- Updated audio_timer_timeout() with expected QoS interval value
to send ISO_SDU at every 10msec instead of 1 sec. Without this sink
device receiving null-sdu most of the time as ISO interval is 10ms
and unicast-source keep sends SDU at every 1 sec.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
This is an X86 specific option and should not appear as generic debug
option.
Fixeszephyrproject-rtos/zephyr#52929
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Modify the reset function to also reset the connection and
PA sync states.
Modify and add missing checks for mutex locks to use ASSERT
when using K_FOREVER, as they should never fail/timeout.
Cleanup some text and error checks.
Ensure that the add_src_param is reset for each loop
iteration as well.
Modify so that we use K_FOREVER fewer places.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The hci_ipc sample does not support fragmentation of IPC-messages.
Give an ASSERT if only parts of an IPC-message is delivered.
This would happen for instance when the underlying transport mechanism
cannot hold the complete message.
Background:
The open-amp backend uses RPMSG_BUFFER_SIZE=512
Most applications and controllers use HCI-packets which are at most
255 bytes. In some cases a controller may deliver HCI-packets beyond
255 bytes.
This may for instance be the case if the controller delivers large ISO
SDUs as a single HCI-packet.
Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
Adds a new abstract struct for unicast group that is
specific for CAP. The difference between this and the BAP
unicast group, is that the parameters are CAP streams and
thus ensuring that the streams in the group adhere to the
additional requirements that CAP has on top of BAP.
This also adds foreach functions for both CAP and BAP
to allow users to iterate on the streams in the
abstract groups.
Various samples, modules and tests have been updated
to use the CAP struct and API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When compiling with sysbuild and IPC the samples would use the
nrf5340_cpunet_iso-bt_ll_sw_split.conf config file, which was
incompatible with the sample's host configuration.
Instead of using the ISO configuration file, define a hci_ipc
overlay in each sample with the necessary configurations
that support all host configurations.
This commit also updates the sample.yaml files to split
configurations for single- and multicore builds, as what
needs to be configured for each type is different.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Enable the standby power state by default for the rd_rw612_bga and
frdm_rw612 boards in the peripheral_ht and central_ht Bluetooth samples.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
- "bt_le_adv_update_data()" func calls just after bt_enable() call
without completion of bt_ready() which is called as part of worker
thread within init_work() causes issue where bluetooth controller
has not been initialized and provides cb to app before app requests
advertise_update to the stack.
- remove bt_ready() func and place content within main() post
bt_enable() fixes this issue.
Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
For the BAP broadcast sink sample handling of requested BIS sync set
to BT_BAP_BIS_SYNC_NO_PREF for one or more subgroups is now added.
In case of no preference of requested BIS then sync is adjusted to the
number of streams available when no target allocation present.
Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
With recent changes to the host stack and crypto subsystem, the actual
usage of the system and long workqueues has changed.
Here's the measured usage when doing LE SC pairing on a Cortex M0 target:
BT LW WQ : STACK: unused 360 usage 1040 / 1400 (74 %); CPU: 4 %
sysworkq : STACK: unused 0 usage 1024 / 1024 (100 %); CPU: 0 %
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The central_multilink sample issues various API calls
(in particular because it does some from the bt_workq("BT RX WQ"))
this results in a deadlock since there are not enough
HCI command buffers available, this is causing deadlocks on hardware
that do not support BT_HCI_ACL_FLOW_CONTROL.
Below is the flow where assert is observed:
bt_hci_le_enh_conn_complete() -> bt_conn_connected()
-> connected() callback -> start_scan() -> bt_le_scan_start()
-> set_random_address() -> bt_hci_cmd_send_sync: opcode 0x2005
-> Controller unresponsive, command opcode 0x2005 timeout with err -11
Since the start_scan is called from the callback and BT RX WQ thread,
the command buffers are still not available for the system work queue
to process the hci commands it has to send out for starting the scan.
By adding additional buffers this deadlock can be avoided.
Signed-off-by: Gudipudi Ramana Kumar <ragudipu@silabs.com>
Increase scan aux sets to support interleaved extended
advertising reception in hci_ipc ISO support configuration
in nRF5340 HCI ISO Controller.
CONFIG_BT_MAX_CONN is reduced accordingly as ticker node
instances are shared across all state/role scheduling in the
Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This non-standard feature never had any proper host side implementation
(e.g. it was never upstreamed to BlueZ), and since it comes with notable
maintenance overhead it's fair to just remove it.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Encode the packet type as a H:4 payload prefix for buffers passing to &
from HCI drivers. The existing bt_buf_set/get_type functions are
deprecated, but kept compatible with the change, except that they can only
be called once, since they modify the buffer payload.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The valid check was incorrect and instead set valid_data to
false for valid data, and true for invalid data.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added overlay file to support nRF5340 audio dk + nRF21540
FEM.
Build the hci_ipc with corresponding overlay file to use the
nRF21540 FEM with the bap_broadcast_source sample on nRF5340
audio kit.
Use the below commandline:
$ west build -b nrf5340_audio_dk/nrf5340/cpuapp --sysbuild \
samples/bluetooth/bap_broadcast_source \
-DDTC_OVERLAY_FILE= \
boards/nrf5340_audio_dk_nrf5340_cpuapp_nrf21540_ek.overlay \
-Dhci_ipc_DTC_OVERLAY_FILE= \
boards/nrf5340_audio_dk_nrf5340_cpunet_nrf21540_ek.overlay
Related to commit 35ad653038 ("samples: Bluetooth:
hci_uart/hci_ipc: CI coverage for nRF53+nRF21 FEM").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If the AG works as Data Channel Acceptor, the ACL conn cannot be known
by the application of AG. Similar with HF, add ACL conn as the first
parameter to the `connected` callback of AG.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The CS complete callbacks provide both status and params.
In the case of errors, NULL pointer is passed to the params of callbacks.
Signed-off-by: Ryan Chu <ryan.chu@nordicsemi.no>
- Extended the DIS sample to showcase all possible
fields using placeholder values.
- UDI issuer strings use a 'private' ODI which is
unregistered.
Signed-off-by: Sean Kyer <Sean.Kyer@analog.com>
OVERLAY_CONFIG has been deprecated and replaced by
EXTRA_CONF_FILE. Update samples to reflect that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The stack will no longer implicitly set the data path
for ISO channel, and the responsibility for doing that is
now for the upper layers/applications.
This provides additional flexibility for the higher layers
as they can better control the values and timing of the data
path, as well as support removing and even reconfiguring the
data path at will.
This also removes some complexity from the stack.
This commit also fixed a inconsistency in the disconnected
handler. CIS for centrals as well as BIS were still valid
bt_iso_chan channels in the disconnected callback,
but CIS for peripherals were completely cleaned up at this
point. This issue is fixed by moving the disconnected callback
handling to before the code to cleanup the channel for
peripherals.
Since there is a difference in how you remove data paths
depending on the GAP role (central/peripheral), the
iso_info struct type has been expanded to be more
concise of which type of CIS it is.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>