This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thread - diag command issue

Hi

I used "nRF5_SDK_for_Thread_v0.10.0 - cli sample code and try to test Thread command "diag"

when I type "diag" then it will show "diagnostics mode is disable".

when I type "diag start" then it will crash and cannot type any commands.

Someone has asked this question and Nordic reply need to add below API on cli - main.c "thread_init"

#if OPENTHREAD_ENABLE_DIAG

otDiagInit(p_instance);

#endif

Does need to add OPENTHREAD_ENABLE_DIAG in makefile and openthread library?

Could you help to test this issue?

Thanks. BR Atlas

Parents
  • Hello Atlas,

    To enable diagnostic features, you need to call otDiagInit() function in your code as you mentioned.

    All prebuild OpenThread libraries provided in the nRF SDK for Thread are compiled with DIAG feature. Because of that you may remove #if OPENTHREAD_ENABLE_DIAG condition from your main.c code, or you can add OPENTHREAD_ENABLE_DIAG define in the example Makefile.

    Thank you for reporting the issue which will be fixed in the upcoming release. All examples will call otDiagInit() function automatically.

Reply
  • Hello Atlas,

    To enable diagnostic features, you need to call otDiagInit() function in your code as you mentioned.

    All prebuild OpenThread libraries provided in the nRF SDK for Thread are compiled with DIAG feature. Because of that you may remove #if OPENTHREAD_ENABLE_DIAG condition from your main.c code, or you can add OPENTHREAD_ENABLE_DIAG define in the example Makefile.

    Thank you for reporting the issue which will be fixed in the upcoming release. All examples will call otDiagInit() function automatically.

Children
No Data
Related