Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Converting Thread Full Thread Device example to Sleepy End device example in nRF5 SDK for Thread v4.1

Hello,

We have a firmware developed for Full Thread Device. But now as i want to reduce power consumption i want to convert FTD device firmware to SED firmware.  

SDK : nRF5 SDK for Thread v4.1 (latest)

Board: nRF52840-DK 

Example: mqtt-sn_publisher_example and mqtt-sn sleepy publisher example 

Aim: Currently my firmware is based on mqtt-sn publisher example. Now i want to convert it to mqtt-sn sleepy publisher example. And i want to convert example directly instead of starting it from scratch with mqtt-sn sleepy publisher example as base. 

 

So here are the steps which i have performed in my FTD firmware to convert to SED Firmware: 

- In Open Thread libraries, replaced libopenthread-cli-ftd, libopenthread-ftd with libopenthread-cli-mtd.a, libopenthread-mtd.a 

- In project, pre-processor definition changed OPENTHREAD_FTD=1 to OPENTHREAD_MTD=1.

-  Changed the Thread_instance_Init function as per mqtt-sn sleepy example (RX OFF when IDLE). 

Now i see there are nrf_rng.c, nrfx_rng.c file present in Drivers folder of mqttsn-sleepy publisher example. Also the queues library are present in Library folder. Now when i add the Random Generator libraries in my FTD firmware to convert it to SED and also enabled RNG in sdk_config.h file i get the error of RNG instance already in use. As the open thread library are already using RNG i guess. So i want to know should i add RNG in Drivers folder ?  Because if i add, it fails to build. 

Also please let me  know if i have to perform some extra steps which i have missed to convert FTD firmware to SED firmware.  

Please suggest me steps to convert MQTT-SN Publisher based example to MQTT-SN Sleepy publisher example.   

Parents
  • Hi Brian

    I will have to ask the developers for why our RNG drivers is enabled in the MTD. Since it is the holidays, this might take more time than usual.
    Hopefully you will get an answer in the first week of January.

    For now, I tried to disable RNG in the Sleepy Publisher sample, and it builds fine. Unfortunately I do not have an MQTT-SN border router at this time, so I can not test it completely.

    But if you do, it should be rather quick to program two DKs with Sleepy subscriber and Sleepy publisher with disabled RNGs, and test if it works or not.

    Regards,
    Sigurd Hellesvik

Reply
  • Hi Brian

    I will have to ask the developers for why our RNG drivers is enabled in the MTD. Since it is the holidays, this might take more time than usual.
    Hopefully you will get an answer in the first week of January.

    For now, I tried to disable RNG in the Sleepy Publisher sample, and it builds fine. Unfortunately I do not have an MQTT-SN border router at this time, so I can not test it completely.

    But if you do, it should be rather quick to program two DKs with Sleepy subscriber and Sleepy publisher with disabled RNGs, and test if it works or not.

    Regards,
    Sigurd Hellesvik

Children
Related