1*cfb92d14SAndroid Build Coastguard Worker# OpenThread Simulation on POSIX 2*cfb92d14SAndroid Build Coastguard Worker 3*cfb92d14SAndroid Build Coastguard WorkerThis directory contains example platform drivers for simulation on POSIX. 4*cfb92d14SAndroid Build Coastguard Worker 5*cfb92d14SAndroid Build Coastguard Worker## Build Examples 6*cfb92d14SAndroid Build Coastguard Worker 7*cfb92d14SAndroid Build Coastguard Worker```bash 8*cfb92d14SAndroid Build Coastguard Worker$ cd <path-to-openthread> 9*cfb92d14SAndroid Build Coastguard Worker$ mkdir build && cd build 10*cfb92d14SAndroid Build Coastguard Worker$ cmake -GNinja -DOT_PLATFORM=simulation .. 11*cfb92d14SAndroid Build Coastguard Worker$ ninja 12*cfb92d14SAndroid Build Coastguard Worker``` 13*cfb92d14SAndroid Build Coastguard Worker 14*cfb92d14SAndroid Build Coastguard WorkerAfter a successful build, the `elf` files are found in: 15*cfb92d14SAndroid Build Coastguard Worker 16*cfb92d14SAndroid Build Coastguard Worker- `<path-to-openthread>/build/examples/apps/cli` 17*cfb92d14SAndroid Build Coastguard Worker- `<path-to-openthread>/build/examples/apps/ncp` 18*cfb92d14SAndroid Build Coastguard Worker 19*cfb92d14SAndroid Build Coastguard Worker## Interact 20*cfb92d14SAndroid Build Coastguard Worker 21*cfb92d14SAndroid Build Coastguard Worker1. Spawn the process: 22*cfb92d14SAndroid Build Coastguard Worker 23*cfb92d14SAndroid Build Coastguard Worker```bash 24*cfb92d14SAndroid Build Coastguard Worker$ cd <path-to-openthread>/build/simulation/examples/apps/cli 25*cfb92d14SAndroid Build Coastguard Worker$ ./ot-cli-ftd 1 26*cfb92d14SAndroid Build Coastguard Worker``` 27*cfb92d14SAndroid Build Coastguard Worker 28*cfb92d14SAndroid Build Coastguard Worker2. Type `help` for list of commands. 29*cfb92d14SAndroid Build Coastguard Worker 30*cfb92d14SAndroid Build Coastguard Worker```bash 31*cfb92d14SAndroid Build Coastguard Worker> help 32*cfb92d14SAndroid Build Coastguard Workerhelp 33*cfb92d14SAndroid Build Coastguard Workerchannel 34*cfb92d14SAndroid Build Coastguard Workerchildtimeout 35*cfb92d14SAndroid Build Coastguard Workercontextreusedelay 36*cfb92d14SAndroid Build Coastguard Workerextaddr 37*cfb92d14SAndroid Build Coastguard Workerextpanid 38*cfb92d14SAndroid Build Coastguard Workeripaddr 39*cfb92d14SAndroid Build Coastguard Workerkeysequence 40*cfb92d14SAndroid Build Coastguard Workerleaderweight 41*cfb92d14SAndroid Build Coastguard Workermode 42*cfb92d14SAndroid Build Coastguard Workernetdata register 43*cfb92d14SAndroid Build Coastguard Workernetworkidtimeout 44*cfb92d14SAndroid Build Coastguard Workernetworkkey 45*cfb92d14SAndroid Build Coastguard Workernetworkname 46*cfb92d14SAndroid Build Coastguard Workerpanid 47*cfb92d14SAndroid Build Coastguard Workerping 48*cfb92d14SAndroid Build Coastguard Workerprefix 49*cfb92d14SAndroid Build Coastguard Workerreleaserouterid 50*cfb92d14SAndroid Build Coastguard Workerrloc16 51*cfb92d14SAndroid Build Coastguard Workerroute 52*cfb92d14SAndroid Build Coastguard Workerrouterupgradethreshold 53*cfb92d14SAndroid Build Coastguard Workerscan 54*cfb92d14SAndroid Build Coastguard Workerstart 55*cfb92d14SAndroid Build Coastguard Workerstate 56*cfb92d14SAndroid Build Coastguard Workerstop 57*cfb92d14SAndroid Build Coastguard Worker``` 58