adjust root folder
This commit is contained in:
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacabort [abort-reason invoke-id server]
|
||||
|
||||
# BACnetAbortReason
|
||||
for reason in {0..64}
|
||||
do
|
||||
./bin/bacabort ${reason}
|
||||
done
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
echo Setting parameters for Router
|
||||
BACNET_IP_PORT=47808
|
||||
export BACNET_IP_PORT
|
||||
#BACNET_BBMD_PORT=47809
|
||||
#export BACNET_BBMD_PORT
|
||||
BACNET_IFACE=${1}
|
||||
export BACNET_IFACE
|
||||
BACNET_IP6_PORT=47808
|
||||
export BACNET_IP6_PORT
|
||||
BACNET_BIP6_BROADCAST=FF05::BAC0
|
||||
export BACNET_BIP6_BROADCAST
|
||||
BACNET_BIP6_IFACE=${1}
|
||||
export BACNET_BIP6_IFACE
|
||||
# Network Numbers
|
||||
BACNET_IP_NET=1
|
||||
export BACNET_IP_NET
|
||||
BACNET_IP6_NET=2
|
||||
export BACNET_IP6_NET
|
||||
@@ -0,0 +1,50 @@
|
||||
@echo off
|
||||
:Test_Start
|
||||
echo Test: Read Required Properties of Device Object %1
|
||||
bacrp.exe %1 8 %1 75
|
||||
bacrp.exe %1 8 %1 77
|
||||
bacrp.exe %1 8 %1 79
|
||||
bacrp.exe %1 8 %1 112
|
||||
bacrp.exe %1 8 %1 121
|
||||
bacrp.exe %1 8 %1 120
|
||||
bacrp.exe %1 8 %1 70
|
||||
bacrp.exe %1 8 %1 44
|
||||
bacrp.exe %1 8 %1 12
|
||||
bacrp.exe %1 8 %1 98
|
||||
bacrp.exe %1 8 %1 139
|
||||
bacrp.exe %1 8 %1 97
|
||||
bacrp.exe %1 8 %1 96
|
||||
bacrp.exe %1 8 %1 76 0
|
||||
bacrp.exe %1 8 %1 76
|
||||
bacrp.exe %1 8 %1 62
|
||||
bacrp.exe %1 8 %1 107
|
||||
bacrp.exe %1 8 %1 11
|
||||
bacrp.exe %1 8 %1 73
|
||||
bacrp.exe %1 8 %1 30
|
||||
bacrp.exe %1 8 %1 155
|
||||
|
||||
echo Test: Read Optional Properties of Device Object %1
|
||||
bacrp.exe %1 8 %1 58
|
||||
bacrp.exe %1 8 %1 28
|
||||
bacrp.exe %1 8 %1 167
|
||||
bacrp.exe %1 8 %1 122
|
||||
bacrp.exe %1 8 %1 5
|
||||
bacrp.exe %1 8 %1 57
|
||||
bacrp.exe %1 8 %1 56
|
||||
bacrp.exe %1 8 %1 119
|
||||
bacrp.exe %1 8 %1 24
|
||||
bacrp.exe %1 8 %1 10
|
||||
bacrp.exe %1 8 %1 55
|
||||
bacrp.exe %1 8 %1 116
|
||||
bacrp.exe %1 8 %1 64
|
||||
bacrp.exe %1 8 %1 63
|
||||
bacrp.exe %1 8 %1 1
|
||||
bacrp.exe %1 8 %1 154
|
||||
bacrp.exe %1 8 %1 157
|
||||
bacrp.exe %1 8 %1 153
|
||||
bacrp.exe %1 8 %1 152
|
||||
bacrp.exe %1 8 %1 172
|
||||
bacrp.exe %1 8 %1 170
|
||||
bacrp.exe %1 8 %1 169
|
||||
bacrp.exe %1 8 %1 171
|
||||
bacrp.exe %1 8 %1 168
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
#!/bin/bash
|
||||
|
||||
PROG=`basename $0`
|
||||
OPTIONAL=0
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $PROG [OPTIONS] <<BACnetID>> [ <<BACnetID>> ... ]
|
||||
|
||||
Will return Required and Optional property values
|
||||
from the requested device.
|
||||
|
||||
-o Display optional properties [default behavior]
|
||||
-O Supress display of optional properties
|
||||
-h Display this help
|
||||
"
|
||||
}
|
||||
|
||||
while getopts ":oOh" opt; do
|
||||
case $opt in
|
||||
o ) OPTIONAL=1
|
||||
;;
|
||||
O ) OPTIONAL=0
|
||||
;;
|
||||
h ) usage
|
||||
exit 1
|
||||
;;
|
||||
\? ) usage
|
||||
exit 1
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND -1))
|
||||
|
||||
if [ $# -eq 0 ] || [ "$1" = "" ] ; then
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
run_test()
|
||||
{
|
||||
echo -e -e "Test: Read Required Properties of Device Object $1\r"
|
||||
echo -n "OBJECT IDENTIFIER:"
|
||||
./bacrp $1 8 $1 75
|
||||
echo -n "OBJECT NAME:"
|
||||
./bacrp $1 8 $1 77
|
||||
echo -n "OBJECT TYPE:"
|
||||
./bacrp $1 8 $1 79
|
||||
echo -n "SYSTEM STATUS:"
|
||||
./bacrp $1 8 $1 112
|
||||
echo -n "VENDOR NAME:"
|
||||
./bacrp $1 8 $1 121
|
||||
echo -n "VENDOR IDENTIFIER:"
|
||||
./bacrp $1 8 $1 120
|
||||
echo -n "MODEL NAME:"
|
||||
./bacrp $1 8 $1 70
|
||||
echo -n "FIRMWARE REVISION:"
|
||||
./bacrp $1 8 $1 44
|
||||
echo -n "APPLICATION SOFTWARE VERSION:"
|
||||
./bacrp $1 8 $1 12
|
||||
echo -n "PROTOCOL VERSION:"
|
||||
./bacrp $1 8 $1 98
|
||||
echo -n "PROTOCOL REVISION:"
|
||||
./bacrp $1 8 $1 139
|
||||
echo -n "PROTOCOL SERVICES SUPPORTED:"
|
||||
./bacrp $1 8 $1 97
|
||||
echo -n "OBJECT TYPES SUPPORTED:"
|
||||
./bacrp $1 8 $1 96
|
||||
echo -n "OBJECT LIST LENGTH:"
|
||||
./bacrp $1 8 $1 76 0
|
||||
echo -n "OBJECT LIST:"
|
||||
./bacrp $1 8 $1 76
|
||||
echo -n "MAX APDU LENGTH ACCEPTED:"
|
||||
./bacrp $1 8 $1 62
|
||||
echo -n "SEGMENTATION SUPPORTED:"
|
||||
./bacrp $1 8 $1 107
|
||||
echo -n "APDU TIMEOUT:"
|
||||
./bacrp $1 8 $1 11
|
||||
echo -n "NUMGER OF APDU ENTRIES:"
|
||||
./bacrp $1 8 $1 73
|
||||
echo -n "DEVICE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 30
|
||||
echo -n "DATABASE REVISION:"
|
||||
./bacrp $1 8 $1 155
|
||||
if [ $OPTIONAL -eq 1 ] ; then
|
||||
echo -e "Test: Read Optional Properties of Device Object $1\r"
|
||||
echo -n "LOCATION:"
|
||||
./bacrp $1 8 $1 58
|
||||
echo -n "DESCRIPTION:"
|
||||
./bacrp $1 8 $1 28
|
||||
echo -n "MAX SEGMENTS SUPPORTED:"
|
||||
./bacrp $1 8 $1 167
|
||||
echo -n "VT CLASSES SUPPORTED:"
|
||||
./bacrp $1 8 $1 122
|
||||
echo -n "ACTIVE VT SESSIONS:"
|
||||
./bacrp $1 8 $1 5
|
||||
echo -n "LOCAL TIME:"
|
||||
./bacrp $1 8 $1 57
|
||||
echo -n "LOCAL DATE:"
|
||||
./bacrp $1 8 $1 56
|
||||
echo -n "UTC OFFSET:"
|
||||
./bacrp $1 8 $1 119
|
||||
echo -n "DAYLIGHT SAVINGS STATUS:"
|
||||
./bacrp $1 8 $1 24
|
||||
echo -n "APDU SEGMENT TIMEOUT:"
|
||||
./bacrp $1 8 $1 10
|
||||
echo -n "LIST OF SESSION KEYS:"
|
||||
./bacrp $1 8 $1 55
|
||||
echo -n "TIME SYNCHRONIZATION RECIPIENTS:"
|
||||
./bacrp $1 8 $1 116
|
||||
echo -n "MAX MASTER:"
|
||||
./bacrp $1 8 $1 64
|
||||
echo -n "MAX INFO FRAMES:"
|
||||
./bacrp $1 8 $1 63
|
||||
echo -n "ACK REQUIRED:"
|
||||
./bacrp $1 8 $1 1
|
||||
echo -n "CONFIGURATION FILES:"
|
||||
./bacrp $1 8 $1 154
|
||||
echo -n "LAST RESTORE TIME:"
|
||||
./bacrp $1 8 $1 157
|
||||
echo -n "BACKUP FAILURE TIMEOUT:"
|
||||
./bacrp $1 8 $1 153
|
||||
echo -n "ACTIVE COV SUBSCRIPTIONS:"
|
||||
./bacrp $1 8 $1 152
|
||||
echo -n "SLAVE PROXY ENABLE:"
|
||||
./bacrp $1 8 $1 172
|
||||
echo -n "MANUAL SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 170
|
||||
echo -n "AUTO SLAVE DISCOVERY:"
|
||||
./bacrp $1 8 $1 169
|
||||
echo -n "SLAVE ADDRESS BINDING:"
|
||||
./bacrp $1 8 $1 171
|
||||
echo -n "PROFILE NAME:"
|
||||
./bacrp $1 8 $1 168
|
||||
fi
|
||||
echo -e " \r"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
ID=$(( $1 + 0 ))
|
||||
shift
|
||||
if [ $ID -eq 0 ] ; then
|
||||
echo "ERROR: Device ID must be an integer!! [ID=$ID]" >&2
|
||||
fi
|
||||
run_test $ID
|
||||
done
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo Example of parameters for Foreign Device Registration
|
||||
echo This CMD window will use port 47809 to communicate
|
||||
@echo on
|
||||
set BACNET_IP_PORT=47809
|
||||
@echo off
|
||||
echo The BBMD is located at the standard port 47808 and at
|
||||
echo the dotted IP address passed in on the command line.
|
||||
echo When the demo client applications see the BBMD address,
|
||||
echo they register as a Foreign Device to it.
|
||||
@echo on
|
||||
set BACNET_BBMD_PORT=47808
|
||||
set BACNET_BBMD_ADDRESS=%1
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
echo Example of parameters for Foreign Device Registration
|
||||
BACNET_IP_PORT=47809
|
||||
export BACNET_IP_PORT
|
||||
echo This console will use port ${BACNET_IP_PORT} to communicate.
|
||||
echo
|
||||
BACNET_BBMD_PORT=47808
|
||||
export BACNET_BBMD_PORT
|
||||
echo The BBMD is located at the port ${BACNET_BBMD_PORT} and
|
||||
echo is at the dotted IP address passed on the command line.
|
||||
BACNET_BBMD_ADDRESS=${1}
|
||||
export BACNET_BBMD_ADDRESS
|
||||
echo The BBMD IP address is ${BACNET_BBMD_ADDRESS}
|
||||
echo When the demo client applications see the BBMD address,
|
||||
echo they register as a Foreign Device to it.
|
||||
echo
|
||||
echo Launching new shell using the BBMD environment...
|
||||
/bin/bash
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetDoorStatus
|
||||
for door_status in {0..1023}
|
||||
do
|
||||
./bin/bacucov 1 2 30 4 5 231 9 ${door_status}
|
||||
done
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacabort [invoke-id abort-reason server]
|
||||
|
||||
# BACnetErrorCode
|
||||
export error_class=0
|
||||
for error_code in {0..256}
|
||||
do
|
||||
./bin/bacerror ${error_class} ${error_code}
|
||||
done
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetEventState
|
||||
# Event_State (36)
|
||||
for event_state in {0..64}
|
||||
do
|
||||
./bin/bacucov 1 2 0 1 5 36 9 ${event_state}
|
||||
done
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetEventType
|
||||
# PROP_EVENT_TYPE = 37
|
||||
# OBJECT_EVENT_ENROLLMENT = 9
|
||||
# BACNET_APPLICATION_TAG_ENUMERATED = 9
|
||||
for event_type in {0..64}
|
||||
do
|
||||
./bin/bacucov 1 1 9 1 5 37 9 ${event_type}
|
||||
done
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetLockStatus
|
||||
for lock_status in {0..4}
|
||||
do
|
||||
./bin/bacucov 1 2 30 4 5 233 9 ${lock_status}
|
||||
done
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
for object_type in {0..127}
|
||||
do
|
||||
./bin/bacucov 1 2 ${object_type} 4 5 85 0 0
|
||||
done
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetProgramRequest
|
||||
# PROP_PROGRAM_CHANGE = 90
|
||||
# OBJECT_PROGRAM = 16
|
||||
# BACNET_APPLICATION_TAG_ENUMERATED = 9
|
||||
for program_request in {0..16}
|
||||
do
|
||||
./bin/bacucov 1 2 16 1 5 90 9 ${program_request}
|
||||
done
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetProgramState
|
||||
# PROP_PROGRAM_STATE = 92,
|
||||
# OBJECT_PROGRAM = 16
|
||||
# BACNET_APPLICATION_TAG_ENUMERATED = 9
|
||||
for program_state in {0..16}
|
||||
do
|
||||
./bin/bacucov 1 2 16 1 5 92 9 ${program_state}
|
||||
done
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# BACnetPropertyStates
|
||||
#BACnetNotificationParameters ::= CHOICE {
|
||||
#-- These choices have a one-to-one correspondence with the Event_Type
|
||||
#-- enumeration with the exception of the
|
||||
#-- complex-event-type, which is used for proprietary event types.
|
||||
#change-of-state - [1] SEQUENCE {
|
||||
# new-state [0] BACnetPropertyStates,
|
||||
# status-flags [1] BACnetStatusFlags
|
||||
#},
|
||||
for property_states in {0..63}
|
||||
do
|
||||
./bin/bacuevent 1 15 1 0 1 99 1 16 1 ${property_states} 1 0000 "Tribble!" 1 0 0 0
|
||||
done
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
for property_id in {0..512}
|
||||
do
|
||||
./bin/bacrp --dnet 65535 0 8 0 ${property_id}
|
||||
done
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
BACnet Tools are binary demo application command line
|
||||
utilities that use BACnet/IP to perform a variety of
|
||||
BACnet services. Some tools use BACnet WhoIs to bind to
|
||||
devices, but can also use a static binding file address_cache.
|
||||
|
||||
Most of the tools have help (--help option), and use
|
||||
environment variables to configure the datalink.
|
||||
|
||||
The Client Tools use WhoIs to bind to target devices.
|
||||
The WhoIs can be eliminated by using the address_cache
|
||||
file, which is read by each client tool from the current
|
||||
working directory. Having the device address from the
|
||||
address_cache file will greatly improve the throughput
|
||||
and speed of the client tools. The address_cache file
|
||||
can be generated using the standard output of the bacwi tool.
|
||||
|
||||
EXAMPLE:
|
||||
bacwi -1 > address_cache
|
||||
|
||||
Client Tools
|
||||
------------
|
||||
bacarf - 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 Tools
|
||||
------------------
|
||||
mstpcap - a tool that is used for capturing MS/TP traffic
|
||||
from an RS-485 serial adapter and saving the packets
|
||||
in a file for viewing by Wireshark.
|
||||
|
||||
mstpcrc - calculates Header CRC or Data CRC for ascii hex or decimal input.
|
||||
Optionally takes the input and saves it to a PCAP format file for viewing
|
||||
in 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 3000ms.
|
||||
|
||||
BACNET_APDU_RETRIES - indicate the maximum number of times that
|
||||
an APDU shall be retransmitted.
|
||||
|
||||
BACNET_IFACE - set this value to dotted IP address (Windows) of
|
||||
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.
|
||||
|
||||
BACNET_BDT_ADDR_1 - dotted IPv4 address of the BBMD table entry 1..128
|
||||
BACNET_BDT_PORT_1 - UDP port of the BBMD table entry 1..128 (optional)
|
||||
BACNET_BDT_MASK_1 - dotted IPv4 mask of the BBMD table
|
||||
entry 1..128 (optional)
|
||||
|
||||
BACNET_IP_NAT_ADDR - dotted IPv4 address of the public facing router
|
||||
|
||||
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 use BBMD/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
|
||||
-------
|
||||
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 the
|
||||
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
|
||||
-----
|
||||
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 could 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 and makefiles for the bacnet-tools is included in the
|
||||
BACnet Protocol Stack library and can be found at:
|
||||
http://bacnet.sourceforge.net/
|
||||
|
||||
The bacnet-tools source is located in bacnet-stack/demo/project where:
|
||||
bacarf - bacnet-stack/demo/readfile
|
||||
bacawf - bacnet-stack/demo/writefile
|
||||
bacdcc - bacnet-stack/demo/dcc
|
||||
bacepics - bacnet-stack/demo/epics
|
||||
bacrd - bacnet-stack/demo/reinit
|
||||
bacrp - bacnet-stack/demo/readprop
|
||||
bacrpm - bacnet-stack/demo/readpropm
|
||||
bacscov - bacnet-stack/demo/scov
|
||||
bacts - bacnet-stack/demo/timesync
|
||||
bacucov - bacnet-stack/demo/ucov
|
||||
bacupt - bacnet-stack/demo/uptransfer
|
||||
bacwh - bacnet-stack/demo/whohas
|
||||
bacwi - bacnet-stack/demo/whois
|
||||
bacwp - bacnet-stack/demo/writeprop
|
||||
bacserv - bacnet-stack/demo/server
|
||||
etc.
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetReliability
|
||||
# PROP_RELIABILITY = 103,
|
||||
# OBJECT_ANALOG_INPUT = 0
|
||||
# BACNET_APPLICATION_TAG_ENUMERATED = 9
|
||||
for reliability in {0..64}
|
||||
do
|
||||
./bin/bacucov 1 2 0 1 5 103 9 ${reliability}
|
||||
done
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
# bacucov: pid device-id object-type object-instance time-remaining
|
||||
# property tag value [priority] [index]
|
||||
|
||||
# BACnetRestartReason
|
||||
# PROP_LAST_RESTART_REASON = 196
|
||||
# OBJECT_DEVICE = 8
|
||||
# BACNET_APPLICATION_TAG_ENUMERATED = 9
|
||||
for reason in {0..64}
|
||||
do
|
||||
./bin/bacucov 1 1 8 1 5 196 9 ${reason}
|
||||
done
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
export BACNET_APDU_RETRIES=0
|
||||
export BACNET_APDU_TIMEOUT=0
|
||||
|
||||
for units in {0..255}
|
||||
do
|
||||
./bin/bacucov 1 2 3 4 5 117 9 ${units}
|
||||
done
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
for vendor_id in {0..999}
|
||||
do
|
||||
./bin/baciam 4194303 ${vendor_id}
|
||||
done
|
||||
Reference in New Issue
Block a user