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.

关于PANID的问题

我的协调器在上一次组网的时候使用了NV_INIT和NV_RESTORE,现在想把之前的网络组网信息全部去掉,重新烧写只加入NV_INIT,发现PANID不是我指定的数值,上一次我指定的是0xFFFF,这次我指定的是0x0001,我是在f8wconfig.cfg使用  -DZDAPP_CONFIG_PAN_ID=0x0001  进行指定,但是读出来并不是。

1:请问应该怎么设置

2:请问应该怎么读取  我直接使用zgConfigPANID获取的和_NIB.nwkPanId的不一样

协议栈使用的是C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\Samples\SampleApp

  • 您指的是擦除NV内保存的信息?TI的 Z-Stack API document section 3.1.2是有一段说明的。

    "If the application would like to force a "new" join, the application should set the ZCD_STARTOPT_DEFAULT_NETWORK_STATE bit in the ZCD_NV_STARTUP_OPTION NV item before calling this function. "New" join means to not restore the network state of the device. Use zgWriteStartupOptions() to set these options [zgWriteStartupOptions(ZG_STARTUP_SET, ZCD_STARTOPT_DEFAULT_NETWORK_STATE);]."

    您需要改变ZCD_NV_STARTUP_OPTION的值

  • 谢谢您的回答,感谢