自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
超宽带
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
从 Android 13 开始,Android 包含适用于超宽带 (UWB) 无线电技术的默认框架实现,该技术可在受支持的设备之间实现高度安全的精密测距。AOSP UWB 平台堆栈作为可选module提供给设备制造商。
如需详细了解该模块,请参阅模块:UWB。
架构
UWB 堆栈由 UWB Mainline 模块和 UWB 芯片供应商提供的 HAL 实现组成,如图 1 所示。
图 1. UWB 堆栈架构
AOSP 堆栈
AOSP UWB 堆栈(打包为可选模块 com.google.android.uwb
)包含以下组件:
- UWB 平台 API Surface
- 代码位置:
packages/modules/Uwb/framework
- 支持库
- 代码位置:
packages/modules/Uwb/service/support_lib
- 由符合 FiRa 定义的 UwbService 层和通用服务管理层 (CSML) 所定义的组件
- 代码位置:
packages/modules/Uwb/service
- Rust 原生 UCI 层
- UWB HAL 接口,基于由 FiRa 定义的 UWB 命令接口 (UCI) 规范
- 代码位置:
hardware/interfaces/uwb
供应商组件
供应商堆栈包含 UWB HAL 供应商实现、UWB 驱动程序和 UWB 设备。
UWB 的 API Surface
UWB 堆栈包含用于系统应用和第三方应用的 API Surface。
系统应用
设备制造商使用 android.uwb.UwbManager
系统 API Surface 允许系统应用进行低级别访问。如需使用此 API Surface,系统应用必须使用支持库 (packages/modules/Uwb/service/support_lib
)。
第三方应用
第三方应用使用 Jetpack UWB 公共 API Surface androidx.core.uwb
。如需了解详情,请参阅超宽带通信。
验证
如需验证您的 UWB 实现,请确保您的设备通过了 /cts/tests/uwb
下的 CTS 测试。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-25。"],[],[],null,["# Ultra-wideband\n\nFrom Android 13, Android includes a default framework\nimplementation for ultra-wideband (UWB) radio technology, a technology that\nenables highly secure, precise ranging between supported devices. The platform\nAOSP UWB stack is available as an optional\n[module](/docs/core/architecture/modular-system) for device manufacturers.\nFor more details on the module, see\n[Module: UWB](/docs/core/ota/modular-system/uwb).\n\nArchitecture\n------------\n\nThe UWB stack consists of the UWB mainline module and the HAL implementation\nprovided by a UWB chip vendor as shown in Figure 1.\n\n**Figure 1.** UWB stack architecture\n\n### AOSP stack\n\nThe AOSP UWB stack, packaged as an optional module, `com.google.android.uwb`,\ncontains the following components:\n\n- UWB platform API surface\n - Code location: `packages/modules/Uwb/framework`\n- Support library\n - Code location: `packages/modules/Uwb/service/support_lib`\n- UwbService layer and Common Service Management Layer (CSML) defined components defined by [FiRa](https://www.firaconsortium.org/)\n - Code location: `packages/modules/Uwb/service`\n- Rust native UCI layer\n - Code location: `external/uwb`\n- UWB HAL interface based on the UWB command interface (UCI) specification defined by [FiRa](https://www.firaconsortium.org/)\n - Code location: `hardware/interfaces/uwb`\n\n### Vendor components\n\nThe vendor stack includes a UWB HAL vendor implementation, UWB driver, and a\nUWB device.\n\nAPI surfaces for UWB\n--------------------\n\nThe UWB stack includes API surfaces for system apps and third-party apps.\n\n### System apps\n\nDevice manufacturers use the\n[`android.uwb.UwbManager`](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Uwb/framework/java/android/uwb/UwbManager.java)\nsystem API surface to allow low-level access for system apps. To use this\nAPI surface, system apps must use the support library\n(`packages/modules/Uwb/service/support_lib`).\n\n### Third-party apps\n\nThird-party apps use the Jetpack UWB public API surface,\n[`androidx.core.uwb`](https://developer.android.com/reference/kotlin/androidx/core/uwb/package-summary).\nFor more information, see\n[Ultra-wide band communication](https://developer.android.com/guide/topics/connectivity/uwb).\n\nVerification\n------------\n\nTo verify your implementation of UWB, ensure that your device passes the CTS\ntests located under `/cts/tests/uwb`."]]