Hi All,
I wanted to confirm a particular methodology with the community whether what I am doing is an accepted way of doing what I want to do or is there a better way.
My scenario is this:
There are several RFDs in Star topology with a Coordinator. Based on whether the boards find a user defined status in the NV memory when starting up they should look for network in either PAN A or PAN B.
To achieve this what I do is the following:
In main() function after the call to osal_nv_init() I go through the cycle of osal_nv_mem_init() and osal_nv_read and osal_nv_write to change ZCD_NV_PANID as per requirement. The device then comes up in the PAN thus set.
Is this the proper way of changing PAN ID and is there a more accepted method of doing this in runtime ? I searched the forum to find techniques such as _NIB structure PAN ID update followed by a call to ZMacSetReq for the PAN ID variable but it does not work on my setup. My setup is CC2538 with Z-Stack Mesh 1.0.0 with NV_RESTORE and NV_INIT enabled.
Inputs from all will be very helpful.
Thanks and with best regards,
Sushanta.