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.