安装选项取决于您使用 Pyspinel 的方式。
Extcap 是 Wireshark 的一个插件,允许 Wireshark 使用 Pyspinel 二进制文件作为捕获接口。Extcap 减少了使用 Wireshark 嗅探 Thread 数据包所需的设置和配置,因为它不需要写入捕获文件。使用此选项时,配置在 Wireshark 中进行管理和保存,例如设置 Thread 通道并从 GUI 中选择 RCP 或 NCP 设备路径。
您也可以在不使用 extcap 插件的情况下使用 Wireshark。此选项提供
对 Pyspinel 标志的命令行访问权限,让您能够使用
各种配置运行嗅探器。您可以在每次运行嗅探器时设置这些标志,例如 --channel 15 --uart /dev/ttyACM0。
在不使用 extcap 的情况下安装 Pyspinel 和依赖项
- 安装依赖项:
sudo apt install python3-pippip3 install --user pyserial ipaddress - 克隆 Pyspinel 代码库:
git clone https://github.com/openthread/pyspinel - 安装 Pyspinel:
cd pyspinelsudo python3 setup.py install
或者,通过安装 pyspinel 软件包来设置环境。请注意
,此软件包使用的是 Pyspinel v1.0.0a3 版本,而不是
最新的 Pyspinel 主版本。
pip3 install --user pyspinel
如需在不使用 extcap 插件的情况下使用 Pyspinel,请参阅使用 Pyspinel 进行数据包嗅探。
在使用 extcap 的情况下安装 Pyspinel 和依赖项
- 安装依赖项:
sudo apt install python3-pippip3 install --user pyserial ipaddress - 克隆 Pyspinel 代码库:
git clone https://github.com/openthread/pyspinel - 打开 Wireshark。依次前往帮助 、关于 Wireshark ,然后选择 文件夹 标签页。Extcap 路径 条目列出了 extcap 位置。记下此位置。
- 使用 Wireshark 中的 extcap 路径安装 Pyspinel:
cd pyspinelsudo python3 setup.py install --extcap-path=extcap-path
或者,通过安装 pyspinel 软件包来设置环境:
pip3 install pyspinel --install-option="--extcap-path=extcap-path"
如需在使用 extcap 插件的情况下使用 Pyspinel,请参阅使用 Extcap 进行数据包嗅探。