热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Z-StackDeveloper'sGuide-Zigbee&Addressing

ZigbeeFoundamentalDeviceTypeCoordinatorfirstdeviceinnetworkscanR

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.
  • 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)
  • 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()

推荐阅读
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • SpringBoot整合SpringSecurity+JWT实现单点登录
    SpringBoot整合SpringSecurity+JWT实现单点登录,Go语言社区,Golang程序员人脉社 ... [详细]
  • 生成式对抗网络模型综述摘要生成式对抗网络模型(GAN)是基于深度学习的一种强大的生成模型,可以应用于计算机视觉、自然语言处理、半监督学习等重要领域。生成式对抗网络 ... [详细]
  • 本文讨论了在Windows 8上安装gvim中插件时出现的错误加载问题。作者将EasyMotion插件放在了正确的位置,但加载时却出现了错误。作者提供了下载链接和之前放置插件的位置,并列出了出现的错误信息。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • 推荐系统遇上深度学习(十七)详解推荐系统中的常用评测指标
    原创:石晓文小小挖掘机2018-06-18笔者是一个痴迷于挖掘数据中的价值的学习人,希望在平日的工作学习中,挖掘数据的价值, ... [详细]
  • 怀疑是每次都在新建文件,具体代码如下 ... [详细]
  • 本文介绍了如何使用Express App提供静态文件,同时提到了一些不需要使用的文件,如package.json和/.ssh/known_hosts,并解释了为什么app.get('*')无法捕获所有请求以及为什么app.use(express.static(__dirname))可能会提供不需要的文件。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • VueCLI多页分目录打包的步骤记录
    本文介绍了使用VueCLI进行多页分目录打包的步骤,包括页面目录结构、安装依赖、获取Vue CLI需要的多页对象等内容。同时还提供了自定义不同模块页面标题的方法。 ... [详细]
author-avatar
nikechen
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有