Your installation options depend on how you use Pyspinel.
Extcap is a plugin for Wireshark that allows it to use the Pyspinel binary as a capture interface. Extcap reduces the setup and configuration needed to sniff Thread packets using Wireshark, as it does not require writing to a capture file. With this option, configurations are managed and saved in Wireshark, for example setting your Thread channel and selecting your RCP or NCP device path from the GUI.
You can also use Wireshark without the extcap plugin. This option provides
command line access to Pyspinel flags, allowing you to run the sniffer with
various configurations. You can set these flags every time you run the sniffer,
for example, --channel 15 --uart /dev/ttyACM0
.
Install Pyspinel and dependencies without extcap
- Install dependencies:
sudo apt install python3-pip
pip3 install --user pyserial ipaddress
- Clone the Pyspinel repository:
git clone https://github.com/openthread/pyspinel
- Install Pyspinel:
cd pyspinel
sudo python3 setup.py install
Alternatively, set up the environment by installing the pyspinel
package. Note
that this package uses the Pyspinel v1.0.0a3 release and not
the latest Pyspinel main.
pip3 install --user pyspinel
To use Pyspinel without the extcap plugin, refer to Packet Sniffing with Pyspinel.
Install Pyspinel and dependencies with extcap
- Install dependencies:
sudo apt install python3-pip
pip3 install --user pyserial ipaddress
- Clone the Pyspinel repository:
git clone https://github.com/openthread/pyspinel
- Open Wireshark. Go to Help, then About Wireshark and select the Folders tab. The Extcap path entry lists the extcap location. Make note of this location.
- Install Pyspinel, using the extcap path from Wireshark:
cd pyspinel
sudo python3 setup.py install --extcap-path=extcap-path
Alternatively, set up the environment by installing the pyspinel package:
pip3 install pyspinel --install-option="--extcap-path=extcap-path"
To use Pyspinel with the extcap plugin, refer to Packet Sniffing using Extcap.