BACnet MSTP auto addressing

Updated on 2020.3.25 for firmware version 3.x

Because the same time online for all devices could not be guaranteed, there is no auto addressing solution could avoid MAC conflict. To help determine max_master and unused MAC on bus, “Sniffer mode” could be enabled, then “Current max master” could be obtained from run time info. Unused MAC also could be chosen referred to “Recently active devices”.

Every device on a MSTP bus should have a unique MAC address.  For master device, the available address range is 0~127,  and 128~254 for slave device.

Usually MAC address is set by DIP switch, jumper, LCD screen, firmware downloaded by configuration tools. Some devices support MAC address modification through BACnet object/property, but before doing that, it should have a valid MAC address to join BACnet network.

If the unique MAC address could be automatic obtained like we get IP address just by plugging notebook into home/office network, it would save a lot of time in commission.

There are several solutions had been discussed.    Now seems committee prefer  “Zero-Config” (addendum 135-2012bb)

BACnet stack has implemented “Zero-Config”.

“Zero-Config” only works on fixed configuration that Max-master is 127 and automatic assigned address range is 64~127. If not, it may cause mess.

To avoid above limitation, BACRouter implements proprietary auto addressing solution and keep compatible with “Zero-Config”.  It has some attractive features:

  1. Learning Max-master from bus traffic.
  2. Assigning MAC address from highest unused one.

So users have more freedom on MAC address schema,  For example, leave address 0~30 for fixed address devices, set Max-master as 40, so automatic addressing devices would use 31~40.

Both Zero-Config and BACRouter’s solution have trouble when a automatic addressing device is pulled out bus then plugged in again without reboot, because a new attached automatic addressing device would occupy the same address.(BACRouter is more weak in such situation because of it’s predictable address assigning), So

ALWAYS power on automatic addressing device after attaching to bus.

BACnet MSTP的令牌转发性能

在BACnet标准中,MSTP的最高波特率为115200bps,一个token包的长度为8字节,在两个包之间至少还要有4字节的切换时间(Tturnaround = 40bits),所以理论最高令牌转发率为115200/(80 + 40) = 960次/秒。

但是实际上市场上大部分产品的底层实现,都难以达到,造成MSTP的实际带宽受限,甚至造成丢包或丢令牌。

目前我司的产品上的进行的测试,4个节点,mac address从0~3, max_master=3,网络层静默,测得令牌转发率为948次/秒,带宽利用率98.8%.

在每秒一个读属性请求(23字节),一个读属性应答(29字节)的条件下,测得令牌转发率为943次/秒。

我司的协议栈是在完全满足标准时序要求下,基本榨干了MSTP的性能。

更新,2017年2月,我们在上述配置下做了ReadProperty服务的压力测试,把4个节点的max_info_frames均设为10,2个节点请求,2个节点响应。最后的结果每秒钟完成153~154个服务。

更新,2017年3月,现在通过详细的运行信息,用户可以方便地得到令牌转发率数据。在发布新一版固件9个月之后,我们重新做了上面的测试,这次的结果是每秒956.6次的令牌转发率,99.6%的带宽利用率。