Z-Stack Developer's Guide - Zigbee & Addressing
来源:互联网 发布:mac夜神模拟器 机型 编辑:程序博客网 时间:2024/05/29 14:38
Zigbee Foundamental
Device Type
- Coordinator
- first device in network
- scan RF env, choose a channel and a network identifier (PAN ID), then start network
- also optionally to be used to assist in setting up security and application-level bindings
- once start-up accomplished, Coordinator behaves like a Router node(or even go away)
- Router
- allow other devices to join the network
- multi-hop routing
- assisting in communication for its childs
- general expected to be active all the time, have to be mains-powered
- End-device
- can sleep and wake up as chooses, battery-powered node
- memory(RAM) requirements are lower
- in Z-Stack, device type is usually determined at compile-time with compile options (ZDO-COORDINATOR and RTR_NWK)
Stack Profile
- set of stack parameters that need to be configured to specific value. comprise the stack profile defiend by ZigBee Alliance
- All devices in a network must conform to the same stack profile
- 3 types
- ZigBee
- defined by ZigBee Alliance
- ZigBee Pro
- defined by ZigBee Alliance
- network-specific profile
- self defiend, closed network
- ZigBee and ZigBee Pro profile device can not interoperate.
- ZigBee
- ID: 0 for network specified profile; 1 for ZigBee; 2 for ZigBee Pro.
- configured by STACK_PROFILE_ID in nwk_globals.h
- Normally, a device of 1 profile (ex. ZigBee PRO) joins a network with the same profile. If a router of 1 profile (ex. ZigBee PRO) joins a network with a different profile (ex. ZigBee-2007), it will join as a non-sleeping end device. An end device of 1 profile (ex. ZigBee PRO) will always be an end device in a network with a different profile. (这一段不是太看得懂)
Addressing
- 2 types:
- 64 bits IEEE(MAC address or Extended Address)
- 16 bits network address(logical address or short address)
- used on local network
Tree Addressing
- uses a distributed addressing scheme: make sure unique; only has to communicate with its parent
- defines: ZIgBee-2007 its(5, 20, 6)
- MAX_DEPTH: max depth of network. coordinator=0,
- MAX_CHILDREN;
- MAX_ROUTERS: a subset of MAX_CHILDREN,
- (MAX_CHILDREN-MAX_ROUTERS)= end devices
- change tree addressing
- ensure new value legal
- ensure to use network-specific profile (change STACK_PROFILE_ID in nwk_globals.c to NETWORK_SPECIFIC), set MAX_DEPTH in nwk_global.s
- set array’s CskipChldrn and CskipRtrs in nwk_globals.c
Stochastic(Random) Addressing – ZigBee PRO
- random set a value, uses rest devices to unsure no duplicate
- joins process
- receives randomly addr from parent
- the new network node generates “Device Announce” (contains short and extended addr) to others
- if short addr confilct, a node(router) send out a broadcast “Network-Status - Address Conflict” to entire network
- conflicted device change its short addr, then send its own “Device Announce” to check again
- End device not participate “address conflict”, its parents do it for them
- parent issue “Rejoin Response” to end device to change end devices short addr.
- end device issues “Device Announce” to check new addr
- “Device Announce” recieved, association and binding tables updates, routing table info not updated(new router must be established).
Addressing in Z-stack
- AF_DataRequest() to send data to device. dest device is a type afAddrType_t(in zComDef.h)
- defines in Z-Stack Developer’s Guide Sec 3.3 P10
- send type
- unicast: use Addr16Bit, dest addr is in packet
- Indirect: use AddrNotPresent, dest addr is not specified. dest addr is looked up from “binding table”(in stack of sending device): its called Souce binding
- when binding table looking up, it treated as a unicast packet.
- Broadcast: use AddrBroadcast, dest addr sets as:
- NWK_BROADCAST_SHORTADDR_DEVALL (0xFFFF) – to all devices(including sleeping one)
- sleeping one, hold in its parents until wake up or time out(NWK_INDIRECT_MSG_TIMEOUT in f8wConfig.cfg)
- NWK_BROADCAST_SHORTADDR_DEVRXON (0xFFFD) all devices when idle (RXONWHENIDLE). all devices except sleeping devices
- NWK_BROADCAST_SHORTADDR_DEVZCZR (0xFFFC). to all routers(includes coordinator)
- NWK_BROADCAST_SHORTADDR_DEVALL (0xFFFF) – to all devices(including sleeping one)
- Group Addressing
- send packet to a group of device: addr mode is afAddrGroup, addr.shortAddr=group identifier
- group defination: aps_AddGroup() in the Z-Stack API doc
- group used in conjunction with indirect addressing. dest in binding table can be unicast/group addr.
Addressing functions
- NLME_GetShortAddr()
- NLME_GetExtAddr()
- NLME_GetCoordShortAddr() : get its parents addr
- NLME_GetCoordExtAddr()
0 0
- Z-Stack Developer's Guide - Zigbee & Addressing
- Z-Stack Developer's Guide
- ZigBee协议栈Z-Stack开发指南(翻译的TI的手册Z-Stack Developer's Guide.pdf)
- Z-Stack Developer's Guide - Binding & Routing
- ZigBee协议栈(3)-- Z-Stack寻址(Addressing in z-stack)
- 寻址(Addressing)——ZigBee协议栈Z-Stack开发指南
- Zigbee之Z-Stack
- (Z-STACK) Zigbee电源管理
- zigbee z-stack 地址类型
- Symbian Developer's Guide
- Ruby Developer's Guide
- ZK Developer's Guide
- Application developer's guide
- The Developer's Guide
- BTrace Developer's Guide
- UIX Developer's Guide
- ZigBee协议栈TI Z-Stack分析
- ZigBee Z-stack 学习之osal_task
- proc文件系统的使用
- Xcode 8 升级 Swift 3.0 问题。
- iOS开发 指定页面关闭右滑手势返回功能
- NFS服务器安装配置和使用
- 初学移动开发技术_两个页面相互跳转,并且向上一个活动传递数据并显示
- Z-Stack Developer's Guide - Zigbee & Addressing
- Android SnackBar使用方法
- AbsoluteLayout布局
- 单链表的逆置 --C语言泛型编程
- Sunrise at sea
- PKI/CA: 《电子政务数字证书格式规范(局字486)》总结:个人、机构、设备、代码签名四种证书区别_20160922_七侠镇莫尛貝
- UNITY之UGUI屏幕适配
- 寄存器理解
- 跑马灯效果