安裝選項取決於您使用 Pyspinel 的方式。
Extcap 是 Wireshark 的外掛程式,允許它使用 Pyspinel 二進位檔做為擷取介面。Extcap 減少了使用 Wireshark 掃描 Thread 封包所需的設定和設定,因為不需要寫入擷取檔案。採用這個選項後,系統會在 Wireshark 中管理及儲存設定,例如設定 Thread 管道,然後從 GUI 中選取 RCP 或 NCP 裝置路徑。
您也可以在沒有 extcap 外掛程式的情況下使用 Wireshark。這個選項可讓您使用 Pyspinel 標記的指令列存取功能,方便您執行各種設定。每次執行分隔符 (例如 --channel 15 --uart /dev/ttyACM0
) 時,您都可以設定這些標記。
安裝 Pyspinel 和依附元件 (沒有 capcap)
- 安裝依附元件:
sudo apt install python3-pip
pip3 install --user pyserial ipaddress
- 複製 Pyspinel 存放區:
git clone https://github.com/openthread/pyspinel
- 安裝 Pyspinel:
cd pyspinel
sudo python3 setup.py install
或是安裝 pyspinel
套件來設定環境。請注意,這個套件使用 Pyspinel v1.0.0a3 版本,而非最新的 Pyspinel 主要版本。
pip3 install --user pyspinel
如要在不使用 extcap 外掛程式的情況下使用 Pyspinel,請參閱Packet Sniffing with Pyspinel。
安裝 Pyspinel 和依附元件與 extcap
- 安裝依附元件:
sudo apt install python3-pip
pip3 install --user pyserial ipaddress
- 複製 Pyspinel 存放區:
git clone https://github.com/openthread/pyspinel
- 開啟 Wireshark。依序前往「Help」(說明) >「About Wireshark」(關於 Wireshark),然後選取「Folders」(資料夾) 分頁標籤。Extcap path (執行路徑路徑) 項目會列出擷取點位置。請記下這個位置。
- 使用 Wireshark 的 extcap 路徑安裝 Pyspinel:
cd pyspinel
sudo python3 setup.py install --extcap-path=extcap-path
或是安裝 pyspinel 套件來設定環境:
pip3 install pyspinel --install-option="--extcap-path=extcap-path"
如要將 Pyspinel 與 extcap 外掛程式搭配使用,請參閱使用 Extcap 封包封包。