10116 Commits

Author SHA1 Message Date
Lyle Zhu
cc18a23ec9 bluetooth: classic: GOEP: fix L2CAP MTU calculation
Correct the minimum MTU calculation for GOEP over L2CAP to account
for the L2CAP I-frame overhead.

- Update BT_BUF_ACL_RX_SIZE default from 264 to 265 bytes for GOEP
- Update BT_GOEP_L2CAP_MTU minimum range from 259 to 265 bytes
- Add detailed comment explaining L2CAP I-frame field length (6 bytes):
  * 4 bytes for extended control field
  * 2 bytes for FCS field

The previous calculation only accounted for the L2CAP header (4 bytes)
but missed the 6-byte L2CAP I-frame overhead (extended control field
and FCS), resulting in an incorrect minimum of 264 bytes instead
of the correct 265 bytes. And it causes the minimum MTU of L2CAP
to be incorrectly set to 254. The MTU cannot meet the minimum
requirement of GOEP MOPL.

The correct calculation for GOEP over L2CAP is:
255 bytes (GOEP minimum MTU) + 4 bytes (L2CAP header) + 6 bytes
(L2CAP I-frame) = 265 bytes total.

Set the default value of CONFIG_BT_BUF_ACL_RX_SIZE to 265 if GOEP is
enabled.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-23 10:41:38 +01:00
Vinayak Kariappa Chettimada
43dede5acc Bluetooth: Host: settings: Add early len check without strncpy/cmp use
Add early len check, remove use of strcpy, strncpy and
strncmp.

Co-authored-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
230453b6ea Bluetooth: Host: settings: Fix truncation detection after strncpy
Fix truncation detection after strncpy, as strlen cannot be
used if the src was truncated due to insufficient size of
dst.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
d98c2cf0d8 Bluetooth: Host: Rework settings without snprintk to return error
Rework settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n and to return
error if path buffer is insufficient.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
d8f3e43b20 Bluetooth: Host: Rework settings without snprintk use
Rework settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
2db3f7978f Bluetooth: Host: settings without snprintk use
Update settings implementation for not reusing the OS
snprintk implementation with CONFIG_PRINTK=n.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
4a914bf281 Bluetooth: Host: ATT: Do not use bt_addr_le_to_str when CONFIG_LOG=n
Do not use bt_addr_le_to_str() when CONFIG_LOG=n.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 13:01:07 -05:00
Vinayak Kariappa Chettimada
73c182509c Bluetooth: Controller: LLL prepare at margin Kconfig
Introduce Kconfig option to enfore LLL prepare at margin
irrespective of whether there is an overlapping state/role.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 14:09:11 +00:00
Vinayak Kariappa Chettimada
5fe53aaa84 Bluetooth: Controller: Use PPI/DPPI to start s/w switch timer
Use PPI/DPPI to start s/w switch timer to reduce current
consumption.

Explicitly starting the s/w switch timer at prepare meant
current being consumed in the prepare margin duration. Use
of PPI/DPPI ensure s/w switch timer is start when event
timer is started after the prepare margin.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 14:09:11 +00:00
Vinayak Kariappa Chettimada
0b1b099196 Bluetooth: Controller: Fix PAST sync_offset_us calculation
Fix the missing use of remainder value in the sync_offset_us
calculations. Also, Periodic Sync reception is relative to
Peripheral event hence ticks_anchor does not require the
ticker margin and event jitter to be subtracted.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2026-01-22 14:09:11 +00:00
Mark Wang
f66ce9c251 bluetooth: shell: a2dp: include error code in failure messages
Add error code parameter to all A2DP shell error messages to provide
more detailed diagnostic information when operations fail. This applies
to configure, establish, release, start, suspend, delay report, and
abort response handlers.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Mark Wang
d8eb0ce5f4 bluetooth: shell: a2dp: use bt_shell_error for error messages
Replace bt_shell_print() calls with bt_shell_error() for all error
conditions and failure cases in the A2DP shell implementation to
properly distinguish error messages from informational output.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Mark Wang
313478b026 bluetooth: shell: a2dp: use bt_shell_xxx instead of shell_xxx
Replace all shell_print() and shell_error() calls with bt_shell_print()
and bt_shell_error() respectively to use the common Bluetooth shell
printing functions throughout the A2DP shell implementation.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Mark Wang
36ab1ba154 Bluetooth: shell: a2dp: Update a2dp sdp profile version
The newest a2dp spec set the profile version as 1.4.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Mark Wang
6f0b31c709 bluetooth: shell: a2dp: improve a2dp shell cmds
add abort req and rsp callbacks, improve register_ep cmd to support delay
report, check buf tailroom for sending media, add get_conn cmd to test
bt_a2dp_get_conn.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Mark Wang
c92d617855 bluetooth: shell: a2dp: use common function to check a2dp initialization
Before every cmd, call one common function to check whether a2dp is
initialized.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2026-01-22 08:37:41 +00:00
Evgenii Kosenko
7deab5e334 Bluetooth: Shell: Add per-bearer pool for GATT operations
The original implementation used a single global parameter structure for
GATT operations, preventing concurrent operations on different bearers. By
introducing a per-bearer context pool, each bearer can maintain its own
operation state, enabling simultaneous GATT operations.

Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
2026-01-21 13:01:42 +00:00
Tom Hughes
8ea64b7b33 bluetooth: audio: Fix redundant initialization
When building the bluetooth.general.tester_le_audio test with clang and
-Winitializer-overrides, it warns:

subsys/bluetooth/audio/mpl.c:318:2: error: initializer overrides prior
initialization of this subobject [-Werror,-Winitializer-overrides]
  318 |         .add_group = NULL,
      |         ^~~~~~~~~~~~~~~~~
subsys/bluetooth/audio/mpl.c:317:15: note: previous initialization is here
  317 |         .add_track = NULL,
      |                      ^~~~

Remove redundant initializer for add_group which overlaps with add_track
in an anonymous union.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2026-01-20 20:09:06 -05:00
Emil Gydesen
a25598eab9 Bluetooth: CSIP: Fix set member register issue
Fix issue with re-registering CSIS where it relied on
a stack allocated value during the service unregistering
and reset. To fix this properly, and to allow for further
optimization, the register function was refactored to dynamically
create the service, rather than relying on a static allocation
and dynamically remove unwanted characteristics.

Additionally this new approach also allow us to rely on
IS_ENABLED and remove some #if defined, as well as reducing
both ROM and RAM memory usage.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-20 13:23:28 +00:00
Lyle Zhu
ef7b132bfd Bluetooth: Classic: Fix initialization to support re-initialization
In current implementation, the Classic L2CAP server list will be
cleared when the function `bt_enable()` called. It causes the
registered Classic L2CAP servers are unregistered. However, the
higher-ups were completely unaware of this behavior. It causes the
Classic L2CAP server cannot work after executing the sequence
`bt_enable()`, `bt_disable()`, and `bt_enable()`. Also this behavior
is inconsistent with LE L2CAP server.

Remove the initialization of Classic L2CAP server list from function
`bt_l2cap_br_init()` to fix the issue.

Make Bluetooth Classic profile initialization functions idempotent
by adding static initialized flags to prevent re-initialization.
Change return type from int to void since errors are now logged
but not propagated.

Changes include:
- Add initialized flag to prevent multiple initialization
- Change return type to void for init functions
- Mark err variables as __maybe_unused where appropriate
- Improve error logging with error codes
- Handle -EEXIST and -EALREADY errors for re-registration
- Initialize connection pools before checking initialized flag
  in AVRCP to support re-initialization scenarios
- Remove unnecessary sys_slist_init in bt_l2cap_br_init

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-20 13:23:14 +00:00
Lyle Zhu
4146c053d2 bluetooth: shell: Fix error code formatting in BR/EDR shell
Fix incorrect error code formatting in Bluetooth BR/EDR shell commands.
Error codes are already negative values, so remove the redundant negation
when printing error messages. Also update PSM registration message to
print the PSM value in hexadecimal format for consistency.

Changes:
- Remove negation of error codes in shell_error() calls
- Change PSM format specifier from %u to %04x for hex display
- Affects l2cap_disconnect, l2cap_send, l2cap_credits, l2cap_echo_reg,
  l2cap_echo_unreg, l2cap_echo_req, and l2cap_echo_rsp commands

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-20 13:23:03 +00:00
Håvard Reierstad
f5f7bb4461 Bluetooth: Host: Add bt_keys config flag
Adds a flag `cfg_flags` to the `bt_keys` struct  and a version field
`cfg_version` in order to be able to detect configuration changes
between firmware updates. This is needed because the `bt_keys` struct
has fields which are compiled in depending on which Kconfig options are
enabled, enabling the possibility of stored data being intepreted
wrongly if the struct changes.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2026-01-20 13:22:05 +00:00
Jamie McCrae
9700579f6a bluetooth: Update to use SOC_SERIES_NRF Kconfigs without X suffix
Updates usage of the old Kconfig to use the new Kconfig

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-01-20 13:21:38 +00:00
Kyra Lengfeld
ed5683250c Bluetooth: Host: make TX processor stack size configurable
While the tx processor thread is needed to prevent deadlocks and is as
such always enabled, its stack size may be adjusted based on need.
What is needed is dependent on which features are enabled in the
zephyr host as well as other project configurations impacting the
zephyr host.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2026-01-20 13:21:17 +00:00
Emil Gydesen
d74f5d7d23 Bluetooth: Audio: depend on UTF8
Add a dependency for UTF8 for LE Audio. Since (nearly?) all
string in LE Audio are UTF8 and that the stack wants to be
able to check and validate strings coming both from remove
deviecs and from the application, it will depend on the utf8
API that is guarded by CONFIG_UTF8.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-20 13:20:52 +00:00
Kyra Lengfeld
4ae5f63aa9 Bluetooth: Host: Give option to disable TX processor thread
It is not recommended to disable the tx processor thread as otherwise
deadlocks may occur, but it has been observed that some boards and
configurations may have too little RAM to accommodate the TX processor
thread stack.
As such BT_TX_PROCESSOR_THREAD gets a prompt.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2026-01-20 13:20:04 +00:00
Aleksandr Khromykh
bf261206bb bluetooth: mesh: remove secure sorage for tfm crypto provider
Commit removes selection secure storage for tfm
crypto provider. The secure storage is under
the secure image management. Non-secure image
is not required in the secure storage subsystem.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-19 15:24:22 +01:00
Can Wang
40931508ca Bluetooth: OBEX: fix incorrect error code in obex_transport_disconn
The function obex_transport_disconn() was always returning -EINVAL
regardless of the actual error code returned by the transport
disconnect operation.

Fix this by returning the actual error code from the transport
disconnect call instead of the hardcoded -EINVAL value.

Signed-off-by: Can Wang <can.wang@nxp.com>
2026-01-19 15:08:42 +01:00
Can Wang
3138be0b08 Bluetooth: OBEX: allow zero-length body in End-of-Body header
According to OBEX Version 1.5, section 2.2.9, it is legal to send a
zero-length End-of-Body header when object body data is generated on
the fly and the end cannot be anticipated.

Update parameter validation in bt_obex_add_header_body_or_end_body()
and bt_obex_add_header_end_body() to allow NULL body pointer when
length is zero, while still rejecting NULL body with non-zero length.

This enables proper support for zero-length End-of-Body headers as
specified in the OBEX specification.

Signed-off-by: Can Wang <can.wang@nxp.com>
2026-01-19 15:08:42 +01:00
Can Wang
85446aafd7 Bluetooth: OBEX: add bt_obex_has_app_param helper function
Add a new helper function bt_obex_has_app_param() to check whether
a specific application parameter tag exists in the OBEX buffer.

The function uses the existing bt_obex_get_header_app_param() to
retrieve the application parameters, then parses them using
bt_obex_tlv_parse() with a callback to search for the specified tag ID.

This simplifies checking for the presence of application parameters
without needing to manually parse the TLV structure.

Signed-off-by: Can Wang <can.wang@nxp.com>
2026-01-19 15:08:42 +01:00
Antoni Duda
28a9b43459 bluetooth: host: Allow unregistering per adv sync cbs
Introduce bt_le_per_adv_sync_cb_unregister to allow
unregistering of the periodic sync callbacks.

Signed-off-by: Antoni Duda <antoni.duda@programmer.net>
2026-01-19 12:17:53 +01:00
Can Wang
b723880279 Bluetooth: Classic: OBEX: adjust MOPL handling when exceeding MTU
When MOPL exceeds MTU, adjust it to match MTU instead of sending the
error code. This handles the common case where mainstream mobile
operating systems (iPhone and Android) negotiate
MOPL values greater than the RFCOMM or L2CAP MTU.

Signed-off-by: Can Wang <can.wang@nxp.com>
2026-01-19 10:07:52 +01:00
Gaetan Perrot
9217ce54c6 Bluetooth: VCP: avoid NULL dereference
Avoid calling vcp_vol_ctlr_discover_complete() with a NULL
controller pointer when lookup fails during AICS discovery.

The vcp_vol_ctlr_discover_complete() helper dereferences the
controller unconditionally, which could otherwise lead to a NULL
pointer dereference.

Fix by returning early if the controller lookup fails.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-15 11:06:01 +00:00
Gaetan Perrot
01e3a54f20 Bluetooth: MICP: avoid NULL dereference
Avoid calling micp_mic_ctlr_discover_complete() with a NULL
controller pointer when lookup fails during AICS discovery.

The micp_mic_ctlr_discover_complete() helper dereferences the
controller unconditionally, which could otherwise lead to a NULL
pointer dereference.

Fix by returning early if the controller lookup fails.

Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
2026-01-15 11:06:01 +00:00
Lyle Zhu
1cf21e55ca bluetooth: Classic: hfp_hf: make at_get_raw_string() return const char *
Change at_get_raw_string() return type from 'char *' to 'const char *'
to match at_get_string() and improve const-correctness. This function
returns read-only AT command response data that should not be modified.

- Update at_get_raw_string() signature in at.h and at.c
- Update return statement cast from 'char *' to 'const char *'
- Update local variables in hfp_hf.c to use 'const char *':
  * bvra_handle: 'id' variable
  * chld_handle: 'value' variable
  * cnum_handle: 'alpha' and 'speed' variables
- Mark unused 'alpha' and 'speed' in cnum_handle with __maybe_unused
- Change NULL check style from '!id' to 'id == NULL' for consistency

This completes the const-correctness improvements started in the
previous commit for HFP HF AT command string handling.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-12 12:36:18 -06:00
Sylvio Alves
6511eb4edf bluetooth: hci: add Espressif VS platform/variant definitions
Add Espressif platform and variant IDs to hci_vs.h for ESP32 family
SoCs (ESP32, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2).

Add Espressif Systems to vs_hw_platform() and vs_hw_variant()
functions in hci_core.c for proper vendor identification.

Use CONFIG_SOC_FAMILY guards in vs_hw_variant() to reduce flash
usage by only compiling variant strings for the active SoC family.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-01-12 12:34:47 -06:00
Om Srivastava
eb2da4f4c6 bluetooth: shell: fix AD length validation
Fix validation of AD length handling in the Bluetooth shell.
Reject zero-length AD fields before subtracting the AD type size.

The previous implementation compared an unsigned length
against zero after subtraction, making the error path
unreachable.

Signed-off-by: Om Srivastava <srivastavaom97714@gmail.com>
2026-01-12 12:32:25 -06:00
Lyle Zhu
bd7da95049 Bluetooth: Classic: L2CAP: Fix sending buffer reference counting
There is a corner case that the ACL_Data_Packet_Length is less than
the MPS of the L2CAP BR channel connection. Then the partial data
will be sent and the remaining data will be sent in sequence in the
function `l2cap_br_data_pull()`. The issue occurs when sending the
continuing fragment HCI ACL packet, due to the reference counting of
sending buffer is 0. Therefore, the application will be asserted in
the function `send_buf()`.

Fix the issue by managing the reference count of the sending buffer.

Use the function `net_buf_ref()` to increment the reference count of
the sending buffer.

If the sending buffer is the last fragment, use `net_buf_unref()` to
decrement the reference count of the sending buffer to ensure that
the send buffer can be properly released when the data is sent out.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-12 11:54:43 +01:00
Aleksandr Khromykh
fccf76a857 bluetooth: mesh: add mesh api prefix to app key structure
Commit adds `bt_mesh_` prefix to `struct app_key`
to make it compatible with other internal API.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-08 11:58:09 +00:00
Aleksandr Khromykh
58667568ed bluetooth: mesh: move key primitives from mesh to keys header
Commit moves enumeration and definition related to keys
from mesh.h to keys.h

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-08 11:58:09 +00:00
Aleksandr Khromykh
afdf571b3b bluetooth: mesh: improve cdb debug logging
Commit improves cdb debug logging adding settings path
for subnetwork and removing unnecessary words.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-08 11:58:09 +00:00
Aleksandr Khromykh
1d50cd111d bluetooth: mesh: add key sync between core and cdb
Commit adds functionality that synchronizes network and
application keys between mesh core and cdb.
Additionally, subnetwork bridge bsim tests were fixed since
cdb cannot allocate subnetwork if it exists.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-08 11:58:09 +00:00
Aleksandr Khromykh
19bc2214f3 bluetooth: mesh: refactore app key event
Event about application key changes has been refactored.
Event provides access to the corresponding applicarion key
structure instead just key indexes.
The related code has been moved from mesh.h to app_keys.h.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2026-01-08 11:58:09 +00:00
Lane Westlund
97f4a67187 doc: fix additional instances of build/built typos
In some cases, "is build" was written instead of "is built"

Signed-off-by: Lane Westlund <lane@westlund.net>
2026-01-08 09:51:08 +01:00
Ludvig Jordet
9eb3a6ee81 Bluetooth: Mesh: Let vendor models receive messages with SIG opcodes
This fixes a limitation where the stack assumed that vendor models could
not specify handlers for SIG-defined (1- or 2-byte) opcodes. This
assumption does not exist in the specification. In fact, the
specification expects this very use-case to be possible, in MeshPRT 1.1,
section 3.8.3:

> To exchange messages with a Bluetooth SIG adopted model, a Vendor Model
> shall use the Access message defined for the Bluetooth SIG model.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2026-01-06 19:14:31 +00:00
Ludvig Jordet
80b92850e3 Bluetooth: Mesh: Deprecate VND_MSG_CID_FORCE option
This deprecates CONFIG_BT_MESH_MODEL_VND_MSG_CID_FORCE. This option was
added to allow an optimization that a) only can apply in edge case
networks that use multiple vendor models with different CIDs, b) doesn't
really have much potential gains even in this case unless there is a
large number of opcodes in these vendor models, and c) makes it
impractical to implement support for vendor models handling SIG opcodes.

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2026-01-06 19:14:31 +00:00
Ludvig Jordet
23d8ec360b Bluetooth: Mesh: Fix compile warning when CID check is disabled
Since the entire cid checking function is conditionally included based
on KConfig, the usage site also needs to use #if instead of IS_ENABLED,
otherwise you get the following warning during compilation when the
option is disabled:

`error: implicit declaration of function
‘bt_mesh_vnd_mod_msg_cid_check’`

Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
2026-01-06 19:14:31 +00:00
Emil Gydesen
6345dab3de Bluetooth: Audio: Use BT_CONN_ROLE over BT_HCI_ROLE
Use the host defined roles, rather than the HCI defined ones.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-06 19:14:19 +00:00
Lyle Zhu
0c3239f0c9 bluetooth: Classic: hfp_hf: make at_get_string() return const char *
Change at_get_string() return type to 'const char *'. Correspondingly,
change string parameters in HFP HF callbacks and related functions
from 'char *' to 'const char *' to reflect that these strings are
read-only data returned from AT command parsing.

- Update bt_hfp_hf_cb callback signatures for clip, operator,
  call_waiting, and textual_representation
- Update at_get_string() return type to 'const char *'
- Update local variables in hfp_hf.c handlers to use 'const char *'
- Update shell callback implementations to match new signatures
- Change NULL check style from '!text' to 'text == NULL' for consistency
- Remove unnecessary initialization of 'number' variable in clcc_handle

This improves const-correctness and prevents accidental modification
of AT command response strings.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-01-06 10:35:28 +01:00
Emil Gydesen
59a1c6e0de Bluetooth: BAP: Add bt_bap_ep_get_conn
Add a new function, bt_bap_ep_get_conn, which returns
the ACL connection for the endpoint. This works because
endpoints are specific to an ACL in BAP. The function
returns a pointer with a new reference similar to the
lookup functions from conn.h

The conn pointer was not added to the bt_bap_ep_info
struct, as doing so would be more likely to cause
reference leaks if the caller did not care about the
conn pointer when using bt_bap_ep_get_info. It can be
added later if that is requested.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-01-06 10:29:40 +01:00