| Zigbee Network Layer Tutorial - Part 3: Broadcasts and Neighbors | | Print | |
| Written by Akiba | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Monday, 18 May 2009 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I thought I would spend this portion of the series discussing some of the more detailed parts of the data path. Since the tree and mesh routing is already explained in other articles, I’d like to talk about the other two forwarding methods: broadcasting and the neighbor table. For those new to the Zigbee spec and trying to implement the broadcast functionality, it can be pretty confusing. At least it was for me when I had to figure it out so hopefully this can help clear some of the haze. Broadcasting plays an important role in Zigbee and is used for many functions. Two of the most prominent are route discovery and group transmissions. Route discovery is the process of locating a path to a destination address whose route is unknown. Zigbee uses a modified form of AODV (Ad-hoc On-demand Distance Vector) which is just fancy terminology for “flood the network with pings until you hit the destination address”. The flooding part occurs by broadcasting route requests and have them propagate through the network until the destination is reached. Group transmissions are a method of transmitting data to all devices within a certain group. A broadcast is used to transmit the data and the frame will be discarded by any members that don’t belong to the group. Along with those functions, there are numerous other smaller functions that utilize broadcasts in both the ZDO (Zigbee Device Object or endpoint 0 on all Zigbee devices) and the ZCL (Zigbee Cluster Library). An end device has no resources to forward frames and can only join and communicate with a parent router. The simplified communication capabilities allow most of the MAC, NWK, and APS management functions to be stripped out and should result in a very small memory footprint. Sleepy end devices are able to be duty-cycled where they sleep most of the time and awaken periodically to poll its parent for any buffered messages. It uses 802.15.4 indirect transmission for the polling, which is discussed in more detail in my 802.15.4 series. Duty cycling the end device allows it to consume very little power, thus increasing the battery life which is one of the most important factors in wireless sensor networking.
Just a note, although low power routers are specified, I haven’t heard of any actual implementations of them yet. Feel free to correct me on this. The broadcast transaction record is used to track the source address and sequence number of the broadcast. These two pieces of information are used to uniquely identify a broadcast frame. This is important because once the broadcast frame is forwarded, all neighbors within earshot will re-send the broadcast frame and you’ll get multiple copies of it. As long as you have the broadcast transaction record, you’ll know that you’ve already received and processed the frame so you can discard the copies. Broadcast Transaction Record Entry:
Apologies if it might sound a bit confusing. I had to read the broadcast section more than a couple of times and actually wrote some simple simulation programs to gain an understanding of the behavior and the passive ACK mechanism. Neighbor Table Entry - Mandatory
Neighbor Table Entry - Optional (Not)
The neighbor table is initially populated during device discovery when a device is searching for a parent to join to get on the network. I’ll discuss the join procedure later when I get into the network management side of things. Anyways, when a device tries to join a network, it will first perform a device discovery where it broadcasts a beacon request. All routers within earshot will respond with a beacon frame containing information about themselves. This information will get stored into the neighbor table. Unfortunately, the spec is a bit light on details about populating the neighbor table after the initial join procedure. In order to keep the table up-to-date, any beacons that are seen should be compared to the neighbor table and added to it if an entry doesn't exist. Well, that kind of takes care of most of the main points of the network layer’s data path. Within the Zigbee stack, or even the full protocol stack including 802.15.4, I’d say that the network layer data path is the most complex. Next up should be the network management which includes device discovery, joining, leaving, and network maintenance. Hits: 19150 Trackback(0)
Comments (4)
![]()
Neighbor tables
written by Robert Cragie, May 18, 2009
Firstly, you're right about low power router broadcast - the address is a placeholder for possible future implementations.
It might be worth pointing out that a neighbor table entry for network discovery is quite distinct from a neighbor table entry for an 'active' neighbor, i.e. one you are in active communication with, which could be a parent, sibling router or child. So whilst the two have been coalesced in the ZigBee spec., it probably makes more sense to think of them as separate entities. report abuse
vote down
vote up
Votes: +0
... written by newbie here, May 11, 2011
So I see that the comment list on this blog entry is not active, but wanted to ask a question, just in case.
Wouldn't the re-broadcasting go to an endless loop, if every device rebroadcasts original frame, and the end devices that end up receving rebroadcasts from other devices, broadcast that again. I mean, since end devices need not support BTT? Or is it so, that the end devices will rebroadcast a frame, only if it is originating from the Coordinator? report abuse
vote down
vote up
Votes: +0
Write comment
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| < Prev | Next > |
|---|
No apologies needed, it was very clear.