This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652P: Remove network information without a reset

Part Number: CC2652P
Other Parts Discussed in Thread: Z-STACK

In CC2652's examples, we can write 0x3 to the NVID 0x0003 to erase the NV on next reset.

But if I don't want to reset the system, is there an API I can use to remove the network.information?

BR,

Shuyang

  • Hi Shuyang,

    Those startup values written to NV eventually lead to NLME_SetDefaultNV and ZDSecMgrClearNVKeyValues.  NV values are saved and used for reset conditions at any rate.  However, this will not change the behavior of the device currently operating.  This would require the user to halt the Z-stack and radio operation before removing the MAC PIBs, a process for which APIs are not provided.  What specifically are you trying to accomplish?  Here is a semi-relevant E2E thread.

    Regards,
    Ryan

  • Hi Ryan,

    I looked into our SDK examples again, and found that Zstackapi_bdbResetLocalActionReq() is used to reset the device to factory, I guess that is the API I'm looking for.

    Just one thing to confirm, does Zstackapi_bdbResetLocalActionReq() need a reset to take effect? The use case is that customer don't want to reset because they want to keep the peripheral working.

    Best regards,

    Shuyang

  • Basically, Zstackapi_bdbResetLocalActionReq will make device reset in the end.

  • Is there a way to remove the network information without a reset?

    BR,

    Shuyang

  • Hi Shuyang,

    You can refer to the ZDApp_LeaveReset API for cases where ra == TRUE to understand how to configure the device state and reset the state machine, making changes such that the node does not attempt to rejoin the previous network.  This would be used alongside zgItemInit to initialize the NV items back to their default settings.  If done correctly, the node could remove all previous state and network information in order to start a fresh join.  This solution would need to be further tested as it is not a typical Z-Stack mode of operation.

    Regards,
    Ryan