LinkMargin availibility

Hi,

we are currently developing our product using nRF5 SDK for Thread and Zigbee v4.1.0 (Release Date: Week 18, 2020). We would like to implement the link margin which is available in the latest OpenThread release. But it seems this feature is not available in our SDK version. So my questions are:

Which release of OpenThread is inside nRF5 SDK for Thread and Zigbee v4.1.0?

Is it possible to use link margin in some way?

Do we have to make an update to achieve this?

How about the nRF Connect? To which OpenThread version is it linked? Is it possible to use nRFConnect? Is it possible to upgrade from nRF5 SDK to nRF Connect?

Parents Reply Children
  • Hi,

    thank you for your reply. As far as I know the Link Margin (not Link Metrics) should be included in Thread 1.1.1 (chapter 5.9.4). If nRF5 SDK for Thread and Zigbee v4.1.0 (Release Date: Week 18, 2020) is based on Thread 1.1.1, then there should be some possibility to extract it. Is that correct? How can I do it?

    Also I would like to know what mLinkQualityIn is.

    Thanks.

  • Hi,

    Sorry, I got confused from your images circling Link Metrics and corresponding pages without Link Metrics in the APIs.

    You can get the Link Quality indicator otThreadLinkInfo::mLqi parameter, and convert this to Link Margin according to the table in section 5.9.4. This parameter is transmitted between neighbors, so I'm not sure if the exact Link margin value is available. As the sections mentions: "Having only four possible link quality values minimizes the overhead of communicating link qualities to neighbors."

    Best regards,
    Jørgen

  • Hi,

    how can I extract the mLqi? I can not see any function to get this value. I only see that it is inside structot_thread_link_info. Also there is no function to get this. What we tried is this:

    otError error;
    otRouterInfo *link_quality;
    error = otThreadGetParentInfo(COMWIRELESS_ot_instance, link_quality);
    ASSERT(error == OT_ERROR_NONE);
    link_U8 = (link_quality->mLinkQualityIn);

    and this:

    S8 *Rssi_S8;
    otError error;
    error = otThreadGetParentLastRssi(COMWIRELESS_ot_instance,Rssi_S8);

    Both resulting in blocking the joining process. Also the debugger behaves weird and stops in thread_api.cpp (only in disassembly).

  • Hi,

    Where did you call the functions? Do you get any errors/resets when calling the functions?

    I tested by adding this to thread_state_changed_callback() in the simple_coap_client example:

    case OT_DEVICE_ROLE_CHILD:
    {
        otError error;
        otRouterInfo link_quality;
        error = otThreadGetParentInfo(thread_ot_instance_get(), &link_quality);
        ASSERT(error == OT_ERROR_NONE);
        NRF_LOG_INFO("mLinkQualityIn: %d", link_quality.mLinkQualityIn);
    }
    break;

    When the device enters a Thread network as a child device together with the simple_coap_server example, The log will output 3 in my test.

    Best regards,
    Jørgen

Related