UWB功耗大数据插桩调研

一、摘要

|--------|---------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|------------------------|
| UWB功耗点 | 插桩点 | 日志关键字 | 电流 |
| 蓝牙持锁 | BatteryStats的锁统计 | vendor_bluetooth_lock | 30~40mA |
| 测距 | UwbSessionManager.startRanging UwbSessionManager.stoptRanging 或接入fadiKey Uwb状态广播 "com.fadiui.dkservice.action.uwb.state.change" | startRanging|stopRanging|UwbUciCore | 60~90mA (无持锁测距~持锁测距) |
[ ]

初步结论:可行,加下代码,后面实测下是否正确触发。

UWB 命令集:

adb shell dumpsys uwb

adb shell cmd uwb help

二、UWB架构

2.1 UWB 堆栈架构

UWB 堆栈由 UWB Mainline 模块和 UWB 芯片供应商提供的 HAL 实现组成。

2.2 UWB framework

三、功耗相关日志

3.1 蓝牙持锁日志

日志关键字:vendor_bluetooth_lock

复制代码
AP_Log/50_2023-07-29_101149/kernel.txt:8866:07-29 10:13:32.909 10241 10241 I PM      : PM: Pending Wakeup Sources: vendor_bluetooth_lock 898000.qcom,qup_uartAP_Log/50_2023-07-29_101149/kernel.txt:8870:07-29 10:13:32.979 10241 10241 I Abort   : Pending Wakeup Sources: vendor_bluetooth_lock 898000.qcom,qup_uartAP_Log/50_2023-07-29_101149/main.txt:34388:07-29 10:17:02.969  1301  1301 W binder:1301_2: type=1400 audit(0.0:838): avc: denied { read } for name="ssrdump" dev="dm-14" ino=259 scontext=u:r:hal_bluetooth_default:s0 tcontext=u:object_r:vendor_ramdump_vendor_data_file:s0 tclass=dir permissive=0AP_Log/51_2023-07-29_101721_boot/kernel.txt:3286:07-29 10:17:38.461   132   132 I [fadi]: active wakeup source: vendor_bluetooth_lock, active_since: 848 ms , active_count: 3 , pending suspend count: 0AP_Log/51_2023-07-29_101721_boot/kernel.txt:4219:07-29 10:18:58.329   132   132 I [fadi]: active wakeup source: vendor_bluetooth_lock, active_since: 1049 ms , active_count: 12 , pending suspend count: 0AP_Log/51_2023-07-29_101721_boot/kernel.txt:5421:07-29 10:20:08.471   132   132 I [fadi]: active wakeup source: vendor_bluetooth_lock, active_since: 161 ms , active_count: 17 , pending suspend count: 0AP_Log/51_2023-07-29_101721_boot/kernel.txt:9321:07-29 10:29:00.609   132   132 I [fadi]: active wakeup source: vendor_bluetooth_lock, active_since: 366 ms , active_count: 42 , pending suspend count: 0

3.2 UWB测距

日志关键字:startRanging|stopRanging|UwbUciCore

复制代码
AP_Log/51_2023-07-29_101721_boot/main.txt:58342:07-29 10:17:42.868  1862  5087 I UwbUciCore: uwb_ucif_proc_ranging_data: ranging_measures_length = 48 range_data_ntf_len = 232AP_Log/51_2023-07-29_101721_boot/main.txt:58343:07-29 10:17:42.868  1862  5087 I UwbUciCore: uwa_dm_uwb_response_cback:UWB_VENDOR_SPECIfIC_UCI_NTF_EVT(0x401d)AP_Log/51_2023-07-29_101721_boot/main.txt:58347:07-29 10:17:42.869  1862  5087 I UwbUciCore: uwa_dm_uwb_response_cback:UWB_RANGE_DATA_REVT(0x4011)AP_Log/51_2023-07-29_101721_boot/main.txt:58380:07-29 10:17:43.061  1862  5087 I UwbUciCore: uwb_ucif_process_event enter gid:0x62 status:0x1AP_Log/51_2023-07-29_101721_boot/main.txt:58381:07-29 10:17:43.061  1862  5087 I UwbUciCore: uwb_ucif_process_event: UWB received ntf gid:2AP_Log/51_2023-07-29_101721_boot/main.txt:58382:07-29 10:17:43.061  1862  5087 I UwbUciCore: uwb_ucif_proc_ranging_data: ranging_measures_length = 48 range_data_ntf_len = 232AP_Log/51_2023-07-29_101721_boot/main.txt:58383:07-29 10:17:43.061  1862  5087 I UwbUciCore: uwa_dm_uwb_response_cback:UWB_VENDOR_SPECIfIC_UCI_NTF_EVT(0x401d)AP_Log/51_2023-07-29_101721_boot/main.txt:58387:07-29 10:17:43.061  1862  5087 I UwbUciCore: uwa_dm_uwb_response_cback:UWB_RANGE_DATA_REVT(0x4011)AP_Log/51_2023-07-29_101721_boot/main.txt:58480:07-29 10:17:43.255  1862  5087 I UwbUciCore: uwb_ucif_process_event enter gid:0x62 status:0x2AP_Log/51_2023-07-29_101721_boot/main.txt:58481:07-29 10:17:43.255  1862  5087 I UwbUciCore: uwb_ucif_process_event: UWB received ntf gid:2AP_Log/51_2023-07-29_101721_boot/main.txt:58482:07-29 10:17:43.255  1862  5087 I UwbUciCore: uwb_ucif_proc_ranging_data: ranging_measures_length = 48 range_data_ntf_len = 232AP_Log/51_2023-07-29_101721_boot/main.txt:58483:07-29 10:17:43.255  1862  5087 I UwbUciCore: uwa_dm_uwb_response_cback:UWB_VENDOR_SPECIfIC_UCI_NTF_EVT(0x401d)

四、UWB 命令集

UWB 命令集:

adb shell dumpsys uwb

adb shell cmd uwb help

adb shell cmd uwb status

adb shell cmd uwb get-country-code

adb shell cmd uwb get-log-mode

adb shell cmd uwb enable-uwb

adb shell cmd uwb disable-uwb

adb shell cmd uwb simulate-app-state-change

adb shell cmd uwb start-fira-ranging-session

adb shell cmd uwb start-ccc-ranging-session

adb shell cmd uwb start-radar-session

adb shell cmd uwb reconfigure-fira-ranging-session

adb shell cmd uwb get-ranging-session-reports

adb shell cmd uwb get-all-ranging-session-reports

adb shell cmd uwb stop-ranging-session

adb shell cmd uwb stop-radar-session

adb shell cmd uwb stop-all-ranging-sessions

adb shell cmd uwb stop-all-radar-sessions

adb shell cmd uwb get-specification-info

adb shell cmd uwb enable-diagnostics-notification

adb shell cmd uwb disable-diagnostics-notification

adb shell cmd uwb take-bugreport

相关推荐
法迪15 天前
Linux电源管理(2)_常规的电源管理的基本概念和软件架构
linux·运维·服务器·功耗
法迪2 个月前
Windows搭建免翻墙的BatteryHistorian
windows·功耗
法迪2 个月前
为什么手机上用 mA 和 mAh 来表示功耗和能耗?
智能手机·功耗
法迪2 个月前
Android限制后台服务、广播和Activity,节省更多的电量
android·功耗
法迪3 个月前
Android自带的省电模式主要做什么呢?
android·功耗
法迪3 个月前
Android原生的HighCPU使用率查杀机制
android·java·前端·功耗
法迪3 个月前
交换区概念
功耗
法迪4 个月前
初学Linux电源管理
linux·运维·服务器·功耗
法迪4 个月前
华为 Sensor 省电策略调研
华为·功耗