mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 07:37:47 +00:00
Separate out interface up/down from Thread start/stop. (#278)
* Redefine otEnable/otDisable to just initialize/uninitialize the OpenThread stack. * Remove otInit API since it is replaced by otEnable. * Add otInterfaceUp/otInterfaceDown APIs to bring up/down IPv6 interface. * Add otThreadStart/otThreadStop APIs to start/stop Thread protocol operation. * Updated NCP implementation to utilize new APIs.
This commit is contained in:
@@ -23,10 +23,17 @@ $ cd <path-to-openthread>/output/<platform>/bin
|
||||
$ ./ot-cli 1
|
||||
```
|
||||
|
||||
Start OpenThread:
|
||||
Bring up the IPv6 interface:
|
||||
|
||||
```bash
|
||||
> start
|
||||
> ifconfig up
|
||||
Done
|
||||
```
|
||||
|
||||
Start Thread protocol operation:
|
||||
|
||||
```bash
|
||||
> thread start
|
||||
Done
|
||||
```
|
||||
|
||||
@@ -58,10 +65,17 @@ $ cd <path-to-openthread>/output/<platform>/bin
|
||||
$ ./ot-cli 2
|
||||
```
|
||||
|
||||
Start OpenThread:
|
||||
Bring up the IPv6 interface:
|
||||
|
||||
```bash
|
||||
> start
|
||||
> ifconfig up
|
||||
Done
|
||||
```
|
||||
|
||||
Start Thread protocol operation:
|
||||
|
||||
```bash
|
||||
> thread start
|
||||
Done
|
||||
```
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void otSignalTaskletPending(void)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
PlatformInit(argc, argv);
|
||||
otInit();
|
||||
otEnable();
|
||||
otCliUartInit();
|
||||
|
||||
while (1)
|
||||
|
||||
Reference in New Issue
Block a user