首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

ZigBee协议请教?

没有抓过802.15.4 MAC over the air的帧,不知道会不会出现你所说的那种情况。加入网络的过程,应该是要符合IEEE802.15.4的规范的。但这个功能是在MAC层中完成的,所以对你来说,最重要的是能实现这个网络的加入功能。可以通过API来知道这个网络的加入状况。
你是用什么工具抓得啊?
Association is implemented according to the IEEE 802.15.4 standard but the standard is not explicit on
how and when various MAC PIB attributes are updated. Issuing the MLME-ASSOCIATE.request primitive
actually results in two MAC command frames being sent to the coordinator. The first is the association
request itself. The second is the data request that is sent after aResponseWaitTime symbols. Refer to
the IEEE 802.15.4 standard for a description of the association procedure. The following attributes are
updated when MLME-ASSOCIATE.request is called.
从你抓的数据来看,不能判断coordinator到底有没有收到associate.request,有可能coordinator根本没有收到这个request,所以没有反应.因为你是beacon网络,所以我想你要发MLME-SYNC.request,让这个device先去同步这个beacon,然后再发associate.request。
这是我用sniffer抓下来的一个组网的过程.首先是coordinator先起来,然后是一个RFD加入这个网络的过程.应该很清楚了.

Seq No Time Time Delta MAC Src MAC Dest NWK Src NWK Dest Protocol Packet Type
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 13:37:32.283 +00:00:00.137 0x0050c237b0000f52 0x0000 IEEE 802.15.4 Command: Association Request
9 13:37:32.284 +00:00:00.001 IEEE 802.15.4 Acknowledgment
10 13:37:32.780 +00:00:00.495 0x0050c237b0000f52 0x0000 IEEE 802.15.4 Command: Data Request
11 13:37:32.781 +00:00:00.001 IEEE 802.15.4 Acknowledgment
12 13:37:32.784 +00:00:00.003 0x0050c237b0003162 0x0050c237b0000f52 IEEE 802.15.4 Command: Association Response
13 13:37:32.785 +00:00:00.001 IEEE 802.15.4 Acknowledgment
7 13:37:32.146 +00:00:00.004 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
6 13:37:32.142 +00:00:01.139 0xffff IEEE 802.15.4 Command: Beacon Request
5 13:37:31.003 +00:00:00.002 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
4 13:37:31.000 +00:00:01.139 0xffff IEEE 802.15.4 Command: Beacon Request
2 13:37:29.859 +00:00:12.859 0xffff IEEE 802.15.4 Command: Beacon Request
3 13:37:29.861 +00:00:00.002 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
1 13:37:17.000 0xffff IEEE 802.15.4 Command: Beacon Request

Seq No Time Time Delta MAC Src MAC Dest NWK Src NWK Dest Protocol Packet Type
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 13:46:03.000 0xffff IEEE 802.15.4 Command: Beacon Request
2 13:46:08.733 +00:00:05.733 0xffff IEEE 802.15.4 Command: Beacon Request
3 13:46:08.736 +00:00:00.003 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
4 13:46:09.875 +00:00:01.138 0xffff IEEE 802.15.4 Command: Beacon Request
5 13:46:09.880 +00:00:00.005 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
6 13:46:11.016 +00:00:01.137 0xffff IEEE 802.15.4 Command: Beacon Request
7 13:46:11.019 +00:00:00.003 0x0000 IEEE 802.15.4 Beacon: BO: 15, SO: 15, PC: 1, AP: 1, Nwk RC: 1, Nwk EDC: 0
8 13:46:11.158 +00:00:00.139 0x0050c237b0000f52 0x0000 IEEE 802.15.4 Command: Association Request
9 13:46:11.159 +00:00:00.001 IEEE 802.15.4 Acknowledgment
10 13:46:11.653 +00:00:00.494 0x0050c237b0000f52 0x0000 IEEE 802.15.4 Command: Data Request
11 13:46:11.654 +00:00:00.001 IEEE 802.15.4 Acknowledgment
12 13:46:11.656 +00:00:00.002 0x0050c237b0003162 0x0050c237b0000f52 IEEE 802.15.4 Command: Association Response
13 13:46:11.657 +00:00:00.001 IEEE 802.15.4 Acknowledgment
0x0050c237b0000f52是RFD的MAC地址.
返回列表