NRF DM Toolbox: Discrepancy between the API used in the sample and the one at nrfxlib/nrf_dm/include ?

Hello everyone,

I am currently working on a ranging solution and decided to try out the dm toolbox sample. I work on version 2.2.0 of the SDK.

After some searching I stumbled on this API documentation:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_dm/doc/api.html#distance-measurement-interface

I noticed that the nrf_dm.h file has more features and slightly different type definitions for the structs enums and unions, that the dm.h file used in the sample.

There are my questions :

I am interested in getting the nrf_dm_report_t struct featured in nrf_dm.h by calling nrf_dm_populate_report(), can I integrate nrf_dm.h in the sample and will it work with the precompiled library or do I have to create my own firmware based on the nrf_dm.h API?

How can I see what library is linked to the nrf_dm sample (I use VS code with the nrf connect extension)?

Thanks for your support

Colin Cina

  • Hello,

    A collegue will look into this and get back to you.

    Kenneth

  • Hi all,

    I actually looked some more into it, and it seems like the sample uses the dm.h API which in turn makes calls to nrf_dm.h API which should be the header for the compiled library libnrf_dm.a. Can you confirm this ?

    What I plan to do:

    1. Edit the dm.c file (ncs/vx.x/nrf/subsys/dm/dm.c) by extending the dm_result structure with a nrf_dm_iq_tones_t attribute (defined in nrf_dm.h) 

    2. In process_data()  (dm.c), populate the result structure with the IQ samples from the nrf_dm_report_t structure

    As a result when calling dm_context.cb->data_ready() the application gets the result structure featuring the IQ samples. Do you see any flaws in this Idea and/or have any other propositions on how to get nrf_dm_iq_tones_t from the application layer?

    All the best

    Colin

  • Hi,

    The distance measurement library is a work-in-progress which is currently marked experimental in our SDK. That might explain some discrepancies that you have seen. There has been quite some development lately, both in the examples and in documentation, with several changes. I recommend having a look at the latest state of the library, which is close to what to expect from the next nRF Connect SDK release. I do not know whether the library will still be experimental after next release, though, for that you can contact our regional sales manager for your area. If you do not know who that is, please ask in a private message or private case here on DevZone, and we will provide the contact details.

    As for what you saw with regards to inconsistencies in documentation vs library/examples: The latest documentation as we speak is for v2.2.99-dev3, while the documentation for v2.2.0 is found here. The differences that you have been seeing, are likely to stem from rapid development, resulting in large differences between the two documentation sets (2.2.0 v.s. bleeding edge.)

    Regards,
    Terje

Related