Commit Graph

228 Commits

Author SHA1 Message Date
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 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
Krzysztof Kopyściński 365468bfec nimble/host: prepare for Broadcast sink
This patch renames files, functions and configs from `broadcaster` to
`broadcast source` so new `broadcast sink` files and functions can be
created. Adds `BLE_ISO_BROADCAST_SINK` sysconfig
2024-02-26 15:16:07 +01:00
Szymon Janc eeceff90f3 nimble/ports: Refresh syscfg 2024-02-23 14:55:39 +01:00
Szymon Janc 0abf84dc70 porting: Use mynewt_main in sample app
This app is used to update syscfg for ports.
2024-02-23 14:55:39 +01:00
Szymon Janc 0b59865e3a porting: Don't include logcfg in ports
logcfg is not used in porting anymore.
2024-02-23 14:55:39 +01:00
Szymon Janc 4d1055b014 porting/linux: Fix link in README
Readme was using very old (dead) link to BLE guide.
2024-01-24 09:55:27 +01:00
Hang Fan e6882b5b6d porting/examples: fix ble_hci_sock_init assertion
Since HCI socket was initialized by `ble_transport_ll_init` in LL side,
we should remove `ble_hci_sock_init` from example apps.

Signed-off-by: Hang Fan <fanhang8@gmail.com>
2023-12-31 20:26:20 +01:00
Krzysztof Kopyściński bbba284d52 porting: update syscfg after ISO Broadcast implementation. 2023-12-04 09:27:13 +01:00
Szymon Janc da4e2f0f12 porting: Remove dependency on Mynewt logging system
Define NPL interface that can be used by ports to implement logging.
2023-10-06 08:39:35 +02:00
Peter Hjärtquist 080e6d3135 Add comment about NIMBLE_NPL_OS_EXTRA_INCLUDE 2023-10-02 13:43:44 +02:00
Peter Hjärtquist 6b51531432 porting/npl/freertos: Add way of including HW specific header 2023-10-02 13:43:44 +02:00
CW-B-W bf76183741 porting/nimble_port: fix controller not initialized
When using external controller, ble_transport_ll_init() was not
run because of NIMBLE_CFG_CONTROLLER was not defined.
But under current architecture ble_transport_ll_init() should also
be run to initialize the communication interface.
2023-09-20 08:59:08 +02:00
Hang Fan 9d4f474bf8 porting/linux: fix deadlock in ble_npl_hw_enter_critical
Fix wrong mutex attributes in pthread_mutexattr_settype.
It can cause deadlock after locked.

Signed-off-by: Hang Fan <fanhang8@gmail.com>
2023-09-20 08:50:43 +02:00
Łukasz Rymanowski 0711811c9f nimble/gatt: Add support for newt ATT opcodes
This is initial implementation of handling new GATT opcodes.
Gatt Client supports now:
ATT multi Variable read req
receiving ATT multi notifications

Gatt server supports now:
ATT multi Variable read rsp
2023-08-24 10:26:53 +02:00
Łukasz Rymanowski 133cafdac2 nimble/host: Initial EATT support
The idea for EATT in Mynewt is as follow.
EATT is not exposed to the user i.e. GATT API stays the same. User can
define number of EATT channels supported by the host and it is host
managing those channels.
EATT will be fist choice channel for every ATT operation. In the future
we can make it smarted and make a choice based on the ATT data in the
packet

TODO:
* handle reading and setting client/server Supported features in the
stack instead of eatt code
* add test API to choose channel to use (needed by PTS)
2023-08-24 10:26:53 +02:00
yuzhigang84@gmail.com e718a2fb22 porting/npl/linux: support C library (for example:musl) which didn't have PTHREAD_MUTEX_RECURSIVE_NP 2023-08-02 21:29:37 +02:00
Petro Karashchenko 3720e7656c porting/examples/linux: update steps in README.md
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-01 08:44:18 +02:00
Deomid "rojer" Ryabkov 064f050919 porting/npl/linux: PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is a GNU extension
Need to provide `__USE_GNU` hint to pthread.h
2023-07-20 21:57:23 +02:00
Szymon Janc fd20c10596 porting/npl: Fix linux tests build
For now build with -m32 flag.
2023-07-20 21:56:27 +02:00
Szymon Janc 9bf905ffd5 porting/npl: Fix linux tests makefile clean target
clean target was failing if there was incomplete build.
2023-07-20 21:56:27 +02:00
Deomid "rojer" Ryabkov 188256f1ef porting/npl/linux: Replace pthread_yield() with sched_yield()
Per `pthread_yield(3)`:
```
  This call is nonstandard, but present on several other systems.
  Use the standardized sched_yield(2) instead.
```
2023-07-20 18:47:20 +02:00
Deomid "rojer" Ryabkov 18738b2743 if MYNEWT -> ifdef MYNEWT
Currently there's a mix of `#if MYNEWT` and `#ifdef MYNEWT` used
in the codebase to check if the environment is Mynewt or not.
This is incompatible with `-Wundef`, so switch common parts of the code to
uniformly use `#ifdef`.
2023-07-20 15:15:07 +02:00
Mingjie Shen cc556e97f4 porting: Add missing return statement 2023-07-19 13:54:20 +02:00
Mingjie Shen 28649933ad porting/examples: Fix implicit function declaration 2023-07-19 13:53:55 +02:00
Petro Karashchenko 62cfff4840 porting/npl/nuttx: add support for thread names
Use pthread_setname_np() to set names for created tasks

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-08 22:08:07 +02:00
Petro Karashchenko a0f74cd181 porting/examples/nuttx: align parameters passed to ble_npl_task_init()
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-07-08 22:08:07 +02:00
Bas van den Berg 333c575bbf build: fix various compile warnings
mostly comparison signed vs unsigned and possible un-initialized usage
2023-04-17 13:13:02 +02:00
raiden00pl 88758a8107 porting/nuttx/example: perform initialization if not done by NSH
For example, when Nimble NuttX example is the entry point for users applications.
2023-03-14 01:17:11 +01:00
Szymon Janc 17a8e61fde porting: Remove unused SYSINIT_PANIC_MSG
Those are no longer used.
2023-02-21 17:12:42 +01:00
Xiang Xiao e0e9629afe porting/nuttx; Fix error: unrecognized command-line option '-m32'
-m32 is supported by x64 toolchain, not arm-none-eabi-gcc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-21 12:12:26 +01:00
Szymon Janc efb9058a42 nimble/ll: Add option to control initial DLE update
New option allows to select if controller should initiate DLE update
automatically for connection. By default it is enabled to not change
existing controller behavior.
2023-02-10 14:49:51 +01:00
Xiang Xiao 69c0d323a9 porting: Fix SYSINIT_PANIC_ASSERT_MSG refinition warning
porting/npl/nuttx/include/nimble/nimble_npl_os.h:40: warning: "SYSINIT_PANIC_ASSERT_MSG" redefined
   40 | #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \
      |
nimble/host/services/tps/src/ble_svc_tps.c:22:
porting/nimble/include/sysinit/sysinit.h:32: note: this is the location of the previous definition
   32 | #define SYSINIT_PANIC_ASSERT_MSG(rc, msg)   assert(rc)
      |

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-08 16:12:16 +01:00
Szymon Janc 674eeafa0b nimble/ports: Refresh syscfg 2023-02-07 08:37:18 +01:00
Xiang Xiao ed083b36cb porting/nuttx: Fix error: implicit declaration of function 'usleep'
Report here:
https://github.com/apache/nuttx/actions/runs/4098214664/jobs/7067171681

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-06 08:44:58 +01:00
Szymon Janc 33942430e3 nimble/ports: Refresh syscfg 2023-02-02 20:04:35 +01:00
Szymon Janc 58a71bad16 portling/linux: Fix build on latest Fedora
This leads to implicit include of unistd.h which provides link symbol
that collide with mesh internal symbols. If needed c files may include
it directly.
2022-12-13 00:21:58 +01:00
Szymon Janc 2587fbfd8b nimble/mesh: Fix build on linux
Use MIN/MAX macros instead of min/max.
2022-12-13 00:21:58 +01:00
Szymon Janc eddc008fa5 porting/examples: Fix build error on linux
Since 'using namespace std' was removed from public header it is
needed to explicitly use it when using std::list
2022-12-13 00:21:58 +01:00
timoxd7 cea78d32c2 Fixed min/max formatting 2022-11-22 10:07:45 +01:00
timoxd7 32f2ab3ab6 Moved min/max macros from global scope in header file to translation unit exlusice c files 2022-11-22 10:07:45 +01:00
timoxd7 639da1a0f3 Removed 'using namespace std;' from header file 2022-11-22 10:07:45 +01:00
Rahul Tank 18203ccafc nimble/host: Add HCI Commands/ events for connection subrating 2022-10-05 16:09:52 +02:00
Szymon Janc b21575c894 nimble/ports: Refresh syscfg 2022-10-03 15:22:29 +02:00
Hang Fan d21a386e96 porting/examples: Fix build error
Add default macro of MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT
to avoid build error.
2022-09-27 08:32:45 +02:00
Szymon Janc 60b51b0b80 nimble/ports: Refresh syscfg 2022-09-08 11:58:53 +02:00
larry a77acc4250 porting/npl/nuttx: fix callout_handler implement
callout_thread is working for all timeout callout, it need
an endless loop to catch all message.
2022-08-04 09:01:51 +02:00
Krzysztof Kopyściński acaa9351b1 nimble/host/sm: rename BLE_SM_SC_LVL to BLE_SM_LVL
This rename makes it consistent with Core specification Vol. 3,
part C, 10.2.1 LE security mode 1. This level specifies security
requirements for both SC and legacy pairing, not only SC.
Updated description of this setting.
2022-06-29 13:53:36 +02:00
Hauke Petersen 49001982f2 porting/os_mbuf: silence Wcast-align warnings 2022-06-02 10:10:26 +02:00
Hauke Petersen 510dc550ed porting: fix transport init in nimble_port.c 2022-06-02 10:10:26 +02:00