Skip to content

bluetooth: close H4 transport and propagate cleanup results - #593

Draft
yangshuxuan1024 wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
yangshuxuan1024:contest161/bluetooth-h4-cleanup
Draft

yangshuxuan1024 wants to merge 1 commit into
open-vela:dev-ai-contest-2026from
yangshuxuan1024:contest161/bluetooth-h4-cleanup

Conversation

@yangshuxuan1024

@yangshuxuan1024 yangshuxuan1024 commented Sep 18, 2026

Copy link
Copy Markdown

bluetooth: close H4 transport and propagate cleanup results

目标仓库:https://github.com/open-vela/frameworks_bluetooth

目标分支:dev-ai-contest-2026;准备时目标提交:028b4ba7e39328acdf23fed0921b7c65aba2001a

提交分支:contest161/bluetooth-h4-cleanup;签署提交:102668a25d07957c6a2d7f9c8dcc6f62bd1546d6

Summary

H4 驱动原先没有 close 回调,关闭请求返回 -ENOSYS。补充 poll/UART 资源关闭,向上层传播清理结果,并保留服务跟踪和 GATT user_data 所有权辅助逻辑。

关联作品:open-vela/contest2026_161_xiaoxiaozhihuijia#3

Impact

依赖 ZBlue host 状态接口和 HCI RX 诊断接口;新增 service_trace.h 与 sal_gatt_db_ownership.h 已随补丁纳入并添加许可标识。

Testing

最新目标分支补丁应用及空白检查通过。旧基线 ARM/allsyms 已完成;真实控制器 RESET、在途 RX/TX 关闭及重复启动未整体通过验收。

本次未修改算法、阈值或已交付固件,未执行 ARM 编译或烧录。历史构建采用 Linux、ARM GCC 10.3.1、CMake 3.22.1、Ninja 1.10.1,目标为黄山派 SF32LB52。原始验证范围见作品仓 evidence/v28_bootfix。

提交状态

本 PR 以 Draft 发布,保留上述未验证项。等待维护者审核及实际 CLA / CI 结果;补丁可应用不代表 CI 或完整集成测试通过。

涉及文件:

  • framework/api/bluetooth.c
  • service/common/service_loop.c
  • service/common/service_trace.h
  • service/src/adapter_service.c
  • service/stacks/include/sal_adapter_le_interface.h
  • service/stacks/zephyr/hci_h4.c
  • service/stacks/zephyr/sal_adapter_le_interface.c
  • service/stacks/zephyr/sal_gatt_db_ownership.h
  • service/stacks/zephyr/sal_gatt_server_interface.c
  • service/stacks/zephyr/sal_le_advertise_interface.c

公共依赖关联

LVGL 与 const-allsyms 可独立审阅;HCI 快照接口、SiFli、ZBlue 与 Bluetooth 需协调审阅及集成验证。

@github-actions

Copy link
Copy Markdown

⚠️ Unable to Verify CLA — Commits Use GitHub Noreply Emails

@yangshuxuan1024 We couldn't verify your CLA because every commit in this PR uses a GitHub noreply email address:

  • 284936491+yangshuxuan1024@users.noreply.github.com

This usually means "Keep my email addresses private" is enabled in your GitHub account, so your commits can't be matched to a signed CLA.

Fix steps (to be done by the PR author @yangshuxuan1024):

  1. Confirm your real email has signed the CLA: sign with your real email at https://www.openvela.com/#/community/cla
  2. Disable GitHub email privacy (optional): GitHub → Settings → Emails, uncheck "Keep my email addresses private", or note the real email you want to use.
  3. Rewrite the commits in this PR so their author is your real email, then force-push:
git config user.email "the-real-email-you-signed-the-cla-with"
git config user.name  "Your Name"
# Rewrite the author/committer of every commit on this branch to the current user.email
git rebase -r --root --exec "git commit --amend --no-edit --reset-author"
git push -f

(If the branch has only a couple of commits, you can also run git rebase -i and mark each commit with --reset-author.)

  1. After the force-push, the CLA workflow reruns automatically; you can also comment /check-cla on the PR to re-trigger the check.

📋 View detailed check results: Action Run #35354426870


💡 Tip: Use the same email you signed the CLA with — that's how we confirm the signature.

Signed-off-by: yangshuxuan1024 <yangshuxuan1024@gmail.com>
@yangshuxuan1024
yangshuxuan1024 force-pushed the contest161/bluetooth-h4-cleanup branch from 238c974 to 102668a Compare September 18, 2026 14:17

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant