Commit Graph

5078 Commits

Author SHA1 Message Date
Szymon Janc 675452b628 Prepare for NimBLE 1.7.0 release nimble_1_7_0_rc1_tag nimble_1_7_0_tag 2024-03-27 09:35:04 +01:00
Krzysztof Kopyściński 89e7090c59 controller/ble_ll_sync.c: acad_len potentially uninitialised
acad_len in ble_ll_sync_rx_pkt_in is filled in ble_ll_sync_parse_ext_hdr
and later accessed in ble_ll_sync_check_acad. There is a possibility
that extended advertising header is missing data containing acad, and it
will not get filled, leaving it uninitialised.
2024-03-27 09:31:28 +01:00
Szymon Janc 53bae66f71 nimble/host: Fix reports when using legacy scan with EXT_ADV enabled
ble_gap_disc() should always results in BLE_GAP_EVENT_DISC and legacy
PDUs only.
2024-03-26 15:48:15 +01:00
Krzysztof Kopyściński 0bffd7a2a2 audio/ble_audio.h: remove unused argument description in ble_audio_event_listener_register
This looks like leftover and is not used.
2024-03-25 09:27:14 +01:00
Krzysztof Kopyściński bba23c8ec6 audio/ble_audio.h: fix doxygen reference for ble_audio_base_bis_iter
@ref was missing, and to make all file visible to doxygen
defgroup bt_le_audio was added.
2024-03-25 09:27:14 +01:00
Krzysztof Kopyściński 8abef55326 audio/ble_audio.h: add missing doxygen for ble_audio_broadcast_name
`ble_audio_broadcast_name` was not documented.
2024-03-25 09:27:14 +01:00
Krzysztof Kopyściński d1ad7b29c9 audio/ble_audio.h: fix duplicated defgroups
Couple defgroups had same title.
2024-03-25 09:27:14 +01:00
Szymon Janc 3681562cd3 apps/bttester: Fix use of extended advertising interface
This shoudl allow to run GAP and GATT tests with BLE_EXT_ADV enabled.
2024-03-22 21:43:00 +01:00
Szymon Janc b1ecc2da6a apps/bttester: Fix build with EATT enabled
EATT support requires at least same number of COC channels.
2024-03-21 16:22:32 +01:00
sc 3aa35d7a3f apps/bttester: Add support for BAP autopts tests
This commit introduces environment for BAP testing
with autopts.
2024-03-21 10:49:42 +01:00
Andrzej Kaczmarek 5504556792 nimble/ll: Fix sync packet offset in syncinfo
We need to move periodic advertising event start time by full interval
(not only ticks) as otherwise any calculation of start time in the
future event will not be accurate.
2024-03-21 10:46:32 +01:00
Andrzej Kaczmarek 6d5fe383ef nimble/ll: Remove periodic adv min/max interval in sm
We only need current interval, no need to store min and max (and min was
never used anyway).
2024-03-21 10:46:32 +01:00
Andrzej Kaczmarek 074710e667 nimble/ll: Reschedule preempted adv event if possible
Currently we simply drop adv event if it was preempted, but instead we
can try to reschedule it as longs as new start time does not exceed
adv_delay limit.

Note that we only reschedule if no PDU was sent in that event, otherwise
we could not guarantee that aux is properly scheduled relative to exts.
2024-03-21 10:46:32 +01:00
Piotr Narajowski f12fbcdb19 apps/bttester: change device name max len in syscfg
This is needed for upper tester, test case GATT/SR/GAW/BI-32-C

Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
2024-03-21 10:23:14 +01:00
Szymon Janc 6f8f2572e3 nimble/host: Connect EATT when encryption is enabled
Some peers reject connection to EATT PSM if encryption is not enabled.
Since EATT requires any PDUs to be sent only on encrypted link we
can postpone initiating EATT connection until encryption with no real
drawbacks.
2024-03-21 08:52:42 +01:00
Szymon Janc a6e47b687b nimble/host: Fix leak on EATT connection
If EATT COC connection failed we need to clean up allocated memory.
2024-03-21 08:52:42 +01:00
Szymon Janc a41b4570d6 nimble/host: Fix possible memory leak in ble_eatt_prepare_rx_sdu
ble_l2cap_recv_ready consumes om buffer only on success.
2024-03-21 08:52:42 +01:00
Szymon Janc 3d6bfda185 nimble/host: Fix EATT restrictions in syscfg
EATT requires Enhanced COC and number of available channels should be
at least that of supported EATT channels.
2024-03-21 08:52:42 +01:00
Szymon Janc b74b97fd7d nimble/eatt: Fix no resource handling on accept
Return error code instead of asserting on low resources.
2024-03-21 08:52:42 +01:00
Szymon Janc 826682d3ce nimble/hs: Make ble_eatt_start static and void
It is not used outside of ble_eatt.c
2024-03-21 08:52:42 +01:00
Szymon Janc 10c2ae8018 nimble/eatt: Fix NULL deref in ble_eatt_alloc
If ble_eatt_conn_pool was empty we would end up in writing NULL
address.
2024-03-21 08:52:42 +01:00
Wojciech Pietraszewski 1c91062dbc ci: Add Doxygen Check workflow
This commit adds a new workflow for Doxygen Check to ensure documentation integrity.
The workflow verifies if the Doxygen output contains any warnings.
2024-03-20 14:50:28 +01:00
Szymon Janc e33099a190 nimble/host: Fix possible deadlock in ble_att_tx
If ble_hs_misc_conn_chan_find_reqd() failed function would exit with
HS lock locked.
2024-03-13 08:58:40 +01:00
Wojciech Pietraszewski a830ac3645 host/sm: Add doxygen comments to the header file
Adds missing macros, functions and structures documentation.
2024-03-12 09:39:31 +01:00
Piotr Narajowski cdf2520550 apps: blestress: Perform all tests
Edit for loop to run all tests.
2024-03-12 09:38:44 +01:00
Krzysztof Kopyściński f9472d5748 ext/libsamplerate: remove unneeded ign_dirs
src_dirs and include_dirs fully describes what to compile and what not.
2024-03-11 11:42:49 +01:00
Krzysztof Kopyściński 0ccd12212b ext/libsamplerate: always build with DNDEBUG flag
Debug build pulls assert.h and nrfx, in which PACKAGE define isi pulled from
libsamplerate/serc/config.h. This is not correct behavior and these
defines are not correlated. Library should be always build without
asserts, circumventing the issue.

Cleaned up duplicated cflags in pkg.yml.
2024-03-11 11:42:49 +01:00
Piotr Narajowski 253f5901b6 nimble/host: Fix invalid response for mtu exchange request
This commit applies valid response (Request Not Supported) when mtu exchange
is requested over EATT.
2024-03-07 21:04:53 +01:00
Krzysztof Kopyściński 65fcd4245e ext/libsamplerate: adjust config.h to be package exclusive
`config.h` being in `include` directory meant that it was included
globally. It may cause it being indluded into other package (as global
include)

Added prefixes to libsamplerate syscfg settings.
2024-03-06 14:29:32 +01:00
Mariusz Skamra 75b35adb69 nimble/iso: Fix potential memory leak
This fixes potential BIG memory leak in case ble_hs_hci_cmd_tx returned
an error.
If the error is returned, the code will free the allocated BIG and
BISes.
2024-03-06 13:41:51 +01:00
Mariusz Skamra f901dfa0c2 nimble/iso: Fix missing big_handle return parameter
This fixes ble_iso_create_big to return the BIG handle created
to the API user.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2024-03-06 13:41:51 +01:00
taks 8b7eda2a56 nimble/host: Fix ble_gap_adv_set_data return code 2024-03-05 09:38:14 +01:00
Krzysztof Kopyściński 59ce2f4410 ext: add libsamplerate library
Adds libsamplerate library that allows to resample audio streams to
different samplerate.
2024-03-04 08:41:39 +01:00
Krzysztof Kopyściński e55baf9843 nimble/services: add PACS
This commit adds Published Audio Capabilities Service/Prifile. In pair
ble_audio_codec module is added, that supports registering supported
codecs with their corresponding configurations.
2024-03-04 08:41:25 +01:00
Krzysztof Kopyściński 8debcf0c46 apps/blestress: run all tests
All implemented tests are working now - run all of them.
2024-03-04 08:38:31 +01:00
Krzysztof Kopyściński 339f1d8b5a apps/blestress: fix test 9 - add connection params
By adding connection params with increased supervision timeout we
are able to make more connections before previous are closed.
Supervision timeout is set to its maximum value of 32s
(0x0C80 in 10ms units).This allows to achieve number of connections
declared to be supported by NimBLE: 32+.
2024-03-04 08:38:31 +01:00
Krzysztof Kopyściński 7cf4b883d4 apps/blestress: set BLE_ACL_BUF_SIZE to proper value
With current (default) CoC MPS setting we were trying to send more
than HCI packet could hold. This patch increases its size to sufficient
value.
2024-03-04 08:38:31 +01:00
Krzysztof Kopyściński b4eb3bbdd5 apps: blestress: fix test 6
Disable filtering of advertising reports, as we check the same data N
times, and only first time is registered with filtering enabled.
2024-03-04 08:38:31 +01:00
Krzysztof Kopyściński 49912bbd5b host/ble_hs: call ble_iso_rx_data if BLE_ISO_BROADCAST_SINK
BLE_ISO defines ISO as whole, but we RX iso data only when device is
broadcast sink.
2024-03-04 08:11:00 +01:00
Krzysztof Kopyściński a04a6d2ce6 host: refactor BLE Audio
This patch refactors BLE Audio library to conform to new directory tree
introduced in a9795706bea035d84d1577680e0814ceedc9dc58.

LE Audio related files present in host/include, host/src and
host/services were moved to corelated folders in host/audio.

Experimental system config BLE_AUDIO enabling LE Audio feature was introduced.

Naming convention for BLE Audio functions, structures and files was
unified - replaced `bcst` shorthand with `broadcast`. For example,
ble_audio_pub_bcst_announcement_feat was renamed to
ble_audio_pub_broadcast_announcement_feat.

Contents of host/include/ble_audio_common.h was incorporated into
host/audio/include/audio/ble_audio.h.

Apps and Auracast service were adjusted to new config and include paths.

BLE_MAX_BIG and BLE_MAX_BIS renamed to BLE_ISO_MAX_BIGS and
BLE_ISO_MAX_BISES, respectevaly.
2024-03-01 11:32:30 +01:00
piotrnarajowski 409aac4866 apps/bttester: Increase number of supported L2CAP CoC channels
Increase BLE_L2CAP_COC_MAX_NUM value to 3. This was affecting
L2CAP/ECFC/BV-27-C qualification test case.
2024-02-29 16:14:10 +01:00
Wojciech Pietraszewski ebe1e7804d host/iso: Add doxygen comments in the header file
Adds missing structures and functions documentation.
2024-02-28 16:04:52 +01:00
Mariusz Skamra a3cef58817 nimble/audio: Add LE Audio event listener
This adds dedicated event listener for LE Audio events.
2024-02-28 15:28:02 +01:00
Mariusz Skamra b3cd0b6280 nimble/audio: Add BASE parser
This adds BASE parser implementation along with unit tests.
2024-02-28 15:28:02 +01:00
Mariusz Skamra 6750a13ccb apps/btshell: Add 'silent' option to scan commands
This adds option to silent the discovery results. This is useful in case
there is another callback listener registered that handles the scan
results, and the user does not want the default handler to print the
results.
2024-02-28 08:36:04 +01:00
Mariusz Skamra 56a23bc0fe apps/btshell: Fix minor coding style issue
This fixes minor coding style issue in btshell_scan_opts.
2024-02-28 08:36:04 +01:00
Mariusz Skamra 2e368caab2 nimble/audio: Add LE Audio btshell target
This adds btshell for native target build with the LE Audio
functionality enabled.
2024-02-28 08:36:04 +01:00
Mariusz Skamra a2e68282f5 apps/btshell: Add ISO related commands
This adds ISO related commands to the btshell application.
The commands can be used for testing purposes.
2024-02-28 08:36:04 +01:00
Mariusz Skamra eacdbc36e0 nimble/iso: Fix missing BLE_ISO_BROADCAST_SOURCE guard
This makes Broadcast ISO source related code dependent on
BLE_ISO_BROADCAST_SOURCE mynewt option.
2024-02-28 08:36:04 +01:00
Mariusz Skamra 8c06f25637 nimble/iso: Add ISO Rx datapath and extend ISO Broadcast API
This adds ISO Rx datapath and along with Broadcast Sink ISO API
and implementation.
2024-02-28 08:36:04 +01:00