Commit graph

2137 commits

Author SHA1 Message Date
Emil Gydesen
eaf92a1494 tests: Bluetooth: CAP: Initiator unicast start unittests
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-26 17:27:36 -04:00
Jonathan Rico
4ab8073b87 tests: Bluetooth: disable optimizations in unit test
Very very weird behavior.

Deleting the `options & BT_LE_ADV_OPT_USE_NRPA` branch in
`id.c:bt_id_set_adv_own_addr` makes the test pass. But add a log in that
branch, and you'll see that we never take it in the UT binary..

I don't have time for this, maybe some compiler guru or C language
lawyer can look at that decompiled function and figure out the root
cause.

Someone should also really fix the Bluetooth unit tests and make them
run on any Bluetooth related PR. Also nightly.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-26 18:51:11 +02:00
Rubin Gerritsen
d82424ba36 tests: bluetooth: hci_uart_async: Set thread name after creation
When running on native_posix, the thread needs to be created
before the thread name can be set.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Szymon Janc
d9f348962c tests: bluetooth: tester: Fix BTP_BAP_BROADCAST_SINK_BIS_SYNC command
After recent changes to BIS bitfield it is no longer required to adjust
BIS Index bitfield.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-22 14:23:05 -04:00
Jonathan Rico
0b3c67c31b Bluetooth: audio: Make unit tests compile
The tests manually include sources that are normally conditionally
included (ie based on kconfig values) in the stack.

The tests should be fixed by the original authors.
For now, force-on the hidden kconfig that enables the log options.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-21 16:44:44 -04:00
Szymon Janc
6d19bcf333 tests: bluetooth: tester: Fix user_data size in pools
There was hardcoded value for user_data which is no longer valid.
Use proper CONFIG_BT_CONN_TX_USER_DATA_SIZE for that.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-21 18:27:37 +01:00
Szymon Janc
4216bed418 tests: bluetooth: Fix line endings for imported ICS configuration
Unfortunatelly new Qualification Workspace is not able to properly import
ICS if file is UNIX line endings.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-20 18:57:43 -04:00
Jan Müller
c910520f4d Bluetooth: Host: Rework enabling of scanner
To make the scanner module more understandable and more streamlined, I
reworked the update mechanism of the scanner. The scanner tracks now the
parameters that were used to enable it and the reason why it is running.
This facilitates state logic and allows other modules to "start the
scanner", altough it is already running.
This is mostly a refactoring and not a functional change.

Added a test to verify the behavior.

Signed-off-by: Jan Müller <jan.mueller@nordicsemi.no>

add to task
2024-08-20 14:54:25 -04:00
Chang An
e8db417a00 LE Audio: add conn parameter for bt_vcp_vol_rend_cb
Add conn parameter to status/flags callbacks of bt_vcp_vol_rend_cb
to differentiate between remote and local changes.

Signed-off-by: Chang An <chang.an_1@nxp.com>
2024-08-20 14:45:35 +02:00
Aytürk Düzen
5f00c18005 tests: bluetooth: tester: add nrf54h20 configs
Added:
nrf54h20dk_nrf54h20_cpuapp.overlay: Choose uart136 hwfc 115200
nrf54h20dk_nrf54h20_cpuapp.conf

Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
2024-08-20 14:44:44 +02:00
Pisit Sawangvonganan
b7d55d8ec6 style: tests: comply with MISRA C:2012 Rule 15.6
Add missing braces to comply with MISRA C:2012 Rule 15.6 and
also following Zephyr's style guideline.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-20 10:33:51 +02:00
Sean Madigan
022d339f67 tests: bluetooth: shell: Add test case to build shell with plm
Path loss monitoring was not being enabled anywhere, meaning
that issues could be merged in without catching the issue.

This commit adds a test case to build the shell with path
loss monitoring enabled to catch issues.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2024-08-17 08:55:13 -04:00
Alberto Escolar Piedras
12d37484fa tests/bluetooth/shell: Switch tests from native_posix to native_sim
A few tests were only allowed for native_posix, but we are
deprecating it. Let's switch them to native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-08-16 11:20:34 +01:00
Henrik Brix Andersen
69fe9b0c50 net: buf: remove use of special putter and getter functions
Convert users of net_buf_put() and net_buf_get() functions to use
non-wrapped putters and getters k_fifo_put() and k_fifo_get().

Special handling of net_bufs in k_fifos is no longer needed after commit
3d306c181f, since these actions are now
atomic regardless of any net_buf fragments.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-16 09:55:11 +02:00
Guotao Zhang
28093cc4ef Bluetooth: tester: Increase the adv buf size to consider the extend adv
[Description]
Device hang is observed when LE Scan
[Root Cause]
For le_ext_adv_report, Data[i] of one adv report is 0-229,
for the adv_buf of saving, it just is 73 bytes, so sometimes
the bytes of adv report is more than the adv_buf, resulted hang
[Fix]
consider the le ext adv case.
[Testing]
After modified, Device hang is not observed after stress
testing with LE Scan

Signed-off-by: Guotao Zhang <guotao.zhang@nxp.com>
2024-08-05 16:29:36 +02:00
Torsten Rasmussen
e8e5169f95 cmake: remove the use of SOURCES in tests
Setting SOURCES before calling find_package() was deprecated in #51049.

Cleanup usage of SOURCES and instead use the proper target_sources()
CMake function.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-05 16:27:09 +02:00
Torsten Rasmussen
b939e720a6 tests: source Zephyr before project() call
Fixes: #73831

find_package(Zephyr) should be called before first project() call.

Zephyr package will test and force-set the correct toolchain, especially
the C compiler.
The project() will also set the C compiler, if not set already.

If project() is called first, then conflict arises on the C compiler
selection and thus the following message is seen:
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_C_COMPILER= /usr/bin/gcc

This cache deletion results in other errors, such as a missing BOARD
setting.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-05 16:27:09 +02:00
Aleksandar Stanoev
52ffbd85c8 bluetooth: shell: Add shell commands for LE Connection Subrating
Add commands to allow requesting a subrate change via the BT shell.
A new build configuration has been added to ensure this is tested in CI.

Signed-off-by: Aleksandar Stanoev <aleksandar.stanoev@nordicsemi.no>
2024-08-05 10:16:27 +02:00
Szymon Janc
89b129742d tests: bluetooth: tester: Enable DIS service
Previously autopts was incorrectly using GATT server service to
construct DIS.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-08-01 09:13:55 +01:00
Emil Gydesen
427e506d5c tests: Bluetooth: Remove .bls files
The .bls files are no longer useful after the BT SIG switched
qualification tool. This will still remain in the git history
and can safely be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-31 12:40:24 +02:00
Rubin Gerritsen
063cf397ed bluetooth: controller: Enable data length update in ctrl_collision test
The test expects this feature to be enabled.
We should therefore enable explicitly instead of relying on
default values.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-30 18:30:22 +01:00
Rubin Gerritsen
bfc0cdc905 Bluetooth: Conditionally print out HCI error codes as strings
When developing Bluetooth applications, you typically run into
some errors. If you are an experienced Bluetooth developer,
you would typically have an HCI error lookup table in your memory.
Others might not.

This commit utilizes defines CONFIG_BT_DEBUG_HCI_ERR_TO_STR
and utilizes bt_hci_err_to_str() to print out HCI error strings
when enabled to improve the user experience.

Several alternatives where considered. This approach was chosen
as it had the best balance between readability, code size, and
implementation complexity.

The alternatives are listed below as a reference.

1. Macro defined format specifier:

```c
  #define HCI_ERR_FMT "%s"
  #define BT_HCI_ERR_TO_STR(err) (err)
  #define HCI_ERR_FMT "%d"
  #define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))

LOG_INF("The event contained " HCI_ERR_FMT " as status",
	BT_HCI_ERR_TO_STR(err));
```
Advantage: Space efficient: Code size does not increase
Disadvantage: Code becomes hard to read

2. Format specifier to always include both integer and string:

```c
static inline const char bt_hci_err_to_str(err)
{
	return "";
}

LOG_INF("The event contained %s(0x%02x) as status",
	bt_hci_err_to_str(err), err);
```

Advantage: Simple to use, implement, and read,
Disadvantage: Increases code size when CONFIG_BT_DEBUG_HCI_ERR_TO_STR
is disabled. The compiler seems unable to optimize away the unused
format specifier. Note: The size increase is only present when
logging is enabled.

3. Always print as string, allocate a stack variable when printing:

```c
const char *bt_hci_err_to_str(char *dst, size_t dst_size, uint8_t err)
{
  snprintf(dst, dst_size, 0x%02x, err);
  return dst;
}

LOG_INF("The event contained %s as status", BT_HCI_ERR_TO_STR(err));
```

Advantage: Very easy to read.
Disadvantage: Printing error codes becomes slow as it involves calling
snprint.

4. Implement a custom printf specifier, for example E.

   This requires a global CONFIG_ERR_AS_STR as I assume we cannot have
   one specifier for each type of error code.
   Also, I assume we cannot start adding specifiers for each subsystem.

```c
  #define BT_HCI_ERR_TO_STR(err) (err)
  #define BT_HCI_ERR_TO_STR(err) bt_hci_err_to_str((err))

LOG_INF("The event contained %E as status", BT_HCI_ERR_TO_STR(err));
```

Advantage: Both efficient code and readable code.
Disadvantage: This requires a global CONFIG_ERR_AS_STR as I assume
we cannot have one specifier for each type of error code.
Also, I assume we cannot start adding specifiers for each subsystem.
That is, this approach is hard to implement correctly in a scalable
way.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-30 18:25:56 +01:00
Emil Gydesen
a94bfe03a4 tests: Bluetooth: Audio: Move role specific mocks files
For the LE Audio unittests there exists a few mock files
that implement mock versions, or callbacks, for some of the
roles and features tested.

These have been moved to where they are actually used,
reducing the scope of these files.

This both allows the individual tests to implement their own
versions of it, but more importantly it prevents issues when
adding tests for these roles. For example, due to the
bap_unicast_client.c mock file, it is impossible to implement
unit tests for the unicast client, as the functions are already
defined.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-30 18:25:47 +01:00
Szymon Janc
d434eac86f tests: bluetooth: tester: Fix zero length array in middle of struct
Zero length arrays are only allowed at the end of the structure. Here
those were used as placeholders for BTP response creation and can be
easily replaced with common member.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-27 20:51:30 +03:00
Jonathan Rico
dc053dc6d2 Bluetooth: shell: Enable sysbuild for nRF5340
Enable sysbuild for nRF5340 app core.

This automatically builds the image for the network core, making a
better user experience.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-27 20:51:10 +03:00
Emil Gydesen
8be6db67fc Bluetooth: ISO/BAP: Refactor BIS bitfield
Refactors teh BIS bitfield values used for ISO
and BAP.

Previously BIT(1) meant BIS index 1, which was a Zephyr choice
in the early days of ISO, as the BT Core spec did not use
a bitfield for BIS indexes.

Later the BASS specification came along and defined that
BIT(0) meant BIS index 1, which meant that we had to shift BIS
bitfields between BAP and ISO.

This commit refactors the ISO layer to use BIT(0) for Index 1 now,
which means that there is no longer a need for conversion
between the BAP and ISO layers, and that we can use a value
range defined by a BT Core spec (BASS).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 15:19:46 +03:00
Emil Gydesen
f338bf6fae Bluetooth: Host: Discard advertising data if not explicit scanning
If the application is not explicitly scanning, then there is not
really any need to parse advertising reports nor send them to the
application.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-27 15:12:39 +03:00
Rubin Gerritsen
85eadcfddc Bluetooth: Mark bt_<type>_err_to_str() APIs experimental
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-11 13:11:59 -04:00
alperen sener
8382fea5b3 test: bluetooth: Correct profile names MBT and DFU
Profile names MBT and DFU are updated as MBTM and DFUM respectively,
according to TCRL 2024-1.

Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
2024-07-11 16:15:10 +02:00
Jonathan Rico
4afe745a1d Bluetooth: host: Add lower bound for CONFIG_BT_BUF_ACL_RX_COUNT
See comment above assert for more.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-07-10 11:47:26 -04:00
Théo Battrel
96d8682a5b Bluetooth: Shell: Fix native shell build
Following changes in HCI drivers
(https://github.com/zephyrproject-rtos/zephyr/pull/72323) the build for
the snippet allowing to have the Bluetooth shell run with BabbleSim was
broken.

Fix the snippet by disabling the HCI UART driver.

Add a twister test case that will build the snippet in CI to avoid
silent breaking.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-07-10 11:47:07 -04:00
Szymon Janc
7bfd6b6256 test: bluetooth: Update ICS to TCRL 2024-1
This ICS was generated with new Qualification Workspace tool.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Szymon Janc
8665117411 test: bluetooth: Remove qualification project BLS file
With new BT SIG Qualification Workspace it is no longer possible to
export/import full project. Only ICS export/import is possible.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-07-08 14:57:12 -04:00
Emil Gydesen
d05f211289 tests: Bluetooth: tester: Re-add support for checksum
The bug should be fixed now, so it possible to have it enabled as
long as OTS is not registered with the feature flag.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-06 17:02:23 +02:00
Sreeram Tatapudi
d0474cefde tests: bluetooth: shell: Enable flow control
Enabling UART flow control for CYW20829

Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
2024-07-02 09:35:33 +02:00
Emil Gydesen
7b0784c1f6 Bluetooth: ASCS: Validate num_ases in CP requests
Add validation of the number of ASEs in control point
write requests.

This validates that the number of ASEs
in the control point is not greater than the total number
of ASEs we support.

This also validates that the GATT MTU is large enough to
hold all the responses from the write since those can only be
sent as notifications and never be truncated.

Finally this validates and updates the size of the buffer used to
hold the responses, which may be an optimization for some builds.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-28 07:20:47 -04:00
Emil Gydesen
15d66ccc23 Bluetooth: Tester: Fix issue with initializing adv_params
The macro was changed to return a const pointer, but the
BTP use the returned pointer in a non-const way.

Modify the usage so that the macro is used to initialize
the adv_param instead, and then provide a non-const pointer
to tester_gap_create_adv_instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-27 15:14:48 -04:00
Jordan Yates
243eb36b18 everywhere: reindent .overlay files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
Lingao Meng
302422ad9d everywhere: replace double words
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Lingao Meng
dfc948a753 tests: bluetooth: fix missing net_buf_ref(rsp)
Remove unused rsp.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-24 14:26:22 +02:00
Jordan Yates
07870934e3 everywhere: replace double words
Treewide search and replace on a range of double word combinations:
    * `the the`
    * `to to`
    * `if if`
    * `that that`
    * `on on`
    * `is is`
    * `from from`

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-22 05:40:22 -04:00
Szymon Janc
78b93feb6d tests: bluetooth: tester: Enable BT_TINYCRYPT_ECC for nRF5340
This needs to be enabled in nRF53 CPUAPP for LE SC support to be
enabled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-06-20 12:04:18 -04:00
Rubin Gerritsen
69fb606579 Bluetooth: Host: Define bt_security_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
4e30803e15 Bluetooth: Host: Define bt_gatt_err_to_str()
The function reuses the ATT implementation.
To make the function simpler to use, the function handles both positive
and negative values.

Unfortunately the APIs do not document if the API returns an
errno val or a GATT return value.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
b25985ad6a Bluetooth: Host: Define bt_smp_err_to_str()
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.

BT_SMP_ERR_SUCCESS was added for completeness.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Rubin Gerritsen
94d712e5cf Bluetooth: Host: Define bt_att_err_to_str()
This can be useful if application developers
want to print them in the applications.

Later we can also use them in
the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-20 15:34:39 +02:00
Yong Cong Sin
1899e4f667 bluetooth: remove CONFIG_BT_DEBUG_LOG
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-18 14:33:58 -04:00
Nazar Palamar
36fb0279d2 test: bluetooth/tester: fix ccc_find_by_attr
Added check if ccc_values[i].attr != NULL,
before accessing to ccc_values[i].attr structure:
(handle == ccc_values[i].attr->handle)

On 20829 platform it's causing hard fault, not sure about
another platforms (in GAP testing).

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Nazar Palamar
492439af79 test: bluetooth/tester: add overlays for cyw920829m2evk_02 board
- added overlays for cyw920829m2evk_02 board

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-15 04:43:31 -04:00
Rubin Gerritsen
bfba19dc41 Bluetooth: Host: Add the API bt_hci_err_to_str()
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.

Later we can also use them in the host to improve debuggability.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-14 19:17:48 +02:00