BACRabbit is an open source implementation of the BACnet communications protocol for systems based on the Rabbit Inc. Rabbit 4000, Rabbit 5000 and Rabbit 6000 microcontrollers. The project is hosted at https://sourceforge.net/projects/bacrabbit. It is a port of the C based stack which can be found at https://sourceforge.net/projects/bacnet.
BACnet is a standard data communication protocol for Building Automation and Control Networks and the BACnet protocol standard is available from ASHRAE www.ashrae.org. It is however, a protocol which also has many potential applications beyond the narrow field of Building Automation and Control.
This BACnet library provides BACnet application layer, network layer and media access (MAC) layer communications services for an embedded system based on a Rabbit Semiconductor processor and Dynamic C. This allows Rabbit Semiconductor based devices to share data with other BACnet devices and with BACnet software running on PCs using an industry standard protocol. It currently supports the use of the BACnet/IP (TCP/IP data transport) and BACnet MS/TP (rs485 data transport) networking options.
Much useful information on BACnet is to be found at www.bacnet.org. Whilst it is not essential for using this stack, I would recommend purchasing a copy of the BACnet standard if you intend undertaking any serious BACnet development.
BACRabbit has been tested with the following products:
GLAS Energy Technology: (www.glasenergytechnology.ie)
Rabbit Inc.: (www.rabbit.com)
Sample applications are provided which will work “out of the box” with the above and it should be easy to get the stack up and running with other Rabbit based products based on the examples supplied, particularly if they are from the same family e.g. BL4S110, BL4S160 etc.
Note: On Rabbit 4000 and Rabbit 5000 systems, MS/TP operation at 38,400bps has been tested using single buffered serial ports (A, B, C or D) and operation at 76,800bps has been tested with quad buffered ports (E or F). The Rabbit 6000 has been tested at 76,800bps with all ports.
BACRabbit has been built and tested Dynamic C versions 10.50, 10.56, 10.60, 10.62, 10.66, 10.72. Some functionality requires Dynamic C 10.64 or later to work:
· Atomic Read File and Atomic Write.
· ReadPropertyMultiple acknowledgement handling require ANSI C library support.
The stack currently supports the following BACnet services:
· Atomic Read File
· Atomic Write File
· Change of Value notification
· Events and Alarms
· I Am/Who Is
· I Have/Who Has
· Life Safety Operation
· Read Property
· Read Property Multiple
· Read Range
· Confirmed Private Transfer
· Unconfirmed Private Transfer
· Time Synchronisation
· UTC Time Synchronisation
· Write Property
· Device Communications Control
· Reinitalise Device
· Router discovery support
· Gateway router support
Sample implementations of the following BACnet object types are provided with the stack:
· Analog Input
· Analog Output
· Analog Value
· Binary Input
· Binary Output
· Binary value
· Load Control
· Life Safety Point
· Multi State Input
· Multi State Output
· Trend Log
The example applications provided for the various platforms, implement a simple server with the above collection of object types. Some of the objects map to the I/O of the board in question and some are just dummies which can be accessed via BACnet but do not do anything "real".
Most of the examples also implement some client functionality by searching for available devices and reading a selection of properties from the device object of each device found. This provides a convenient way to see the BACnet stack in operation and show that it is working.
Most of the demo apps use the uC/OS II RTOS but it is not essential for the operation of the stack and the XG4500 demos do not use it.
The latest tested release is always available at https://sourceforge.net/projects/bacrabbit/
In addition to the release zip files, the latest source is always available via the SourceForge repository at: http://bacrabbit.svn.sourceforge.net/viewvc/bacrabbit/
You can use SVN to access the repository (I use TortoiseSVN - see http://tortoisesvn.net/ ). You can also grab a GNU tarball of the current source by navigating (via the Code\SVN Browse link from the home page) to trunk\bacnet-stack and clicking on the "Download GNU tarball" link near the bottom left. Many ZIP programs can open these files under Windows; I use 7-Zip from www.7-zip.org.
This BACnet protocol stack implementation is specifically designed for the embedded BACnet appliance, using a GPL with exception license (like eCos), which means that any changes to the core code that are distributed get to come back into the core code, but the BACnet library can be linked to proprietary code without the proprietary code becoming GPL. Note that some of the source files are designed as skeleton or example files, and are not copyrighted.
The text of the GPL exception included in each source file is as follows:
"As a special exception, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other works to produce a work based on this file, this file does not by itself cause the resulting work to be covered by the GNU General Public License. However the source code for this file must still be made available in accordance with section (3) of the GNU General Public License."
The BACnet protocol is an ASHRAE/ANSI/ISO standard, so this library adheres to that standard. BACnet has no royalties or licensing restrictions, and registration for a BACnet vendor ID is free.
Please address any queries, bug fixes, feature requests, etc to email@example.com. Alternatively, join the mailing list at http://lists.sourceforge.net/mailman/listinfo/bacrabbit-developers and post your questions.