SDK: 14.1.0
CHIP: nRF52840
CONFIG: ZIGBEE&BLE MULTI PROTOCOL
I wants to keep store zigbee pairing data after reset.
I setups like this.
zigbee_erase_persistent_storage(ERASE_PERSISTENT_CONFIG); // ZB_FALSE zb_ret_t zigbee_default_signal_handler(zb_bufid_t bufid) { ... case ZB_ZDO_SIGNAL_SKIP_STARTUP: NRF_LOG_INFO("Zigbee stack initialized"); comm_status = bdb_start_top_level_commissioning(ZB_BDB_INITIALIZATION); NRF_LOG_INFO("initialized zb_bdb_is_factory_new(): %d\r\n", zb_bdb_is_factory_new()); ... }
After joining procedure, I reset my device with nrfjprog -r.
until zb_bdb_is_factory_new set 1, zb_bdb_is_factory_new return 0.
When I repeated 2~3 times, zb_bdb_is_factory_new is 1.
Zed fails to rejoin the network after that.
How can I fix it?
and Where I can check data structure used by zigbee stack?
attaching flash config in sdk_config.h
// <e> FDS_ENABLED - fds - Flash data storage module //========================================================== #ifndef FDS_ENABLED #define FDS_ENABLED 1 #endif // <h> Pages - Virtual page settings // <i> Configure the number of virtual pages to use and their size. //========================================================== // <o> FDS_VIRTUAL_PAGES - Number of virtual flash pages to use. // <i> One of the virtual pages is reserved by the system for garbage collection. // <i> Therefore, the minimum is two virtual pages: one page to store data and one page to be used by the system for garbage collection. // <i> The total amount of flash memory that is used by FDS amounts to @ref FDS_VIRTUAL_PAGES * @ref FDS_VIRTUAL_PAGE_SIZE * 4 bytes. #ifndef FDS_VIRTUAL_PAGES #define FDS_VIRTUAL_PAGES 3 #endif // <o> FDS_VIRTUAL_PAGE_SIZE - The size of a virtual flash page. // <i> Expressed in number of 4-byte words. // <i> By default, a virtual page is the same size as a physical page. // <i> The size of a virtual page must be a multiple of the size of a physical page. // <1024=> 1024 // <2048=> 2048 #ifndef FDS_VIRTUAL_PAGE_SIZE #define FDS_VIRTUAL_PAGE_SIZE 1024 #endif // <s> FDS_VIRTUAL_PAGES_RESERVED - The number of virtual flash pages that are used by other modules. // <i> FDS module stores its data in the last pages of the flash memory. // <i> By setting this value, you can move flash end address used by the FDS. // <i> As a result the reserved space can be used by other modules. #ifndef FDS_VIRTUAL_PAGES_RESERVED #define FDS_VIRTUAL_PAGES_RESERVED ((ZIGBEE_NVRAM_PAGE_SIZE * ZIGBEE_NVRAM_PAGE_COUNT + ZIGBEE_NVRAM_CONFIG_PAGE_SIZE * ZIGBEE_NVRAM_CONFIG_PAGE_COUNT)/(FDS_VIRTUAL_PAGE_SIZE * 4)) #endif
And I check After the steering is successful, the zb_bdb_is_factory_new() interface returns true
but I can't find "bdb_load_factory_new" function.