参考文档:
A New Way to Debug iOS Bluetooth Applications
一、需要的环境
-
iOS 13 device and cable
-
Mac computer/laptop
-
Apple Developer Program account
二、在iOS设备上安装Profiles文件
在手机浏览器打开链接
https://developer.apple.com/bug-reporting/profiles-and-logs/?name=bluetooth
在浏览器中点击Profile,下载文件
点击运行下载
在设置中找到描述文件,点击安装
三、安装Xcode
在App Store下载Xcode
四、安装packetLogger
通过
链接
,下载安装 Additional Tools ,点击Hardware,点击packetLogger应用
五、启动蓝牙数据包分析
连接设备,点击File-》New iOS Trace,打开一个新窗口
packketlogger将开始跟踪此配置文件安装的iOS设备上的所有蓝牙活动。在这个iOS设备屏幕的左上角,将显示一个脉冲图标(见下图)。这意味着跟踪正在进行中。
According to this session of WWDC 2019, the packetLogger can:
-
Work as a Bluetooth packet analysis application
-
Decode all protocols defined by the Bluetooth Special Interest Group * (SIG) and Apple
-
Perform rich filtering options
-
Search by text regex
-
Comment and flag packets
-
Export raw data for analysis