Commit graph zephyr/subsys/bluetooth
Author SHA1 Message Date
Lyle Zhu
99176e86f8 Bluetooth: Classic: OBEX: Expose function bt_obex_string_is_valid()
The `bt_obex_string_is_valid()` is used to check whether the sending
or receiving UTF-16 string is valid or not.

Expose function "bt_obex_string_is_valid()" to support external
checking of UTF-16 strings.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
cf11f71848 Bluetooth: OBEX: Add function bt_obex_add_header_body_or_end_body()
A new function bt_obex_add_header_body_or_end_body() is added to help
to add the body/end body header. When the tail room of the buffer is
more than the passed body room, and the total length of buffer is not
more than the mopl if the body has been added, the header end body
will be added. Or, the header body will be added.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:31:16 +02:00
Lyle Zhu
d14bfb702b Bluetooth: Classic: HFP: Terminate outgoing call without alerting
If the outgoing call is not alerted, support the case to terminate the
call when receiving the AT command `AT+CHUP`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:29:26 +02:00
Lyle Zhu
e61daa9b9b Bluetooth: Classic: HFP_AG: Support Codec mSBC and LC3_SWB
Add kConfig `BT_HFP_AG_CODEC_MSBC` and `BT_HFP_AG_CODEC_LC3_SWB` for
AG to configure the optional Codec IDs.

If the kConfig `BT_HFP_AG_CODEC_MSBC` is enabled, set the feature
`WBS` bit in SDP record.

If the kConfig `BT_HFP_AG_CODEC_LC3_SWB` is enabled, set the feature
`Super WBS` bit in SDP record.

And check the selected Codec ID if it is supported when creating the
SCO connection.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:29:15 +02:00
Lyle Zhu
ebfbe2b754 Bluetooth: Classic: HFP_HF: Set SDP feature bits WBS and Super WBS
According to the HFP V1.9, the SDP feature bit `WBS` should be set if
the mBSC Codec is supported. And the SDP feature bit `Super WBS`
should be set if the LC3-SWB Codec is supported.

Set SDP feature bit `WBS` if the kConfig `BT_HFP_HF_CODEC_MSBC` is
enabled.

Set SDP feature bit `Super WBS` if the kConfig
`BT_HFP_AG_CODEC_LC3_SWB` is enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:29:04 +02:00
Lyle Zhu
dacc2e0051 Bluetooth: Classic: SCO: Fix byte order issue
Change the byte order from CPU to LE16/LE32 for `accept SCO` and
`setup SCO` HCI commands.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
3a2ee4a0e9 Bluetooth: Classic: SCO: Set connect param with default value
In current implementation, the values are fixed for the field
`Max_Latency` and `Retransmission_Effort` of HCI command
`HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request`

It cannot work properly with these fixed value. It is better to
set it with default value. And it is determined by the controller.

Set the field `Max_Latency` and `Retransmission_Effort` of HCI
command `HCI_Setup_Synchronous_Connection` and
`HCI_Accept_Synchronous_Connection_Request` with default value.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
6c83e1a240 Bluetooth: Classic: HFP_AG: Configure voice setting
Set the voice setting according to the selected codec ID.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
a42128bf9b Bluetooth: Classic: HFP_HF: Configure voice setting
Add a filed `active_codec_id` to `struct bt_hfp_hf` to keep the
current codec ID. The default value is `BT_HFP_HF_CODEC_CVSD` when
creating the SLC.

Add a filed `neg_codec_id` to `struct bt_hfp_hf` to flag the
negotiated codec ID. When the AT+BCS command is executed without
error, update the `active_codec_id` with `neg_codec_id`.

Pass the properly voice setting with the `active_codec_id` in
function `bt_hfp_hf_sco_accept()`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
68b1e45cc5 Bluetooth: Classic: SCO: Set voice setting by upper layer
In current implementation, the voice setting of SCO is fixed value
`BT_VOICE_CVSD_16BIT`. It is not aligned with the negotiated codec
id of the HFP.

Add a filed `voice_setting` to `struct bt_sco_chan` that the voice
setting can be configured by upper layer when providing the sco
channel `struct bt_sco_chan`.

Use the `voice_setting` to setup SCO or accept SCO.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:43 +02:00
Lyle Zhu
1edaea146e Bluetooth: Classic: HFP_AG: Update ongoing calls early post SLC setup
There is a corner case that the AT command `AT+BTRH?` is received
before processing the ongoing calls after the SLC established. In
this case the invalid response and hold status will be notified,
because the ongoing calls are not processed.

The ongoing calls should be processed as early as possible after the
SLC established.

Support the case by processing the ongoing calls in the context of
SLC established callback.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:28:32 +02:00
Lyle Zhu
b540fde66b bluetooth: Classic: HFP: Set eSCO S4 bit if controller supports SC
The eSCO S4 settings feature should be enabled for CVSD Coding. It is
suggested by the HFP specification.

Set the eSCO S4 Settings Supported bit if the Secure connection is
supported by controller.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 09:26:21 +01:00
Kai Cheng
f0f2057316 Bluetooth: SMP: refactor SMP connection type checks
Replace direct conn->type comparisons with connection type helper
functions in SMP module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace bt_conn_is_type(conn, BT_CONN_TYPE_LE | BT_CONN_TYPE_BR)
  with !bt_conn_is_br(conn) && !bt_conn_is_le(conn) for clearer logic
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && (conn->type == BT_CONN_TYPE_BR)
  with bt_conn_is_br(conn) for simplified condition

This change completes the connection type helper refactoring across
the Bluetooth host stack, improving code consistency and readability.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Kai Cheng
b0505dbf3d Bluetooth: L2CAP: refactor L2CAP connection type checks
Replace direct conn->type comparisons with connection type helper
functions in L2CAP module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR
  with bt_conn_is_br(conn) for cleaner code
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace chan->conn->type == BT_CONN_TYPE_BR with
  bt_conn_is_br(chan->conn)

This change improves code readability and maintains consistency
with the connection type helper refactoring across the Bluetooth
host stack.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Kai Cheng
0f80444d12 Bluetooth: Core: refactor HCI core connection type checks
Replace direct conn->type comparisons with connection type helper
functions in HCI core module. This includes:

- Update copyright headers to include Xiaomi Corporation
- Replace conn->type != BT_CONN_TYPE_LE with !bt_conn_is_le(conn)
- Replace conn->type == BT_CONN_TYPE_SCO with bt_conn_is_sco(conn)
- Replace conn->type == BT_CONN_TYPE_BR with bt_conn_is_br(conn)
- Replace conn->type == BT_CONN_TYPE_LE with bt_conn_is_le(conn)

This change improves code consistency and maintains the same
refactoring pattern applied across the Bluetooth host stack.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-11-14 10:26:05 +02:00
Lyle Zhu
1820e4ed29 Bluetooth: Classic: HFP_AG: Check semicolon character of AT CMD ATD
Check if the received AT command `ATD` is valid. When the semicolon is
missing, return the error.

Remove the semicolon from the received valid data and notify received
number or memory location value.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:25:55 +02:00
Lyle Zhu
93cc24a678 Bluetooth: Classic: HFP_HF: Force ATD cmd to end with semicolon
Only voice calls are supported by HFP specification. And the
semicolon character shall be added when the voice call is originated.

Add the semicolon character to force the ATD command to end with
semicolon character.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-14 10:25:55 +02:00
Johan Hedberg
445431c779 Bluetooth: Classic: AVRCP: Fix Clang/LLVM build failures
Having variable declarations after labels causes build failures with
Clang/LLVM:

subsys/bluetooth/host/classic/avrcp.c:1269:2: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
 1269 |         uint8_t failed_evt = 0;
      |         ^

/subsys/bluetooth/host/classic/avrcp.c:3809:3: error: label followed by a
declaration is a C23 extension [-Werror,-Wc23-extensions]
 3809 |              uint64_t identifier = sys_get_be64(data->identifier);
      |              ^

Fix these by moving the declarations to the top of the function in the
first case and add braces for the second.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-11-14 10:24:38 +02:00
Lyle Zhu
03e062219a Bluetooth: Classic: shell: hfp: Add command last_number
Add the command `last_number` to set the last dialed phone number.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-13 20:45:50 -05:00
Lyle Zhu
97b4373d9b Bluetooth: Classic: HFP_AG: Add callback redial to get number
If a phone was made during the previous SLC, AG cannot properly
process the redial request sent by HF after reconnecting.

Add a callback `redial` to get the last dial number from the upper
layer when `AT+BLDN` command is received.

If the callback is not provided or the error is returned after the
callback returned, send error response to the HF.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-13 20:45:50 -05:00
Omkar Kulkarni
22e37982cb Bluetooth: Mesh: Make net msg cache netkey aware
Improve the network message cache to be aware of network keys to
prevent false duplicate detection across different subnets. This
ensures that messages with the same source address and sequence
number but from different network keys are not incorrectly
identified as duplicates, as it can happen in certain cases.
See ES-26350.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2025-11-13 20:36:24 -05:00
Make Shi
aca9ae2814 Bluetooth: AVRCP: Implement full support vendor-dependent commands
Add full support for all remaining AVRCP vendor-dependent PDUs on both
Controller (CT) and Target (TG), including APIs, callbacks, and shell
commands for testing.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-11-13 20:35:28 -05:00
Make Shi
8572ec9cf3 Bluetooth: AVRCP: Add Player app Settings vendor-dependent commands
Implement support for AVRCP Player app Settings PDUs on both CT/TG
- Added APIs for sending and handling commands like LIST_ATTRS,
   LIST_VALS, GET_CURR_VAL, SET_VAL, and related text/inform PDUs.
- Added callbacks for TG request handling and CT response processing.
- Add shell commands for Player app Settings commands testing.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-11-13 20:35:28 -05:00
Make Shi
c0c5a25158 Bluetooth: AVRCP: Add support for notification events
This patch adds AVRCP notification event handling for both CT and
TG roles. Also add Shell command support for testing notification
registration and responses.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-11-13 20:35:28 -05:00
Make Shi
7008f0eaf3 bluetooth: avrcp: Add vendor-dependent with fragmentation support
This patch introduces support for AVRCP vendor-dependent commands and
responses, including full handling of fragmented messages.

- Adds fragmentation and reassembly logic for AVRCP vendor-dependent
- Introduces TX queue management using delayed work for TG
- Adds support for GetCapabilities PDUs
- Add new Kconfig for vendor-dependent with fragmentation support

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-11-13 20:35:28 -05:00
Make Shi
f06e977de3 Bluetooth: AVCTP: Remove redundant length check in avctp_tx_processor
Remove unnecessary checking for net_buf_tailroom(buf) < chunk_size
before sending data in avctp_tx_processor.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-11-13 20:35:28 -05:00
Szymon Janc
d53a1659ef Bluetooth: ISO: Move iso dereference after assertion
Make sure assertion is true before dereferencing chan->iso. In extreme
case compiler could skip assert check (asume it is always false) if address
was already dereferenced.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-11-13 23:14:34 +02:00
Troels Nilsson
22fe7680f8 Bluetooth: Controller: Various fixes for CIS termination handling
Handling of CIS termination had several issues, most notably:

- it depended on allocating a termination node from the general rx
  node pool, causing asserts if the pool was exhausted
- CIS established events was not always generated when required,
  potentially causing CIS Centrals to get stuck without being able
  to create any new CISes
- Cancelling a CIS Create procedure only worked correctly if the
  CIS Create was currently active and happened to belong to the
  same CIS
- CIG state handling often (always?) assumed a CIG with only one CIS

ll_conn_iso_stream now has a dedicated termination node, same as
ll_conn and ll_sync_iso_set

LLCP statemachine for Cis Create procedure has been reworked to ensure
a notification node for CIS Established is available as early as possible.
In addition, it should now always be sent when needed

Introduced ull_central_iso_all_cises_terminated() to check if all CISes
in a CIG has been terminated (or not created yet) - which is now
used for updating the CIG state

ull_cp_cc_cancel() now takes the CIS to cancel as an argument so
it doesn't end up canceling an entirely different CIS Create procedure;
In addition it now works for queued procedures as well

Flushing a (central) CIS Create procedure in LLCP will now properly
generate a CIS Established event (with an error)

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-11-08 10:22:00 +02:00
Szymon Janc
d660d38fca Bluetooth: MPL: Fix NULL pointer dereference in on_obj_selected
Track may not have next track and thus this must be checked before
trying to match ID.

This was affecting following qualification test cases:
GMCS/SR/MCP/BV-38-C
GMCS/SR/MCP/BV-39-C
GMCS/SR/MCP/BV-40-C

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-11-07 19:24:42 +02:00
Pavel Vasilyev
bb006dc971 bluetooth: mesh: Increase BT RX Stack Size for PB-GATT
Increase BT RX Thread Stack Size which is needed for successfull
provisioning over PB-GATT.

Output from `kernel thread stacks` shell command:
```
BT RX WQ (real size 4096): unused 1408 usage 2688 / 4096 (65 %)
```

Fixes #98521

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-11-07 08:25:22 -05:00
Vinayak Kariappa Chettimada
c102a8e30e Bluetooth: Controller: Add BT_HCI_VS_FATAL_ERROR_SUPPORT
Add BT_HCI_VS_FATAL_ERROR_SUPPORT Kconfig to allow
out-of-tree Controllers to control Zephyr HCI Vendor-
Specific Fatal Error event support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-11-07 06:58:27 -05:00
Lyle Zhu
27c245a44d Bluetooth: Classic: RFCOMM: Fix NULL pointer access issue
When received the DLC disconnect request, after prime the DLC
disconnect response, the DLC will be cleared and the `dlc->session`
is cleared. If the no DLC is linked in current session, the idle
timer of the session will be scheduled.

In current implementation, the `dlc->session` is used to get the
session pointer, but it is invalid in this time. And the unexpected
fault occurs.

Fix the issue by getting the session pointer from parameter of the
function `rfcomm_handle_disc()` instead of `dlc->session`.

Fix issue #99035.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-11-07 06:50:42 -05:00
Aleksandar Stanoev
9d06fca87a Bluetooth: Decode Bluetooth 6.2 version number
Bluetooth 6.2 has version number 0x10 and was released in November 2025.
This commit ensures this version number is properly decoded.

Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
2025-11-06 13:53:30 -05:00
Johan Hedberg
73b6f8bd4a Bluetooth: Host: Fix build error with observer-only config
When building an observer-only build the check_pending_conn label would
result in CI warnings/errors due to this only being a C23 feature:

scan.c:692:1: error: label at end of compound statement is a C23 extension

Turns out the #ifdefs are completely unnecessary, and the code can simply
take advantage of IS_ENABLED(), which should get rid of the warning.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2025-11-04 12:00:35 -05:00
Zhijie Zhong
87e351f8bc Bluetooth: Host: Fix handling of adv reports when scanning for connection
In some cases, the host starts scanning internally for establishing
connections (BT_LE_SCAN_USER_CONN), such as host-based resolving or
auto-connection. In this situation, even if the application does not
start explicit scan, the host still needs to handle the advertising
reports to continue the connection process.

Previously, both bt_hci_le_adv_report() and bt_hci_le_adv_ext_report()
will break or discard all reports when explicit scan is not active.
This causes the connection to stay in SCAN_BEFORE_INITIATING and never
move forward.

This patch adds checking of BT_LE_SCAN_USER_CONN to allow advertising
reports to be processed during connection-purpose scanning. When the
scan is started explicitly by application, the behavior remains the
same, only small comments are updated to describe this behavior and keep
the original code style unchanged.

Signed-off-by: Zhijie Zhong <zhongzhijie1@xiaomi.com>
2025-11-04 16:55:45 +02:00
Szymon Janc
4571485e16 Bluetooth: Mesh: Fix invalid write in private beacon server
There is no guarantess enum will be packed so passing uint8_t as
node_id to bt_mesh_subnet_priv_node_id_get() could (and likely will)
result in writing past stack variable.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-11-03 16:59:32 +02:00
Lyle Zhu
d95358e934 Bluetooth: Classic: L2CAP: Reset rx.cid when channel is deleted
rootcause: The dynamic L2CAP channel rx.cid is not reset, it
will be intercepted by the judgment condition of the fixed channel,
directly using the last alloced cid may cause cid conflict.

Co-authored-by: zhenwei fang <fangzhenwei@bytedance.com>
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-31 10:34:04 -04:00
Szymon Janc
973934c1e9 Bluetooth: Host: Fix crash on bt_disable() with limited advertising
When limited advertising is enabled there is pending deleyable work
for timing it out. If in such case struct bt_le_ext_adv is cleared by
memset system will crash on next tick.

Fix this by ensuring work is cancelled before clearing struct
bt_le_ext_adv. Using bt_le_ext_adv_foreach() ensures that this will
be correctly handled with and without extended advertising enabled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-10-30 18:37:07 -04:00
Lyle Zhu
354a63f401 bluetooth: classic: HFP_AG: Fix early SCO connection req sending
When creating the audio connection, the SCO connection request will be
sent before the response "OK" to AT command "AT+BCS" is issued.

It causes the issue that the HFP HF cannot response the SCO connection
request with the correct codec. Then the SCO connection cannot be
established properly.

Put all processing into the same context, thus avoiding non-sequential
execution caused by the different priorities of different threads.

Add a flag `BT_HFP_AG_AT_PROCESS` to flag the AT command is being
processed.

When the flag `BT_HFP_AG_AT_PROCESS` is set, put the pending
executions into temp list `tx_submit_pending`. After the AT response
`OK` or `ERROR` has been sent, move the pending executions from
`tx_submit_pending` to `tx_pending`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-10-29 11:44:52 +02:00
Anas Nashif
303af992e5 style: fix 'if (' usage in cmake files
Replace with 'if(' and 'else(' per the cmake style guidelines.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-10-29 11:44:13 +02:00
Vinayak Kariappa Chettimada
533ef58157 Bluetooth: Controller: Fix use-after-release in lll_scan/lll_scan_aux
Fix use-after-release in lll_scan/lll_scan_aux when using
mayfly_enqueue to defer execution of the offset calculation
using ull_sched_mfy_after_cen_offset_get().

Apply suggestion from @Copilot

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-27 16:18:48 -04:00
Lars Segerlund
fc813d9556 Bluetooth: Controller: Handle overlapping CIG and ACL
If the CIG and ACL overlap each other when the CIS is starting
zephyr will assert on negative time, so fit this special case.

Signed-off-by: Lars Segerlund <lrsu@demant.com>
2025-10-27 10:59:38 +02:00
Pavel Vasilyev
1a4f113d14 bluetooth: mesh: adv_ext: Fix scheduling with multiple relay adv sets
When multiple relay adv sets are used, the bt_mesh_adv_send function
calls bt_mesh_adv_relay_ready which should distribute relayed
advertisements across all relay adv sets.

Until the submitted relay adv set work is started, the ADV_FLAG_ACTIVE
is not set. Therefore, next call to bt_mesh_adv_send will try to
re-submit the same relay adv set work, instead of picking up another
relay set which is actually free and ready to send an advertisement.

This commit adds a check that checks if the adv set work is already
pending to be executed. And if so, schedule_send returns false to make
bt_mesh_adv_relay_ready pick next relay adv set.

This shouldn't brake advertising because once adv set is done
transmitting advertisment, it will pick up a next one.

The ADV_FLAG_PROXY check is added to do re-submit for adv set which was
used for proxy advertisement since we need to prioritize mesh messages
over proxy advertisements when those are running on the same adv set.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-10-27 10:59:23 +02:00
Lingao Meng
bed07a5ebf tests: bluetooth: audio: fix bsim timing
move extending advertising start after periodic adv.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2025-10-27 10:59:23 +02:00
Lingao Meng
d59cd2e368 Bluetooth: Host: Fix Periodic Advertising random address update
update random address when periodic adv enabled.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2025-10-27 10:59:23 +02:00
Lingao Meng
f902f2ab0d Bluetooth: Host: Fix unnecessary random address update
The `bt_le_ext_adv_update_param` will set new random address when option
not select `BT_LE_ADV_OPT_USE_IDENTITY`, But `bt_le_ext_adv_start` will
also set random address again.

This will be affect bluetooth mesh, after this change, will ensure address
only change once for every advertising.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2025-10-27 10:59:23 +02:00
Emil Gydesen
02d0e96bf1 Bluetooth: BAP: Add bt_bap_unicast_client_unregister_cb
Add bt_bap_unicast_client_unregister_cb to unregister BAP
unicast client callbacks. This is required for unittests
to clean up between runs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-10-25 15:59:40 +03:00
Vinayak Kariappa Chettimada
4428c1a868 Bluetooth: Controller: nRF54Lx: Enable Controller Privacy Support
Enable Controller Privacy support for nRF54Lx as default.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Vinayak Kariappa Chettimada
6d79d52118 Bluetooth: Controller: nRF54Lx: Add Controller Privacy Support
Add Controller Privacy support for nRF54Lx by porting to
use NRF_AAR00 h/w peripheral.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-10-24 08:50:49 -07:00
Kai Cheng
038523c63b Bluetooth: Conn: add connection type helper functions
Introduce dedicated helper functions for connection type checking:
- bt_conn_is_br() for BR/EDR connections
- bt_conn_is_le() for LE connections
- bt_conn_is_iso() for ISO connections
- bt_conn_is_sco() for SCO connections

Replace direct conn->type comparisons with these new helper functions
throughout the connection management code. This improves code readability,
maintainability, and provides proper configuration checks for each
connection type.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2025-10-24 11:34:41 +02:00