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

OpenThread logging enable

Hello,

I am developing thread network and i am building on top of mqttsn_sleepy_publisher example. But I have problem to enable RTT logging (UART not available) for thread stack. RTT logging for app works (using NRF_LOG_INFO). I see logs within RTT Viewer. But none of the logs comes from open thread stack.

It should be enabled by default (it is mentioned in following link)

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v3.2.0%2Fthread_ot_logging.html

I even tried FULL_LOGS=1 build flag, but no logs appeared from open thread.

    Open the .h configuration file whose name corresponds to the name of the openthread-core-default-config.h file, for example openthread-core-posix-config.h.
    In this file, define the desired log output configuration.

I tried to edit openthread-core-default-config.h but nothing changed. The header file is not included in any files within project.

Thanks for help

SDK version 4.1.0

Parents
  • Hello,

    Sorry for the late reply. Where did you find this file? Online on Github? Where did you put the file?

    As you say, no file in your project probably points to this file. If you downloaded it from github, then this needs to be used to re-build the openthread library.

    I don't know whether you meant to point to the SDKv3.2.0 for Thread and Zigbee. If you use that version, that is fine. Look at the file found in SDK\external\openthread\project\readme.txt

    It says what tag the openthread stack is built on. Download the same version, and use this guide to re-build the openthread libraries.

    Best regards,

    Edvin

  • Ok thanks. I didnt know i had to rebuild openthread.

    I tried your advice, cloned repo from github, checkouted commit c6a258e3a5bd90aa26d8245c435c0ae5797027f4. Then I built it inside docker container based on https://openthread.io/guides/build and https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fthread_ot_libraries_building.html . I renamed libopenthread-nrf528xx-transport.a to libopenthread-nrf528xx-transport-usb.a and copied to folder external\openthread\lib\nrf52840\gcc inside sdk folder.

    btw: I added to top of the file (after include guard) openthread\examples\platforms\nrf528xx\nrf52840\openthread-core-nrf52840-config.h following line

    #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG

    Build completed successfuly, but program is stuck inside hardfault handler, caused by mbedtls_internal_aes_encrypt.

    Yeah sorry, the link meant to be to sdk 4.1.0

  • Did you try to build the library without any changes? Try to do so and check if you get the same hardfault then before applying your changes. 

    May I ask what you need the openthread logs for? Do you experience any issues with the openthread network?

    BR,
    Edvin

  • Ok I will try it. Yeah I am using raspberry like device with nrf52840 dongle for border gateway. My nrf52840 device (dongle or my custom pcb with nrf52840) shows that commisioning is done. But when I enter ot-ctl scan command. The commisioning process runs again (led starts blinking) and the command doesnt show any discovered device. I used prebuilt images for nrf52840 dongle ncp driver and for nrf52840 sleepy mqtt publisher. Nothing changed and it doesnt works. I see no reason from logs on gateway, so I need to see device log, or add support for openthread debugging

Reply
  • Ok I will try it. Yeah I am using raspberry like device with nrf52840 dongle for border gateway. My nrf52840 device (dongle or my custom pcb with nrf52840) shows that commisioning is done. But when I enter ot-ctl scan command. The commisioning process runs again (led starts blinking) and the command doesnt show any discovered device. I used prebuilt images for nrf52840 dongle ncp driver and for nrf52840 sleepy mqtt publisher. Nothing changed and it doesnt works. I see no reason from logs on gateway, so I need to see device log, or add support for openthread debugging

Children
Related