BACnet Stack: A tested BACnet Protocol Library for embedded systems

CAS BACnet Stack - BACnet Network Communication | Chipkin Automation Systems

Intro to the BACnet Stack

BACnet is a communications protocol for Building Automation and Control (BAC) networks that leverage the ASHRAE, ANSI, and ISO 16484-5 standard protocol. It is currently the most popular protocol used in Building Automation Systems (BAS).

Chipkin’s BACnet Stack (CAS BACnet Stack) is a royalty-free software library that allows you to add a native BACnet interface to your embedded devices or applications. The BACnet stack supports both BACnet server (Field device, power meter, gas detector, etc.) and BACnet client (HMI, Utilities, data loggers, etc.) services giving you the flexibility you need to succeed. With support for protocol revision 19, Chipkin's BACnet Stack is a market leader and one of the most up-to-date stacks available. To ensure the comprehensiveness and reliability of our BACnet Stack, Chipkin participates in Plugfest events annually, with our most recent visit taking place in 2022.

The BACnet Stack is a transport layer-independent library, making it easy to use with any transport layer such as IP, Secure Connect, MSTP, Ethernet, and even PTP and ARCnet. By giving you control of the transport layer you can optimize bandwidth and performance by exploiting the resources at your disposal, such as multi-threading and multiple simultaneous connections. See the diagram below of the BACnet Stack Layers which shows what portions are provided by the stack and what by the client:

BACnet Stack Layers

             *Area in the border is provided by the BACnet Stack. The area outside is provided by the client.

Benefit from our 20+ years of BACnet experience!!!

BACnet Logo

Take it from us, we have been working with BACnet for 20+ years. Our BACnet Stack resume includes 10+ years of development, 25,000+ commits, 50,000+ lines of code, 2,500 unit tests, 50+ devices using the stack and among other capabilities, 1,000,000+ device installations. We know what we are doing. Purchasing the BACnet Stack from us will save you man-years of development when your company needs it the most. Let us handle the grunt work, BACnet Spec is complex and it takes months of work just to learn the details.

Chipkin’s BACnet Stack (CAS BACnet Stack) is an application layer BACnet library for embedded systems and application development. The stack allows applicable devices to communicate using several of the BACnet flavors and can function both as a server (Field Device, etc…) or as a client (HMI, etc…).

We have also built the stack to be BACnet spec compliant (we do things according to the BACnet spec.). All devices that have used the CAS BACnet stack have passed BTL Certification (BACnet International BLT) by the BACnet Testing laboratories. We do things the right way from the start!

To ensure our BACnet stack is well-tested and compatible with industrial leaders, Chipkin attends the yearly BACnet Plugfest to test new features and services from all of the leading manufacturers. We also guarantee that no "copyleft" source code is included in the library. No GNU GPL, etc...

Furthermore, the CAS BACnet Stack is particularly well-suited to most contemporary programming styles as the API uses Json/XML to transfer requests for packet building as well as for handling back-parsed packets. Included in the sale of our Stack are support hours that can be used to consult on all things BACnet or for remote desktop support for the implementation of the library. With Chipkin, you have the experts at your side.

  • Supports both BACnet server and BACnet client functionality.
  • Network layer independent supporting; BACnet IP, BACnet MSTP, BACnet Secure Connect (SC) and other BACnet network flavors.
  • Interfaces a wide array of different programming languages. C, Python, C#, Java, Delphi, Node.JS, etc...
  • Support Protocol Revision 19.
Automation Checkmark
Inverse Corner
Features Continued
  • Supports Windows, Linux, MacOS, RTOS, and bare metal/embedded platforms.
  • Supports decoding BACnet messages as Json/XML.
  • Supports BBMD, and Foreign device registration.
  • Designed for maximum portability across a wide range of different architectures and operating systems. X86, 32-bit, 64-bit, ARM, AVR, Microchip, Freescale ColdFire, etc…
  • Supports a wide range of compilers. GCC, Microsoft Visual C++, Borland C++, Code Warrior, IAR, CrossWorks, MicroChip MPLab.
  • Need More Features, Contact us!!

Source Code and Code Quality

Chipkin's BACnet Stack source code conforms to the C++/11 standard and is built for portability to many different operating systems and architectures.

Extensive unit tests have been written for our BACnet Stack in Google's C++ test framework. The source code has been tested with Valgrind to detect any memory leaks, threading issues, and performance profiling.

The CAS BACnet Stack is thread-safe and can be used on systems that do not support threading.

The CAS BACnet Stack source code has been compiled and tested with the following compilers:

The CAS BACnet Stack interfaces support building applications in your preferred programing language:

Other compilers and programming languages may be supported as well. Please Contact Us for more information

Example Source Code

Please read the BACnet Stack License Agreement before downloading the Sample Code. If interested in our Stack, we will provide a License Agreement for the complete product at the time of purchase.

Example source code projects for many common use cases can be found on our public github page >

See below for a simplified example of creating a BACnet IP server.

Supported Architectures and Operating systems

The CAS BACnet Stack is designed for maximum portability and compatibility with as many different architectures and operating systems as possible.

The CAS BACnet Stack uses a series of callbacks for accessing operating systems and network functionality. Multiple operating system interfaces have been created for the standard operating systems such as Windows, Linux, and RTOS. New interfaces can be created for other operating systems and embedded systems. Our BACnet stack can be considered network layer and operating systems independent

As of 2019, the CAS BACnet Stack supports protocol revision 19, making it a global market leader and one of a few stacks that support revision 19. Chipkin attends plugfest annually and is one of the most up-to-date stacks in the market.

Operating systems Interface have been created for the following OS:

The CAS BACnet Stack has been ported to many different architectures. Below is a list of all tested functional architectures.

  • Intel x86, 32-bit, 64-bit
  • AMD 32-bit, 64-bit
  • ARM (ARM Cortex-M4, ARMv7E-M, etc…)
  • Microchip
  • AVR
  • Freescale ColdFire
  • Raspberry PI 2/3/4/Zero, Beaglebone, etc...

Porting to other systems and architecture is supported. Please Contact Us for more information

BACnet services supported!

The CAS BACnet Stack supports more BIBBs than almost any other BACnet Stack on the market.

Supported BIBBs:

  • DS-RP-A: Data Sharing - ReadProperty-A
  • DS-RP-B: Data Sharing - ReadProperty-B
  • DS-RPM-A: Data Sharing - ReadPropertyMultiple-A
  • DS-RPM-B: Data Sharing - ReadPropertyMultiple-B
  • DS-WP-A: Data Sharing - WriteProperty-A
  • DS-WP-B: Data Sharing - WriteProperty-B
  • DS-WPM-A: Data Sharing - WritePropertyMultiple-A
  • DS-WPM-B: Data Sharing - WritePropertyMultiple-B
  • DS-COV-A: Data Sharing - Change Of Value-A
  • DS-COV-B: Data Sharing - Change Of Value-B
  • DS-COVP-A: Data Sharing - Change Of Value Property-A
  • DS-COVP-B: Data Sharing - Change Of Value Property-B
  • DS-COVU-A: Data Sharing - Change Of Value Unsubscribed-A
  • DS-COVU-B: Data Sharing - Change Of Value Unsubscribed-B
  • DS-V-A: Data Sharing - View-A
  • DS-AV-A: Data Sharing - Advanced View-A
  • DS-M-A: Data Sharing - Modify-A
  • DS-AM-A Data Sharing - Advanced Modify-A
  • DS-COVM-B Data Sharing - Change Of Value Multiple-B
  • DM-DDB-A Device Management - Dynamic Device Binding-A
  • DM-DDB-B Device Management - Dynamic Device Binding-B
  • DM-DOB-A Device Management - Dynamic Object Binding-A
  • DM-DOB-B Device Management - Dynamic Object Binding-B
  • DM-DCC-A Device Management - DeviceCommunicationControl-A
  • DM-DCC-B Device Management - DeviceCommunicationControl-B
  • DM-TM-A Device Management - Text Message-A
  • DM-TM-B Device Management - Text Message-B
  • DM-TS-A Device Management - TimeSynchronization-A
  • DM-TS-B Device Management - TimeSynchronization-B
  • DM-UTC-A Device Management - UTCTimeSynchronization-A
  • DM-UTC-B Device Management - UTCTimeSynchronization-B
  • DM-RD-A Device Management - ReinitializeDevice-A
  • DM-RD-B Device Management - ReinitializeDevice-B
  • DM-OCD-A Device Management - Object Creation and Deletion-A
  • DM-OCD-B Device Management - Object Creation and Deletion-B
  • DM-ANM-A Device Management - Automatic Network Mapping-A
  • DM-ADM-A Device Management - Automatic Device Mapping-A
  • DM-MTS-A Device Management - Manual Time Synchronization-A
  • T-VMT-I-B Trending - Viewing and Modifying Trends-Internal-B
  • T-VMMV-I-B Trending - Viewing and Modifying Multiple Values-Internal-B
  • T-V-A Trending - View-A
  • NM-BBMDC-B Network Management - Router Configuration-B
  • NM-FDR-A Network Management - Foreign Device Registration-A
  • GW-VN-B Gateway - Virtual Network-B
  • GW-EO-B Gateway - Embedded Objects-B

Supported BACnet device profiles:

  • B-ASC: BACnet Application Specific Controller
  • B-SA: BACnet Smart Actuator
  • B-SS: BACnet Smart Sensors
  • B-GW: BACnet Gateway
  • B-GENERAL: Basic BACnet functionality

Supported services:

Service Initiate Execute
ConfirmedCOVNotificationMultiple -
SubscribeCOVPropertyMultiple -
UnconfirmedCOVNotificationMultiple -

Requirements and dependency

The CAS BACnet stack is designed to have minimum requirements to maximize the portability of the source code across as many platforms and architectures as possible. It has the ability to run on devices with very low resources by disabling BACnet services to reduce the required resources and dependencies.

Minimum Requirements:

  • A relative millisecond timer
  • C++ compiler
  • Standard Template Library (STL)
  • Networking:
    • UDP for BACnet IP
    • TCP/WS for BACnet Secure Connect
    • RS485 Serial for BACnet MSTP

The amount of ram that the Chipkin BACnet stack requires depends on several factors including; BACnet Services supported, Object types supported, Object count, COV limits, etc...

BACnet objects supported

Our BACnet stack fully supports most commonly used BACnet objects, and partially supports some of the rarely used, advanced BACnet objects. See the list below:

Fully Supports

  • Analog Input
  • Analog Output
  • Analog Value
  • Binary Input
  • Binary Output
  • Binary Value
  • Device
  • Multi-state Input
  • Multi-state Output
  • Multi-state Value
  • Character String Value
  • DateTime Value
  • Large Analog Value
  • BitString Value
  • OctetString Value
  • Time Value
  • Integer Value
  • Positive Integer Value
  • Date Value
  • Network Port
  • Elevator Group
  • Lift
  • Escalator
  • Trend Log
  • Trend Log Multiple

Partially supports

  • Averaging
  • Calendar
  • Command
  • Event Enrollment
  • File
  • Group
  • Life Safety Point
  • Life Safety Zone
  • Loop
  • Notification Class
  • Program
  • Pulse Converter
  • Schedule
  • Access Door
  • Event Log
  • Load Control
  • Structured View
  • Access Point
  • Access Zone
  • Access User
  • Access Rights
  • Access Credential
  • Credential Data Input
  • DateTime Pattern Value
  • Time Pattern Value
  • Date Pattern Value
  • Network Security
  • Global Group
  • Notification Forwarder
  • Alert Enrollment
  • Channel
  • Lighting Output
  • Binary Lighting Output
  • Timer
  • Accumulator
BACnet BTL Pre-Testing Services

Sending a new BACnet device to the BACnet Testing Laboratory (BTL) for certification can be a daunting task. Each issue or error that BTL discovers through the testing process will add variable costs and delays. Depending on how long it takes your team to resolve the issues discovered during testing you may be bumped from your testing slot and have to wait for the next available testing slot.

Take it from us, we have been working with BACnet for 20+ years. Our BACnet Stack Resume includes 10+ years of development, 25,000+ commits, 50,000+ lines of code, 2,500 unit tests, 50+ devices using the stack and among other capabilities, 1,000,000+ device installations... Read More about BACnet BTL Pre-Testing


Purchase any BACnet product from us and we will help you test and document the BACnet interface by providing a free full license to the CAS BACnet Explorer.

BACnet for Field Technicians (Free!)

Learning about BACnet? Want to update your BACnet knowledge? This free EBook will guide you through basic and advanced BACnet topics.

You can purchase a hardcopy of this book from Amazon or you can download the BACnet for Field Technicians for free from our website.

BACnet for Field Technicians
CAS BACnet Explorer

CAS BACnet Explorer is the perfect utility for testing, debugging, and discovering BACnet® networks and devices. It is great for network diagnostics and discovering who is the problem. No more pointing fingers.

CAS BACnet Explorer performs the following functions within BACnet Networks:

  • Exploring/Discovering
  • Testing
  • Debugging
  • Monitoring

Buy the CAS BACnet Explorer!!

CAS BACnet Expolorer Legacy Image
Please answer the following General questions 1) What does the device do? 2) Is your device a BACnet Server or BACnet client or Both? 3) Do you want to support BACnet IP or BACnet MSTP or Both? 4) Do you need BACnet SC (BACnet Secure Connect) ? 5) What hardware and architecture is being used for this project? 6) How much ram (Memory) and code space (Flash) is available on the device? 7) What programming language and compiler are you using (C/C++, Python, NodeJS, etc..)? 8) Do you need BTL certification? see program: Chipkin offers BACnet BTL Pretesting 9) What is the project timeline? Answer if you require BACnet Server 1. How many objects (points, variables, properties, fields) do you want to BACnet? 2. What kind of objects do you want to expose? AI, AO, BI, BO, etc… 3. Are there any specific BACnet BIBBs that you require?

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm
Message Sent Successfully