抓包准备
- 抓包用的硬件,nRF52DK(也可以是其他的,公司有块pca10040,可以使用)
- Wireshark(http://192.168.2.91/shared/software/ble-Sniffer/Wireshark-win64-3.0.7.exe)
- python 3 (http://192.168.2.91/shared/software/python-3.8.0-amd64.exe)
- Wireshark nrf插件(http://192.168.2.91/shared/software/ble-Sniffer/nrf_sniffer_for_bluetooth_le_3.0.0_129d2b3.zip)
步骤
- 安装Wireshark、python
- 安装Wireshark nrf插件 (具体可参考https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_sniffer_ble%2FUG%2Fsniffer_ble%2Finstalling_sniffer_plugin.html)
- 上面连接打开比较慢,可能需要代理
- 这里写一下简易流程
- Help > About Wireshark (on Windows or Linux) or Wireshark > About Wireshark (on macOS)
- Select the Folders tab.
- Double-click the location for the Extcap path to open this folder
- Copy the contents of the Sniffer_Software/extcap/ folder into this folder
- 解释 就是拿到Wireshark 插件目录,然后将下载的 Wireshark nrf插件 中extcap里面的所有文件复制到Wireshark 插件目录中
- 在目录中打开 cmd 执行一下操作(确保python 和 pip3 命令可用,不能用就是没有配置环境变量)
pip3 install -r requirements.txt .\nrf_sniffer_ble.bat --extcap-interfaces - 插上nRF52DK,打开Wireshark 就能看到nRF开头文字,双击后就能抓包了,在过滤窗口可以输入 btmesh 来进行过滤 否则数据太多了