The BACnet tool set uses binary to demonstrate the application command line program. These programs use BACnet/IP for multiple BACnet services. Some tools use BACnet whois to create a device, but you can also use static binding file address cache.
Most tools have the -- help option and use environment variables to configure the data link layer.
The client tool uses whois to bind the target device. Whois is read by each client tool from the current working directory and can be cleared using address cache files.
Obtaining the device address from the address cache file greatly improves the speed and throughput of the client tool. Address cache files can be generated using standard output from bacwi.
Example:
Bacwi-1> address_cache
Client tools
------------
Bacscarf-BACnet atomicreadfile Service
Bacawf-BACnet atomicwritefile Service
Bacdcc-BACnet devicecommunicationcontrol Service
Bacepics-BACnet epics for device object.
Bacrd-BACnet reinitializedevice Service
Bacrp-BACnet readproperty Service
Bacrpm-BACnet readpropertymultiple Service
Bacscov-BACnet subscribecov Service
Bacts-BACnet timesynchronization Service
Bacucov-BACnet unconfirmedchangeofvalue Service
Bacupt-BACnet unconfirmedprivatetransfer Service
Bacwh-BACnet whohas Service
Bacwi-BACnet whois Service
Bacwp-BACnet writeproperty Service
Server tools
------------
Bacserv-BACnet device Simulator
Router tools
------------
Baciamr-BACnet I-am-router to network message
Bacinitr-BACnet initialize router message
Bacwir-BACnet who-is router to network message
MS/TP package capture tool MS/TP capture tool
------------------
The mstpcap tool is used for capturing MS/TP traffic
From an RS-485 serial adapter and saving the packets
In a file for viewing by Wireshark.
Environment Variables
---------------------
Bacnet_apdu_timeout-Set this value in milliseconds to change
The APDU timeout. APDU timeout is how much time a client
Waits for a response from a BACnet device. Default is 3000 Ms.
Bacnet_iface
-Set this value to dotted IP address (Windows)
The interface (see ipconfig command on Windows) for which you
Want to bind. on Linux, set this to the/dev Interface
(I. e. eth0, arc0). Default is eth0 on Linux, and the default
Interface on Windows. Hence, if there is only a single network
Interface on Windows, the applications will choose it, and this
Setting will not be needed.
Bacnet_ip_port-Udp/IP port number (0 .. 65534) used for BACnet/IP
Communications. Default is 47808 (0xbac0 ).
Bacnet_bbmd_port-Udp/IP port number (0 .. 65534) used for foreign
Device registration. defaults to 47808 (0xbac0 ).
Bacnet_bbmd_timetolive-Number of seconds used in foreign Device
Registration (0 .. 65535). defaults to 60000 seconds.
Bacnet_bbmd_address-Dotted IPv4 address of the bbmd or foreign Device
Registrar.
Example usage
-------------
You can communicate with the virtual BACnet device by using the other BACnet
Command Line tools. If you are using the same PC, you can useBbmd/FD
(Foreign device registration) to do this-use the bvlc script. You can
Monitor the interaction and bytes on the wire using Wireshark. Here is
An example usage for window and for Linux.
Windows Platform
-------
The BACnet tools are used from the command prompt, or cmd. EXE.
From the Command Prompt window, start the simulated BACnet device:
C: \> bacserv 1234
From another Command Prompt window, use ipconfig to determine
Network interface IP address that bacserv is using:
C: \> ipconfig
Use the default IP address to configure the bbmd and foreign Device
Environment variables:
C: \> bvlc. Bat 192.168.0.42
Bvlc. bat batch file configures environment variables to use BACnet/IP
Port 47809 for any subsequent BACnet Tools run from that Command Prompt window,
And enables the bbmd foreign device registration.
Perform a device discovery:
C: \> bacwi-1
Read all the required properties from the device 1234 and display their values:
C: \> bacepics-V 1234
Read the object_identifier property from the device 1234:
C: \> bacrp 1234 8 1234 75
Write 100.0 (real = 4 datatype) to device 1234 analog output (1) One (1)
At priority 16 with no index (-1 ).
C: \> bacwp 1234 1 1 85 16-1 4 100.0
Each tool has help:
C: \> bacrp -- Help
Linux platform
-----
To use the tools from the command line, you need to use the path to the command,
Or include the path in your path environment variable. The dot "." means current
Directory. The "/" is used to separate directories. "./" means the path starts
From the current directory.
When the tools are built from the makefile, they are copied to the bin/directory.
So from the root of the project you can run the tools like this using a terminal
Window:
$ Make clean all
$./Bin/bacserv 1234
In another terminal window use ifconfig to determine the network interface IP
Address that bacserv is using:
$ Ifconfig
Use that address (likely from eth0) to configure the bbmd and foreign Device
Environment variables:
$./Bin/bvlc. Sh 192.168.0.42
Bvlc. Sh script configures environment variables to use BACnet/IP
Port 47809 for any subsequent BACnet Tools run from that shell,
And enables the bbmd foreign device registration.
Perform a device discovery:
$./Bin/bacwi-1
Read all the required properties from the device 1234 and display their values:
$./Bin/bacepics-V 1234
Read the object_identifier property from the device 1234:
$./Bin/bacrp 1234 8 1234 75
Write 100.0 (real = 4 datatype) to device 1234 analog output (1) One (1)
At priority 16 with no index (-1 ).
$./Bin/bacwp 1234 1 1 85 16-1 4 100.0
Each tool has help:
$./Bin/bacrp -- Help
Source code
-----------
The source code for the BACnet-tools can be found:
Http://bacnet.sourceforge.net/