Commit Graph

236 Commits

Author SHA1 Message Date
Zihao Gao 406593e3ac gattc: refactor to use debug module and add build config
Bug: v/87379

Refactor gattc_service.c to use the new debug module:
- Include gattc_internal.h and gattc_debug.h
- Remove local struct definitions (moved to gattc_internal.h)
- Replace inline logging with debug module functions
- Remove dump_services() (moved to gattc_debug.c)

Add CONFIG_BLUETOOTH_GATT_CLIENT_DEBUG Kconfig option:
- Default enabled (y) for backward compatibility
- When disabled, debug functions become empty macros
- Reduces code size by removing log strings

Update Makefile and CMakeLists.txt to conditionally compile
gattc_debug.c based on the config option.

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2026-04-27 23:14:55 +08:00
zhangyuan20 d9e407836e CS: add cs config and makefile.
bug: v/80281

Rootcause: Add CS configuration and makefile to manage CS compilation.

Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
2026-04-27 23:14:55 +08:00
liuxiang18 7baa3e9add bluetooth: add zblue settings save & load implement - BLE keys.
bug: v/79394

Implement the SAL layer callback function for settings storage.
include:
1. SAL zblue_on_ltk_notify & zblue_on_ltk_load
2. add adapter_get_smp_data API
3. add adapter_get_local_csrk API

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-04-27 23:14:53 +08:00
Kai Cheng c6ba6fab4f blueototh: fix audio build break in le only mode
bug: v/76636

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-27 23:14:53 +08:00
liuxiang18 415be99036 bluetooth: adapt storage update module Makefile & CMakeLists
bug: v/71113

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-04-27 23:14:53 +08:00
Kai Cheng 3e328ff2f5 bluetooth: merged bt driver thread to btservice loop thread
bug: v/76633

remove bt driver thread, and merger it to service loop thread

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-27 23:14:52 +08:00
wuxiaodong6 616c09ec15 Move the internal header files out to include common
bug: v/73268

Signed-off-by: wuxiaodong6 <wuxiaodong6@xiaomi.com>
2026-04-27 23:14:52 +08:00
gaoyuan28 7414987dde use jidl-rust tool to add bluetooth features
bug: v/53049

Signed-off-by: gaoyuan28 <gaoyuan28@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia 5ee1c6944a bluetooth: Remove the macro control for bluetooth_ble_impl.c in Makefile and CMakeLists.
bug: v/67404

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia 1aa0a59c97 ipc: trace async api
bug: v/62087

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:52 +08:00
zhongzhijie1 e52b434172 gattc/feature: add high-level GATT client, local DB, and async ops
bug: v/62106

Add feature-layer GATT client (gatt_client_t) wrapping low-level GATTC callbacks.
Build a local services DB from discovery (service/characteristic/descriptor).
Provide stable UUID handle lookups and helpers (service/char/desc finders).
Implement async read/write for characteristics and descriptors, notify subscribe/unsubscribe, and MTU exchange.

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia 6ab8107575 ipc: gattc async api
bug: v/62106

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:52 +08:00
Kai Cheng 89d1a7df7a bluetooth: add gatt client and server config
bug: v/51584

add gatt client and server config

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-27 23:14:52 +08:00
Kai Cheng cb99b4546c blueototh: add ipc and service config
bug: v/51584

add ipc and service profile config

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-27 23:14:52 +08:00
Kai Cheng adc08df0a4 blueotooth: add log config
bug: v/51584

add CONFIG_BLUETOOTH_LOG config

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia bb96c36bb5 bluetooth: Increase BR gap data analytics with dfx.
bug: v/65489

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:52 +08:00
Lu Jia 79655b85f6 bluetooth: Add kconfig and makefile for the asynchronous API feature.
bug: v/63431

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:51 +08:00
chejinxian1 26a70f7af7 Bluetooth: add the stack size configuration option for the Bluetooth task.
bug: v/61147

Rootcause:The stack size parameter of the Bluetooth task should be set through configuration options to allow adaptation on different platforms.

Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2026-04-27 23:14:51 +08:00
Lu Jia e781787517 bluetooth: When removing the bond, first disconnect the profile and then disconnect the ACL.
bug: v/59903

Root cause: When removing the bond, zblue only disconnects the ACL, not the profile. As a result, the A2DP connection fails when reconnecting next time.

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:51 +08:00
liuxiang18 c4b13fe7b2 Makegile: fix adapter sal API undefined error when close bredr
bug: v/61048

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-04-27 23:14:51 +08:00
chengkai af0bdfa8ac bluetooth: add bt trace tool
bug: v/59594

Signed-off-by: chengkai <chengkai@xiaomi.com>
2026-04-27 23:14:51 +08:00
chengkai d9cecb6987 bluetooth: add bt memory debug tool.
bug: v/59567

rootcause: add bt memory debug, support memory out-of-bounds check,
peak memory printing, and memory leak check
2026-04-27 23:14:51 +08:00
fangzhenwei 3d0232691d sal: update zephyr 4.0 SAL
bug: v/49964

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2026-04-27 23:14:50 +08:00
Zihao Gao 3b5e43eee4 zephyr: fix compiling issues.
bug: v/45540

Signed-off-by: Zihao Gao <gaozihao@xiaomi.com>
2026-04-27 23:14:50 +08:00
zhangyuan20 60072ab342 framework/avrcp: add metadata support for avrcp control in BT Service
bug: v/42362

Rootcause: Avrcp control lacks metadata interface, add get metadata interface and callback for avrcp control

Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
2026-04-27 23:14:50 +08:00
chejinxian1 5c99058bde OS-Upgrade: Add a BT storage transformation tool.
bug: v/47945

Rootcause: Due to the differences in the storage format of Bluetooth information in different system versions, in order to ensure that saved information can continue to be used after system upgrades, the storage transformation tool has been added.

Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2026-04-27 23:14:50 +08:00
jialu b05d6fe309 AVRCP: add avrcp metadata feature
bug:v/42364

Adding AVRCP metadata feature

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-27 23:14:50 +08:00
chejinxian1 636900a3ae Bluetooth: Add the Connection Manager(CM) module to manage performance enhancement features on different ACLs.
bug: v/43848

Rootcause: Some ACL need to add some enhanced features to provide a better Bluetooth communication experience. This submission is a part of the project and is intended for building a management framework.

Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2026-04-27 23:14:50 +08:00
openvela-robot 9d0c825cbb Merge commit
Change-Id: If26995eebd18a82ac4cd827e6801458e57a6ead3
2026-04-27 23:14:50 +08:00
liyuheng af9dca3bd3 zblue: add sal hfp C file
Signed-off-by: liyuheng <liyuheng@xiaomi.com>
2026-04-20 14:52:55 +08:00
liuxiang18 6258bc51f6 bluetooth: add zblue settings save & load implement - BLE keys.
Implement the SAL layer callback function for settings storage.
include:
1. SAL zblue_on_ltk_notify & zblue_on_ltk_load
2. add adapter_get_smp_data API
3. add adapter_get_local_csrk API

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-04-20 14:52:52 +08:00
Kai Cheng 41fb3880c1 blueototh: fix audio build break in le only mode
Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:50 +08:00
zhongzhijie1 e577cde037 gattc/feature: Add configuration for the advanced interface of the GATT client
Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:50 +08:00
Kai Cheng f2f510ea70 blueooth: add HID SAL feature
This commit implements the HID Service Abstraction Layer (SAL) for
Zephyr Bluetooth stack integration. The main changes include:

- Add HID device compilation support in Makefile when
  CONFIG_BLUETOOTH_HID_DEVICE is enabled
- Implement HID device service abstraction layer interface
  (sal_hid_device_interface) with complete API set
- Support HID device registration and SDP service record management
- Provide connection management for HID device profiles
- Implement report data handling (send/receive) and error reporting
- Support virtual cable unplug functionality

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:49 +08:00
wuxiaodong6 28359ce32a Feature error code mapping
Rootcause: mapping of Bluetooth error codes and feature error codes

Signed-off-by: wuxiaodong6 <wuxiaodong6@xiaomi.com>
2026-04-20 14:52:49 +08:00
Kai Cheng efaa093fb6 bluetooth: add SAL SPP feature for zblue stack
This patch adds SPP feature to the Bluetooth stack, including server and client implementation based on RFCOMM and SDP.
Changes:
Add SPP compilation option in Makefile.
Add debug log in spp_service.c.
Implement SPP interface in sal_spp_interface.h and sal_spp_interface.c.

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:49 +08:00
chejinxian1 799d6fbeb8 L2CAP: Add L2CAP command handling and initialization functions.
Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2026-04-20 14:52:46 +08:00
Kai Cheng 3e0f81ee7a bluetooth: fix bt_trace module ci break
fix bt_trace module ci break with
CONFIG_BLUETOOTH_DEBUG_TRACE

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:44 +08:00
Kai Cheng 322b5b057c bluetooth: merged bt driver thread to btservice loop thread
remove bt driver thread, and merger it to service loop thread

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:43 +08:00
Kai Cheng ef7747f1c2 bluetooth: add gatt client and server config
add gatt client and server config.openvela:
35ed1ce372

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:43 +08:00
Kai Cheng 90f48b68f1 blueototh: add ipc and service config
add ipc and service profile config,openvela:
e840abb60d

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:43 +08:00
Kai Cheng 654a99c319 blueotooth: add log config
add CONFIG_BLUETOOTH_LOG config.openvela:
c293a113f0

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:43 +08:00
Kai Cheng 4d1a30d7fe blueototh: add connection mgr config
add BLUETOOTH_CONNECTION_MANAGER config.openvela:
b042d370fa

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:42 +08:00
Kai Cheng 2aff88bf42 bluetooth: add hci filter config
add BLUETOOTH_HCI_FILTER config  to  build.openvela:
27ed5894b2

Signed-off-by: Kai Cheng <chengkai@xiaomi.com>
2026-04-20 14:52:42 +08:00
zhangyuan20 6a88787215 BT & Media Tinycompress.
Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
2026-04-20 14:52:39 +08:00
liuxiang18 a674408319 bluetooth: adapt storage update module Makefile & CMakeLists
Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2026-04-20 14:52:37 +08:00
Lu Jia a4e052e57f bluetooth: Fix dfx compilation error
/apps/frameworks/connectivity/bluetooth/dfx/event_bt.xml are the same file
 make[3]: *** [Makefile:487: context] Error 1

Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:36 +08:00
Lu Jia 04f2a45d38 bluetooth: Adapt to the new dfx framework.
Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:36 +08:00
Lu Jia 18c11e52e5 bluetooth: Increase BR gap data analytics with dfx.
Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:34 +08:00
Lu Jia 86a137e545 Fix the compilation warning issue when enabling the Bluetooth feature.
Signed-off-by: jialu <jialu@xiaomi.com>
2026-04-20 14:52:14 +08:00