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

相关推荐
法迪3 天前
交换区概念
功耗
法迪1 个月前
初学Linux电源管理
linux·运维·服务器·功耗
法迪1 个月前
华为 Sensor 省电策略调研
华为·功耗
法迪2 个月前
南山区的妈祖庙
功耗
法迪2 个月前
Wireshark如何查看数据包时间间隔
服务器·网络·wireshark·功耗
小白也想学C3 个月前
Android 功耗分析(底层篇)
android·功耗
法迪3 个月前
DataWind 查看单个维度的2个版本间数据差异值的方法
功耗
法迪3 个月前
【功耗现象】com.gorgeous.lite后台Camera 使用2小时平均电流200mA耗电量400mAh现象
功耗
法迪3 个月前
Android自启动管控
android·dubbo·功耗