The quickest way to get started with Pyspinel is to try out the CLI:
- First, Install Pyspinel and dependencies without extcap.
Directly on your machine, clone and build a simulated OpenThread NCP as described in How to build OpenThread. After cloning and bootstraping, build the sim example:
./script/cmake-build simulation
Run the Pyspinel CLI, using the path to your simulated build:
cd path-to-pyspinel
spinel-cli.py -p path-to-openthread/build/simulation/examples/apps/ncp/ot-ncp-ftd -n 1
Verify the OpenThread version:
version
OPENTHREAD/thread-reference-20200818-1938-g0f10480ed; SIMULATION; Aug 30 2022 10:53:44 DoneStart Thread on the simulated NCP and verify that it has become the leader in a Thread network:
panid 1234
Doneifconfig up
Donethread start
Donestate
leader DoneView the help menu to see what commands are available:
help