View: 4680|Reply: 2

Sometimes zb_factoryReset(); is not worked.

[Copy link]

33

Threads

27

Replies

487

Credits

Credits
487
Posted on 2025-2-4 08:54:11 | Show all posts |Reading mode From 韩国
information
Notes:   建议参照本版块置顶帖内容输入必要信息
Chip model: TLSR8258
SDK & version: telink_zigbee_ble_concurrent_sdk-2.4.0.0
I comission TLSR8258 Dongles with telink_zigbee_ble_concurrent_sdk-2.4.0.0.

Each dongle have 3 endpoints(light, motion sensor, daylight sensor).
I run factory reset after 1 ~3 days.
some dongles not run zb_factoryReset().
Can you check it ?

30

Threads

374

Replies

1196

Credits

Credits
1196
Posted on 2025-2-5 10:31:02 | Show all posts From 上海
After calling zb_factoryReset(), the stack will start a factory new task (to send leave),
then nv_resetToFactoryNew() will be called to erase flash data,
and finally call back to sampleXX_leaveCnfHandler().

33

Threads

27

Replies

487

Credits

Credits
487
 Author| Posted on 2025-2-6 07:29:10 | Show all posts From 韩国
本帖最后由 jylee@kme21.com 于 2025-2-6 07:49 编辑

TL_YB 发表于 2025-2-5 10:31
After calling zb_factoryReset(), the stack will start a factory new task (to send leave),
then nv_r ...

void factoryRst_handler(void){
        if(factoryRst_exist){
//#if (DEBUG_MODE == 1)
                printf("===================start factory reset2=========\r\n");
//#endif
                factoryRst_exist = FALSE;
                zb_factoryReset();
        }
}


void sampleLight_leaveCnfHandler(nlme_leave_cnf_t *pLeaveCnf)
{
//#if (DEBUG_MODE == 1)
                printf("===================sampleLight_leaveCnfHandler====%d=====\r\n", pLeaveCnf->status);
//#endif
    if(pLeaveCnf->status == SUCCESS)
    {
            light_blink_start(3, 200, 200);

            //waiting blink over
        TL_ZB_TIMER_SCHEDULE(sampleLight_recoveryStart, NULL, 2 * 1000);
    }
}


====================================================

===================start factory reset2=========<CR><LF>
===================sampleLight?leaveCnfHandler====194=====<CR><LF>

====================================================
pLeaveCnf->status is 194 in sampleLight_leaveCnfHandler()

sometimes sampleLight_leaveCnfHandler() is not worked.

What is problem ?

Credit rules for this forum

inThis forumPostBack to top