Code Monkey home page Code Monkey logo

Comments (9)

Totalus avatar Totalus commented on July 23, 2024

Any idea ?

from ot-nrf528xx.

LuDuda avatar LuDuda commented on July 23, 2024

Hello @Totalus,

Thank you for reporting this. I would suggest to raise this issue in Nordic's Devzone which is tracked by our Tech Support.

First of all, in case you start the new project I just want to recommend moving to our new SDK called nRF Connect SDK where you can find the newest OpenThread integrated and tested by us. Here is the documentation.

The nRF5 SDK for Thread and Zigbee is still supported but it is only in a maintenance mode e.g. we don't support newer OT versions - only critical bugfixes, and indeed OpenThread is pretty much old there.

I think that it might be challenging to update OT to the newest version in nRF5 SDK for T&Z. If you want to try, I would certainly replace nrf_security libraries as well - as right now i think that differences in context sizes cause hard-fault (mbedtls headers in SDK and in OT mismatch).

The OPENTHREAD_CONFIG_CRYPTO_LIB should definately be set to OPENTHREAD_CONFIG_CRYPTO_LIB_MBEDTLS.

from ot-nrf528xx.

Totalus avatar Totalus commented on July 23, 2024

Hello @LuDuda,
thanks for advising. I am trying to avoid moving an existing project to the nRF Connect SDK indeed. If I can get this to work, it will save me the hassle.

I've replaced the nrf_security libs as well as you suggested, keeping the default OPENTHREAD_CONFIG_CRYPTO_LIB_MBEDTLS (Configuration # 1). This did solve the hard fault problem.

Now I have the same issue as Configuration # 2 :

The thread stack task is not running properly:

otTaskletsSignalPending is called once, the task is executed
otSysEventSignalPending is called once, the task is executed but the function otSysProcessDrivers seem to never return

Any idea on why I could be getting that behavior ?

from ot-nrf528xx.

LuDuda avatar LuDuda commented on July 23, 2024

Don't have immediate idea now, could you just try to connect debugger and check where the code stucks?

from ot-nrf528xx.

Totalus avatar Totalus commented on July 23, 2024

Hey @LuDuda ,
I posted too fast. I realized that I've forgotten to copy the recompiled openthread lib files to my project. The stack seems to be running properly now. I'll see if it solves my problems with a few more tests.

To make it work I also had to tweek some function names in my code but also one line in the code from this repo, this line. I had to change mutex->flag to mutext->flags, a typo I believe.

from ot-nrf528xx.

LuDuda avatar LuDuda commented on July 23, 2024

Good to hear!

Btw. typo is being addressed here, we will fetch changes when it is merged.

Should we close the issue for now?

from ot-nrf528xx.

Totalus avatar Totalus commented on July 23, 2024

Closing for now, will reopen if there anything else comes up.

As a reference for other people, additionally to the changes explained in the first post, I had to change all the links pointing to nRF5_SDK_for_Thread_and_Zigbee/external/nrf_security to the files from ot-nrf528xx/third_party/NordicSemiconductor/libraries/nrf_security which I copied to my ThirdPartyLibrairies folder. So my project file now has the following libs:

<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedcrypto_cc3xx.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedcrypto_oberon.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedcrypto_shared.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedtls_base_vanilla.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedtls_tls_vanilla.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libmbedtls_x509_vanilla.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/lib/libnrf_cc310_platform_0.9.4.a" />
<file file_name="../../ThirdPartyLibraries/nrf_security/nrf_cc310_plat/src/nrf_cc3xx_platform_abort_freertos.c" />
<file file_name="../../ThirdPartyLibraries/nrf_security/nrf_cc310_plat/src/nrf_cc3xx_platform_mutex_freertos.c" />

I also changed the nrf_security include paths the same to point to ThirdParyLibrairies/nrf_security/<...> and had to change the following two functions called in my code in order for the code to compile:

// Original
nrf_cc310_platform_abort_init();
nrf_cc310_platform_mutex_init();

// New
nrf_cc3xx_platform_abort_init();
nrf_cc3xx_platform_mutex_init();

from ot-nrf528xx.

Totalus avatar Totalus commented on July 23, 2024

Ok, now the stack is running, but I'm having other issues. My nodes are all becoming leaders now, they don't seem to be able to see each other, or can't properly process the packets. I am getting the following warning from the OpenThread logs: [WARN]-MLE-----: Failed to process UDP: Security.

from ot-nrf528xx.

Totalus avatar Totalus commented on July 23, 2024

I ended up moving to nRF Connect SDK

from ot-nrf528xx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.