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.

发送 zdoBindReq 命令失败

Hi, 

我用的 znp_host_framework on linux 并且我想绑定 onoff cluster.但是我在使用 zdoBindReq 命令从协调器发送到终端的时候遇到了问题:.

首先,我协调器的ieee是 0x00124B00072564F6, and 终端的 shortaddr 是 0x82DA, ieee i是 0x00137A000002CB96.

我从论坛里看到了这么一句话 "the bind is unidirection, if you want to send message from A node to B node after ZDP_BindReq, you should put A as source and B as destination.".实际中,我想要终端上报给协调器. 所以,我使参数中的SrcAddress为中断的ieee. 代码如下:

BindReqFormat_t bind_req;

bind_req.DstAddr = 0x82DA;

bind_req.SrcAddress[0] = 0x00;
bind_req.SrcAddress[1] = 0x13;
bind_req.SrcAddress[2] = 0x7a;
bind_req.SrcAddress[3] = 0x00;
bind_req.SrcAddress[4] = 0x00;
bind_req.SrcAddress[5] = 0x02;
bind_req.SrcAddress[6] = 0xcb;
bind_req.SrcAddress[7] = 0x96;

bind_req.SrcEndpoint = 1;

bind_req.ClusterID = 0x0006;

bind_req.DstAddrMode = afAddr16Bit;

bind_req.DstAddress[0] = 0x00;
bind_req.DstAddress[1] = 0x12;
bind_req.DstAddress[2] = 0x4b;
bind_req.DstAddress[3] = 0x00;
bind_req.DstAddress[4] = 0x07;
bind_req.DstAddress[5] = 0x25;
bind_req.DstAddress[6] = 0x64;
bind_req.DstAddress[7] = 0xf6;

bind_req.DstEndpoint = 1

zdoBindReq(&bind_req);

我发送了,但是得到的bind response失败了,错误码为 0x84

请问我的设置有问题吗

  •  0x84说明 ZDP NOT SUPPORTED,关于binding的设置,推荐看如上附件文档

  • 问题解决了,上面的问题有2个:

    1. .SrcAddress DstAddress格式应为little endian

    2. DstAddrMode 应为 afAddr64Bit.

    详见如下链接(可能最佳答案给的链接打不开,需要翻墙):

    https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/p/569182/2101334#2101334

    BTW, 虽然英文不习惯,但是最终是在TI E2E community上解决了问题。希望中国的论坛能够更加热情的对待问题,而不是给一个100多页什么都有的文档了事。