HVAC BACnet Controller Application for Commercial and Industrial Buildings


Linux Device driver and kernel changes to enhance protocol and timing constraints for BACnet HVAC controller.

The Client

The client offers the most extensive line of industrial building controls and components available to today's market, including valve bodies, valve assemblies, actuation devices and sensors, as well as interfaces and automated systems for linking their products with other building systems. They also produce various electronic HVAC (heating, ventilation and air conditioning) plant controllers for large buildings that are networked together over an ANSI-standard network known as BACnet (Building Automation and Control networks).

The Need

Software developers at the client location had written an application and network layer protocol to communicate with various plant controllers on their BACnet network. What they lacked was the time required to produce a customized data link that conformed to the Master-Slave Token Passing (MS/TP) protocol as defined in the BACnet standard. In addition, the BACnet standard imposed timing constraints to the physical layer, whose underlying implementation utilized RS-485 for sending messages over long distances in large building systems. Because the control system was Linux based, these timing constraints posed a significant challenge. Linux by default does not guarantee timings, so this requirement called for a custom driver implementation and updates to the underlying Linux kernel code.

The client turned to RightHand Technologies' software engineers for their knowledge of communication protocols and Embedded Linux for a seamless integration of the data link layer and the main application.

The RightHand Solution

RightHand engineers responded quickly to the project deadlines and worked diligently to produce a robust software solution. RightHand began the project by designing a plan to work from the bottom up. First, the kernel code affecting the timing requirements at the physical layer was tested. Next, the MS/TP LAN protocol was implemented with two state machines. The state machines were incorporated into a line discipline that can be registered and de-registered with the Linux kernel. This approach had two advantages. First, the data link layer would work in the background and not affect other running processes. Second, multiple applications could simultaneously utilize the services of the line discipline.

The Results

Source code was provided and made extremely easy to read, and final test documentation was provided upon conclusion of the project. The project then proceeded to field trials, and there were virtually no issues with the protocol response or timing of the HVAC controller device.