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

Losing cloud connection, Thread CoAP Cloud example (SDK 0.11.0)

Dear Thread-experts,

I have troubles with your Thread CoAP Cloud example. I am using:

  • Thread SDK V0.11.0
  • Border Router V0.11.0, ethernet (not Wi-Fi)
  • cloud_coap_client example, adapted that I send more data (buffer size =256bytes)
  • Eclipse
  • Preview DVK, V0.9.0

I observe that after a while (sometimes day, sometimes minutes), no data are sent to the cloud. I debugged and my FW is running find and I don't get any errors (function otCoapSendRequest() is executed without error). However, the data is not visible in the cloud. The only way to recover it is: erasing the FW on the Border Router Network-Co-Processor-Thread-Module (Preview DVK). After erasing and reprogramming the DVK with the NCP, I can send data again for a certain time, until it brakes down again.

What I have observed is: when I send only 64bytes (insted of 256bytes): it tends to run more stable (some samples are missing, but the system is recovering itself).

I send the 256bytes every 6 minutes.

How can I debug that issue in more detail?

Thank you, Reto

  • In the newest SDK we have added tutorial on how to run Thread sniffer based on nRF52840 here. However you will need Linux PC to run the Wireshark.

    Unfortunatelly i couldn't reproduce issue with hanging of NCP so far, so hopefully sniffer logs may help to localize the root cause.

    I also tried to build OpenThread libraries with GCC from our SDK, and it runs without any errors (on OpenThread commit from release - #a89eb887).

    Could you run make -v and arm-none-eabi-gcc -v commands and paste output here? Also could you add those two flags to the Makefiles of OpenThread libraries (CFLAGS section): -fno-rtti and -fno-exceptions.

  • I tried to build the OpenThread libraries with CFLAGS -fno-rtti and -fno-exceptions. However, -fno-rtti is only possible for C++ sources, not C. What are these flags for?

    I got errors when using these flags (-fno-rtti and -fno-exceptions).

  • Hi Lukasz Duda,

    The linking is the problem. Thank you for any help with this!

    Linking target: _build/nrf52840_xxaa_thingsio.out
    "make" -s --no-print-directory -f "../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/components/toolchain/gcc/dump.mk" VARIABLE=CONTENT_TO_DUMP > _build/nrf52840_xxaa_thingsio.in
    'C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q3/bin/arm-none-eabi-gcc' -O3 -g3 -mthumb -mabi=aapcs -L ../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/components/toolchain/gcc -T./openthread_nrf52840.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs @_build/nrf52840_xxaa_thingsio.in -Wl,-Map=_build/nrf52840_xxaa_thingsio.map -o _build/nrf52840_xxaa_thingsio.out
    ../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/external/openthread/project/lib/openthread_cli/ftd/armgcc/libopenthread-cli-ftd.a(cli_uart.cpp.o):(.rodata._ZTIN2ot3Cli6ServerE[_ZTIN2ot3Cli6ServerE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
    ../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/external/openthread/project/lib/openthread_cli/ftd/armgcc/libopenthread-cli-ftd.a(cli_uart.cpp.o):(.rodata._ZTIN2ot3Cli4UartE+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
    ../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/external/openthread/project/lib/openthread/ftd/armgcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::Clear()':
    C:\Work\nRF52840_ThingsIO\Nordic_nRFSDK\nRF_Thread_SDK0.11.0\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:63: undefined reference to `otPlatSettingsDelete'
    ../../../Nordic_nRFSDK/nRF_Thread_SDK0.11.0/external/openthread/project/lib/openthread/ftd/armgcc/libopenthread-ftd.a(dataset_local.cpp.o): In function `ot::MeshCoP::DatasetLocal::IsPresent() const':
    C:\Work\nRF52840_ThingsIO\Nordic_nRFSDK\nRF_Thread_SDK0.11.0\external\openthread\project\lib\openthread\ftd\armgcc/../../../../openthread/src/core/meshcop/dataset_local.cpp:68: undefined reference to `otPlatSettingsGet'
    
  • Hello RetoKeller,

    We haven't figure out yet, why you expirience such errors. Could you give us more details on your build environment? Which version of gcc, make, OS, you have installed?

    We will update HAL files in OpenThread according to your proposition. However the fact that also building of OpenThread libraries causes you some errors, indicates that you have some incompatible toolchains. The CI system of OpenThread builds libraries for nRF52840 successfully.

Related