Get Started

View source on GitHub

The quickest way to get started with Pyspinel is to try out the CLI:

  1. First, Install Pyspinel and dependencies without extcap.
  2. 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:

    make -f examples/Makefile-simulation
    
  3. Run the Pyspinel CLI, using the path to your simulated build:

    cd path-to-pyspinel
    spinel-cli.py -p path-to-openthread/output/simulation/bin/ot-ncp-ftd -n 1
    
    
  4. Verify the OpenThread version:

    version
    OPENTHREAD/20180926-01310-g9fdcef20; SIMULATION; Feb 11 2020 14:09:56
    
  5. Start Thread on the simulated NCP and verify that it has become the leader in a Thread network:

    panid 1234
    Done
    ifconfig up
    Done
    thread start
    Done
    state
    leader
    Done
    
  6. View the help menu to see what commands are available:

    help