DIA Difference Between ZigBee and DigiMesh

From Digi Developer

Jump to: navigation, search


Mesh Setup

Although not related to DIA, people familiar with ZigBee setup will find DigiMesh a new experience.

Unlike ZigBee where new nodes can sometimes merely be powered up and joined to the correct network, DigiMesh works more like the older ZNet design where you will require either:

  • Use XCTU and an XBIB board to manually configure the required Network setting
  • Use a 'commissioning node' in an XBIB board with default settings to locate the new factory-fresh DigiMesh device, then using the 'Remote Configuration' setting, push the required Network settings into the new device.

See this Wiki page for a summary of the required parameters: Quick Guide to DigiMesh Setup

Understanding Sleeping

There is a basic difference between ZigBee and DigiMesh.

  • ZigBee has powered, non-sleeping devices called routers (or parents). The coordinator is just a router with an extra role.
    • Routers 'mesh', forming the resilient mesh-topology hyped by ZigBee advocates.
    • Routers discover routes (paths) and adjust routes as old peers go offline and new peers come online.
    • Routers repeat broadcasts
    • In general routers don't say much - unless asked to move data.
  • ZigBee also has sleeping end-devices (or children).
    • End-Devices do not mesh. They locate ONE specific router/parent to belong to.
    • When End-Devices wake up, they start polling their parent 10-times per second, sending data or looking for data the parent has buffered.
    • End-Devices do NOT repeat broadcasts
    • However, end-devices are rather chatty as long as they are awake!
  • All devices in DigiMesh are routers, forming the mesh
    • DigiMesh devices can sleep, or be fully awake.
    • All nodes need to understand the wake/sleep cycle, and only talk during wake cycles.

DigiMesh in DIA

What this means to DIA (and YML files) is that any ZigBee node can have any desired data sample rate. You can have 20 temperature sensors, all with random sample rates between 1 second and 1 day. The fully awake routers can send data at any time, and the sleeping end-devices can wake anytime, trusting that their parent is awake, ready and waiting to handle their data.

In contrast, under DigiMesh all data samples need to be an limited integral multiple of the entire mesh's sleep/wake cycle.

DIA/DigiMesh Sleep Coordinator

Within DIA, the Digi gateway acts as the designated sleep coordinator. This means DIA sets the sleep/wake times within the XBee within the gateway, and the gateway imposes the sleep/wake cycle over the entire mesh.

This is a DIA limitation, not a DigiMesh one. As of this release, DIA does not support nominated sleep coordinators, which is more appropriate to a peer-to-peer system. Most DIA systems are gateway-centric, assuming the gateway is critical and the devices have little or no function without the gateway, and therefore their sleep-coordinator.

DIA/DigiMesh Sleep Mode

To disable all sleeping, set the DigiMeshDeviceManager's sleep_time setting to zero. The SM value in all nodes is forced to 0x00.

To enable sleeping, set the DigiMeshDeviceManager's sleep_time and wake_time settings to a value higher than 10msec - for example 20000 and 10000 respectively, which means the mesh sleeps for 20 seconds, then is awake for 10 seconds. The SM value in all nodes is forced to either 0x07 or 0x08, which means 'always awake but sleep aware' and 'sleep'.

This 20/10 design means for 20 seconds none of the nodes transmit data - even the fully awake nodes (SM=0x07). Every device waits until the mesh wakes, then they all try to send messages as required, including forwarding (and 'meshing') as required. Of course the wake_time needs to be long enough to allow all the required messages to move, including passing across multiple hops.

This is a DIA limitation, not a DigiMesh one. DigiMesh includes some richer asynchronous sleep-modes, which allow nodes to wake up during the sleep-period and talk, however this implies the sleeping node is within 'ear shot' of a fully awake node since no other sleeping node will be awake to help route the message.

DIA/DigiMesh Data Sample Rates

At this point, all nodes can use external logic to decide when (during any particular wake-time) that they wish to send data. If the node has its own processor, it can format a message and send it during the beginning portion of the wake cycle, hopefully having time to receive any responses. The DIA framework on the gateway can also send out polls. The DigiMeshDeviceManager will queue up any pending outgoing messages from DIA drivers, then sending them out when the mesh wakes.

Support for the Digi XBee's IC/IR commands is also supported. By default, a node will send data each time it awakes. This requires IR=0xFFFF, IF=0x01 and at least 1 of the XBee IO pins be configured as an input.

The DigiMeshDeviceManager's set_if setting can be set to True or False. If set_if=False, then the DIA does NOT interfere with the IC/IR/IF settings within the remote nodes. DIA assumes that the user has configured the remote devices as required.

If set_if=True, then the DIA uses the various sample_rate setting of drivers to calculate the correct IR/IF values. For example, if the device wishes a once per minute data sample and the mesh is waking every 30 seconds (for example, our 20/10 sleep_time/wake_time settings), the setting IR=0xFFFF and IF=0x02 means the XBee will send a data sample every second wake cycle. The DIA will round down, so if the driver sample_rate is once per 75 seconds with a wake-cycle of 30 seconds (20/10 sleep/wake), then DIA is forced to select IF=0x02, which will give you data every 60 seconds.

Personal tools
Wiki Editing