Comments (3)
Did you add #include <openthread/ip6.h>
to the top of the file?
from ot-nrf528xx.
Yeah, I also tested this. But the same error.
diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c
index 4d0440c12..b156a7ae4 100644
--- a/examples/apps/cli/main.c
+++ b/examples/apps/cli/main.c
@@ -33,6 +33,7 @@
#include <openthread/cli.h>
#include <openthread/diag.h>
#include <openthread/tasklet.h>
+#include <openthread/ip6.h>
#include <openthread/platform/logging.h>
#include "openthread-system.h"
@@ -130,6 +131,9 @@ pseudo_reset:
otAppCliInit(instance);
+ otIp6SetEnabled(instance, true);
+ otThreadSetEnabled(instance, true);
+
#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
otCliSetUserCommands(kCommands, OT_ARRAY_LENGTH(kCommands), instance);
#endif
from ot-nrf528xx.
Hi, I solved it by modifying the following code. Thanks a lot.
diff --git a/examples/apps/cli/ftd.cmake b/examples/apps/cli/ftd.cmake
index f5a2870f8..e212e27e3 100644
--- a/examples/apps/cli/ftd.cmake
+++ b/examples/apps/cli/ftd.cmake
@@ -31,6 +31,10 @@ add_executable(ot-cli-ftd
main.c
)
+target_compile_definitions(ot-cli-ftd PRIVATE
+ OPENTHREAD_FTD=1
+)
+
target_include_directories(ot-cli-ftd PRIVATE ${COMMON_INCLUDES})
if(NOT DEFINED OT_PLATFORM_LIB_FTD)
diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c
index 4d0440c12..9af1b4f6b 100644
--- a/examples/apps/cli/main.c
+++ b/examples/apps/cli/main.c
@@ -33,7 +33,10 @@
#include <openthread/cli.h>
#include <openthread/diag.h>
#include <openthread/tasklet.h>
+#include <openthread/ip6.h>
#include <openthread/platform/logging.h>
+#include <openthread/thread.h>
+#include <openthread/thread_ftd.h>
#include "openthread-system.h"
#include "cli/cli_config.h"
@@ -130,6 +133,11 @@ pseudo_reset:
otAppCliInit(instance);
+#if OPENTHREAD_MTD || OPENTHREAD_FTD
+ otIp6SetEnabled(instance, true);
+ otThreadSetEnabled(instance, true);
+#endif
+
#if OPENTHREAD_POSIX && !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
otCliSetUserCommands(kCommands, OT_ARRAY_LENGTH(kCommands), instance);
#endif
diff --git a/examples/apps/cli/mtd.cmake b/examples/apps/cli/mtd.cmake
index 7b71883bb..93c20b9a6 100644
--- a/examples/apps/cli/mtd.cmake
+++ b/examples/apps/cli/mtd.cmake
@@ -31,6 +31,10 @@ add_executable(ot-cli-mtd
main.c
)
+target_compile_definitions(ot-cli-mtd PRIVATE
+ OPENTHREAD_MTD=1
+)
+
target_include_directories(ot-cli-mtd PRIVATE ${COMMON_INCLUDES})
if(NOT DEFINED OT_PLATFORM_LIB_MTD)
from ot-nrf528xx.
Related Issues (20)
- UART Abstraction hangs in otPlatUartFlush HOT 5
- Noob - Build options for OTBR RCP build HOT 6
- Nordic nRF52840DK - Unexpected RCP reset while running ot-daemon HOT 9
- [C] Platform------: HandleRcpTimeout() at radio_spinel_impl.hpp HOT 8
- NRF52840 dongle RCP via UART HOT 2
- RCP fails on Nordic nRF52840 DK HOT 4
- Problem with attaching devices HOT 5
- Problem with flashing OpenThread on Adafruit Feather nRF52840 Express HOT 1
- Adafruit Feather nRF52840 not shown as USB Device HOT 2
- [mdk] Request to update mdk to an up-to-date version HOT 2
- Nordic's nRF5340 DK support Request #8268 HOT 1
- E104-BT5040u USB Stick does not enter DFU mode after initial flashing HOT 4
- cant flash nrf52 dongle using nRFconnect for desktop. HOT 2
- nRF52840-Dongle with dual-bootloader setup HOT 1
- Missing content in CLI output of an OpenThread FTD running on nRF52840 DK HOT 15
- OT_ERROR_NOT_FOUND when canonical names received from otDnsClientResolveIp4Address() HOT 7
- RCP unexcpected reset after starting ot-daemon HOT 2
- /opt/nrfjprog/: No such file or directory HOT 15
- How to make ot-br-posix enable OT_BLE_TACT? HOT 17
- The first compilation after git pull code fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ot-nrf528xx.