Skip to content

Functional description

W-BACnet is designed to be simple to use, in that it requires little intervention from an external CPU.

RS485 Interface

The RS485 interface of the W-BACnet module consist of 4 digital signals: UART_TXD, UART_RXD, RS485_RE and RS485_DE. They can be used to interface an RS485 driver. For details on how to connect an RS485 driver IC, see the Pin assignments page.

NOTE: Signals on the RXD pin must NOT exceed VDD! For 5 V logic, a level shifting circuit (such as a resistor devider) must be used!

RS485 bus configuration

The writing of RS485 configuration to the W-BACnet device can be done regardless of the current app mode.

An RS485 configuration written to a W-BACnet gateway applies not only to itself, but also acts as the default for W-BACnet nodes in the same network. The default can be overridden, by writing RS485 configurations to mesh nodes individually. Mesh nodes other than the one being written will be unaffected. This feature allows BACnet devices with differing RS485 configuration to communicate in the same BACnet network.

NOTE: Individually written RS485 configurations, called local configurations, are lost on restarts, meaning the default RS485 configuration set on the gateway node will be used instead.

Commissioning

Commissioning a W-BACnet system is performed in the following steps:

  1. Put the W-BACnet module connected to the BACnet MS/TP Controller/Device into "Commissioning Gateway" mode via the SPI or UART management interfaces.

  2. Put the W-BACnet modules connected to the MS/TP Device devices into "Commissioning Mesh" mode via the SPI or UART management interface.

  3. Devices in mesh commissioning mode will join the gateway node and receive network credentials. In order to determine when this has happened, the COMMISSIONING field/register can be read via the SPI or UART management interfaces. When the value of COMMISSIONING is 1, the mesh node is ready. A mesh node usually takes around one minute to fully join the network, but this process can take longer depending on the physical environment (like walls and radio interference).

  4. Optional: The RS485 bus communication parameters can be configured via the SPI or UART management interface. Any RS485 configuration written to the gateway node acts as the default for all mesh nodes in the network. Mesh nodes with a locally set RS485 configuration will ignore this default. RS485 configuration written to a mesh node will only affect that one mesh node. The RS485 configuration can be written during both the commissioning and secure network states.

  5. Optional: Once all mesh nodes are ready, as indicated by the COMMISSIONING field/register, the system can be validated by having the BACnet MS/TP Controller/Device device poll BACnet MS/TP Device devices as if the BACnet devices were connected by a cable.

  6. Set the W-BACnet module connected to the MS/TP Controller/Device device to "Secure Gateway" mode via the SPI or UART management interface. At this point, the Gateway will broadcast a message to all mesh nodes in the network, instructing all devices to perform a synchronized restart after 10 seconds. After the restart has been performed, the W-BACnet Commissioning Gateway will enter "Secure Gateway" mode, and all connected Commissioning Mesh nodes will enter "Secure Mesh" mode. The commissioning process is now complete. The mesh nodes will search for the gateway again after the synchronized restart, and communicate securely using encryption, until explicitly decommissioned.

Decommissioning

Decommissioning a mesh node from a network can be done by utilizing the DEVICE_RESET field/register using the SPI or UART management interfaces. The node will restart automatically, at which point the device can be commissioned again.

To decommission an entire mesh network at once, switch the Secure Gateway into any other mode using SPI or UART. The gateway will send a broadcast, instructing currently connected nodes in the network to decommission. In the same manner as described in the Commissioning section, this broadcast also makes connected mesh nodes perform a synchronized restart 10 seconds after receiving the broadcast. After the synchronized restart, each connected mesh node will switch to commissioning mesh mode.

Detection of connected device

A W-BACnet module will listen passively on the bus for activity from connected devices. Once a device has been detected and the module has joined a wireless network, polling activity will begin. The Mesh Module supports a single MS/TP device on the bus and a gateway module can support several MS/TP devices for pre-existing networks. The addresses of detected devices can be accesses through the SPI or UART Interfaces by reading the SERVER_ADDRESSES bits/register.

Networking

W-BACnet is based on MiraMesh 2.9.0. For information on how the networking stack works, see the documentation about MiraMesh networks.

Practical considerations

MiraMesh is designed for robustness and power efficiency in interference-ridden radio environments. These environments can come with a cost to throughput and latency; and while throughput limitations usually are negligible when using BACnet, latency requirements, can potentially pose an issue.

As a general rule, allow 50 ms of latency per network jump from the root node in Round Trip Time (RTT). For example, a node that is 3 jumps away may introduce a latency of 150 ms. This may have to be considered when configuring timeout parameters on a bacnet MS/TP Controller/Device.

Our recommendation is to set communication timeout parameters of any BACnet MS/TP Controller/Device to at least 1000 ms.

Firmware Update

The firmware of the W-BACnet module can be updated using Nordic Semiconductor's nRF Connect app, available for both Mobile and Desktop devices.

To update the device, the module needs to be put in bootloader/DFU mode. This can be accomplished in one of two ways:

  • Set BOOTLOADER_ENABLED to 1 using the SPI or UART interface.
  • Drive the BOOTLOADER pin low while booting the module with the nRESET pin. Once the module has booted into DFU mode, the BOOTLOADER pin doesn't need to be driven any longer.

Once in DFU mode, the module can be found in nRF Connect's list of Bluetooth devices. Connect to the device and use the zip-file found here to update to the latest version of our firmware.

The module will boot in application mode again if no BLE activity has occurred in 2 minutes. Performing a reset via the nRESET-pin will also immediately boot the module in application mode again.

For detailed instructions as well as the latest firmware, please look at our support page.

Back to top