How to get RSSI of an OpenThread sleepy end device

Hi,

I have a set of OpenThread CoAP clients configured as speepy end devices to preserve battery. I need to obtain RSSI values of each of the CoAP clients. From CoAP server I can use CLI to query 'ot child n' to get RSSI value of the connected child nodes. I am going through the CLI files  to detect how this is done via CLI, but it seems a lengthy process.

How can I retrieve the RSSI values from CoAP server API? (i.e. without going through the CLI)

Cheers,

Kaushalya

Parents Reply
  • I tried 

    RSSI = otLinkRawGetRssi (openthread_get_default_instance());
    but resulted in a compile error saying 'undefined reference to `otLinkRawGetRssi'. I found the function defined in 'C:\ncs\v2.0.0\modules\lib\openthread\src\core\api\link_raw_api.cpp'. But the function is not included in the build because  
    #if OPENTHREAD_RADIO || OPENTHREAD_CONFIG_LINK_RAW_ENABLE
    {...
    }
    So apparently none of these symbols are defined anywhere. 
    I tried defining these symbols in prj.conf, but resulted in a config error. So these are not build config flags it seems.
    I found them in  'C:\ncs\v2.0.0\modules\lib\openthread\src\ncp\ncp_config.h', but when I try to include this in my source, the file path cannot be resolved. 
    I tried '#include "C:\ncs\v2.0.0\modules\lib\openthread\src\ncp\ncp_config.h"', then is could be located, but even after #defineing the symbols, the 'otLinkRawGetRssi' seems not enabled.
    I am out of ideas now. Some light??
Children
Related