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.

[参考译文] CC2530:启动时自动进行新网络调试

Guru**** 2466550 points
Other Parts Discussed in Thread: Z-STACK

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1105790/cc2530-automatic-new-network-commissioning-on-startup

器件型号:CC2530
Thread 中讨论的其他器件:Z-stack

你(们)好 我需要在路由器设备上实施自动调试、因此无需按下按钮即可开始调试。 我也希望它能够与 touchlink 配合使用。

请帮助我将以下伪代码转换为实际代码:

void zclMyApp_Init( byte task_id ) {

...

if ("previously connected to a coordinator or touchlink") {

    bdb_StartCommissioning("rejoin");

    if ("could not find the network anymore") {

        bdb_StartCommissioning("join another touchlink or coordinator");

    }

} else {

    bdb_StartCommissioning("join touchlink or coordinator");

}

...

}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您只需要在  init 函数中调用 bdb_StartCommissing、Z-Stack 将处理重新加入案例或新加入案例。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Ra、

    您可以检查 ZCD_NV_BDBNODEISONANETWORK 以确定器  件是否应该具有存储在非易失性存储器中的网络信息、因为在 bdb_StartCommissioning 内设置 BDB_TRUSIONING_MODE_NWK_STERING 时将检查此信息。  应在 zcl*_Init 结束时调用此函数,并且还应确认定义了 nv_init 和 nv_restore。

    此致、
    Ryan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    谢谢、Ryan。 这部分解决了问题。 如果以前连接到的网络不再可用、我应该如何重新加入另一个网络?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    当以前的网络不再可用时,我们通常不会尝试加入其它网络,因为设备不具备了解这一点的智能。 基本上、您可以添加按钮登录、例如按住设备按钮3秒钟、以恢复出厂设置设备本身上以前的网络信息、并开始加入新网络。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    除黄某建议外,您还可以设置一些逻辑(用户输入、计时器过期等),以确定何时放弃旧网络、清除 NV 内容并尝试加入其他网络。

    此致、
    Ryan