Chipkin BACnet Command line (CAS BACnet Cli) interface is a command line application that sends BACnet client messages and parses BACnet response from BACnet devices as human readable text or as machine readable XML.
The CAS BACnet Cli application can be used for many purposes including;
- Create scriptable end to end integration testing for BACnet server applications.
- Extending existing application to discover, integrate, write devices, objects and properties of BACnet devices.
- Testing BACnet server applications.
BACNET BIBB
Supported BACnet BIBB
- DS-RP-A: Data Sharing - ReadProperty-A
- DS-RPM-A: Data Sharing - ReadPropertyMultiple-A
- DS-WP-A: Data Sharing - WriteProperty-A
- DS-WPM-A: Data Sharing - WritePropertyMultiple-A
- DS-COV-A: Data Sharing - Change of Value-A
- DS-COVP-A: Data Sharing - Change of Value Property-A
- DS-COVU-A: Data Sharing - Change of Value Unsubscribed-A
- DM-DDB-A: Device and Network Management - Dynamic Device Binding-A
- DM-DOB-A: Device and Network Management - Dynamic Object Binding-A
- DM-OCD-A: Device Management - Object Creation and Deletion-A
- DM-UTC-A: Device Management - UTCTimeSynchronization-A
- DM-TS-A: Device Management - TimeSynchronization-A
- NM-FDR-A: Foreign Device Registration-A
COMMANDS
The CAS BACnet Cli application supports the following commands
- Who-Is - Discover BACnet devices on the local network.
- Who-Has - Discover BACnet devices on the local network by object name or instance number.
- Read Property - Get the current value of an object's property.
- Write Property - Set the current value of an object's property.
- Subscribe COV - Subscribe to changes of value for an object's property.
- Cancel Subscribe COV - Unsubscribe to changes of value for an object's property.
- Register Foreign Device - Registers a device with a BBMD.
- Create Object - Creates an object on a device.
- Delete Object - Delete an object on a device.
- I-Am - Sends a I-AM message.
- Build Write Property - Stores a combination of Object identifier, Property Identifier, and value to disk to be used by the Send Built Write Property command.
- Send Built Write Property - Sends the stored combinations created by the Build Write Property command as a Write Property Multiple message.
- Build Read Property - Stores a combination of Object identifier, and Property Identifier to disk to be used by the Send Built Read Property command.
- Send Built Read Property - Sends the stored combinations created by the Build Read Property command as a Read Property Multiple message.
- Build Create Object - Stores a combination of Object identifier, Property Identifier, and value to disk to be used by Send Built Create Object
- Send Built Create Object - Sends the stored combinations created by the Build Create Object command as a Create Object message.
- Reset - Removes temporary files created by whois, whohas, buildcreateobject, buildwriteproperty, buildreadproperty
- Enum - Lists the enumerations used by the CASBACnetCli command line parameters
Quick start
This is an example usage of the CAS BACnet Cli application testing against the CAS BACnet Stack server example
Get the version of the CAS BACnet Cli application and the CAS BACnet stack that the application was built on top
of
Command
CASBACnetCli.exe --version
Output
CASBAC-2300-18 CASBACnetCli v0.0.2.0, CAS BACnet Stack v3.6.1.0
Send a whois message to discover the local BACnet devices including the CAS BACnet stack server example
application.
Command
CASBACnetCli.exe whois
Output
Connection String | SNET | SADR | Device ID | Vendor | Max APDU
| Seg |
----------------------*------*-----------*-----------*---------*----------*------*
--- Response from BACnetCli tool ---
|
192.168.1.26:47808 | | |
389999 | 389 | 1476 | No |
192.168.1.201:47808 | | | 389201
| 389 | 1476 | No |
192.168.1.202:47808 | | | 389202
| 389 | 1476 | No |
192.168.1.203:47808 | | | 389203
| 389 | 1476 | No |
192.168.1.200:47808 | | | 389200
| 389 | 1476 | No |
A whois.txt file is created in the base directory. This file contains the connection string, SNET, SDAR, and
device id. This file is used in other commands to look up the connection string, SNET, SDAR by the device id. This
file is especially useful when the device is on the other side of a BACnet router and has a SNET or SDAR.
The whois.txt file will look something like this
192.168.1.26:47808,0,,389999
192.168.1.203:47808,0,,389203
192.168.1.201:47808,0,,389201
192.168.1.202:47808,0,,389202
192.168.1.200:47808,0,,389200
Send a read property message with the property identifier of ALL (8) to a device (8) with an object identifier of
389999.
The property identifier of ALL (8) is special, and the CAS BACnet Cli application will send this request as a read
property multiple message instead of a read property message.
Command
CASBACnetCli.exe readproperty 8 389999 8 --deviceid=389999
This command includes the --deviceid parameter. The deviceid parameter tells the system to search the whois.txt
file by the deviceid and extract the connection string, SNET, SDAR and use them for this command. The following
command is equivalent.
Command
CASBACnetCli.exe readproperty 8 389999 8 --ip=192.168.1.26 --port=47808 --snet=0
Output
Service: readPropertyMultiple (14)
Object Identifier: device(8), 389999
Property Identifier | DataType |
Value
------------------------------ * ---------------- * ---------------------------------
apduTimeout (11) | Uint
| 3000
applicationSoftwareVersion (12) | CharString | v1
daylightSavingsStatus (24) | Bool | 1
firmwareRevision (44) | CharString | 3.5.0.213
localDate (56) | Date
| 2018/9/25 (2)
localTime (57) | Time
| 15:42:16.0
maxApduLengthAccepted (62) | Uint | 1476
modelName (70) | CharString
| CAS BACnet Stack
numberOfApduRetries (73) | Uint |
0
objectIdentifier (75) | ObjectIdentifier | device(8), 389999
objectList (76) | ObjectIdentifier |
analogInput(0), 0
objectList (76) | ObjectIdentifier |
analogOutput(1), 1
objectList (76) | ObjectIdentifier |
analogValue(2), 2
objectList (76) | ObjectIdentifier |
binaryInput(3), 3
objectList (76) | ObjectIdentifier |
binaryOutput(4), 4
objectList (76) | ObjectIdentifier |
binaryValue(5), 5
objectList (76) | ObjectIdentifier | device(8),
389999
objectList (76) | ObjectIdentifier |
multiStateInput(13), 13
objectList (76) | ObjectIdentifier |
multiStateOutput(14), 14
objectList (76) | ObjectIdentifier |
multiStateValue(19), 19
objectList (76) | ObjectIdentifier |
bitstringValue(39), 39
objectList (76) | ObjectIdentifier |
characterstringValue(40), 40
objectList (76) | ObjectIdentifier | dateValue(42),
42
objectList (76) | ObjectIdentifier |
integerValue(45), 45
objectList (76) | ObjectIdentifier |
largeAnalogValue(46), 46
objectList (76) | ObjectIdentifier |
octetstringValue(47), 47
objectList (76) | ObjectIdentifier |
positiveIntegerValue(48), 48
objectList (76) | ObjectIdentifier | timeValue(50),
50
objectList (76) | ObjectIdentifier |
networkPort(56), 56
objectName (77) | CharString
| Device_Rainbow
objectType (79) | Enum
| 8
protocolObjectTypesSupported (96) | BitString |
{T,T,T,T,T,T,F,F,T,F,F,F,F,T,T,F,F,F,F,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,F,T,F,F,T,T,T,T,F,T,F,F,F,F,F,T,F,F}
protocolServicesSupported (97) | BitString |
{F,F,F,F,F,T,F,F,F,F,F,F,T,F,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,F,T,F,F,F,F,F,F}
protocolVersion (98) | Uint
| 1
segmentationSupported (107) | Enum | 3
systemStatus (112) | Enum
| 0
utcOffset (119) | Int
| 0
vendorIdentifier (120) | Uint
| 389
vendorName (121) | CharString
| Chipkin Automation Systems
protocolRevision (139) | Uint
| 12
databaseRevision (155) | Uint
| 19
Send a read property message with the property identifier of present value (85) to an analog output (1) with an
object identifier of 1. The value should be zero.
Command
CASBACnetCli.exe readproperty 1 1 85 --deviceid=389999
Output
Service: readProperty (12)
Object Identifier: analogOutput(1), 1
Property Identifier | DataType |
Value
------------------------------ * ---------------- * ---------------------------------
presentValue (85) | Real
| 0
Send a write property message to update object’s property identifier of present value (85) of an analog output (1)
object with an object identifier of 1
Command
CASBACnetCli.exe writeproperty 1 1 85 99.6 --datatype=4 --deviceid=389999
Output
Received SimpleAck with originalInvokeId=[0] and serverAckChoice=[15]
We want to send a read property multiple for several different objects and properties. We need to build the read
property message. The following commands do not send a message on to the network instead they save the parameters
to a local file buildreadproperty.txt
Command
CASBACnetCli.exe buildreadproperty 1 1 77
CASBACnetCli.exe buildreadproperty 1 1 85
CASBACnetCli.exe buildreadproperty 1 1 111
After the above commands have been executed the buildreadproperty.txt file will have the following contents.
buildreadproperty.txt
1,1,77
1,1,85
1,1,111
To send the built read property multiple message we use the sendbuiltreadproperty command
Command
CASBACnetCli.exe sendbuiltreadproperty --deviceid=389999
Output
Service: readPropertyMultiple (14)
Object Identifier: analogOutput(1), 1
Property Identifier | DataType |
Value
------------------------------ * ---------------- * ---------------------------------
presentValue (85) | Real
| 99.6
statusFlags (111) | BitString |
{F,F,F,F}
objectName (77) | CharString
| AnalogOutput_Vermilion
I'd like to inquire about the CAS BACnet Cli - BACnet Command line CAS-2300-18.
Please provide me with a quote for this product.