2.7 How to install BACnet

wget http://dragino.vicp.io:6080/bacnet/dragino-bacnet-apps-hp0c-2023-03-01.deb
dpkg -i dragino-bacnet-apps-hp0c-2023-03-01.deb

image-20230327152105-1.png

2.7.1 Configure BACnet

After BACnet is installed, run commands to modify BACnet configurations

Note: device_port and bacnet_ip_port are not set to the same

nano /etc/config/bacnet

Examples:

config settings 'general'
    option bacnet_ip '10.130.2.80'                     #The IP address of the BACnetIP network, here basically the same IP as the bbmd address below
    option bacnet_ip_port '47808'                     #As with bbmd_port, the purpose of this is to register a Bacnet Server application as a bbmd registration server
    option bbmd_address '10.130.2.80'             #bbmd is the BACnet registration server. Only one bbmd server is required in the same ip network
    option bbmd_port '47808'                           #In general, 47808 is used as the default port
    option bacnet_dev_count '2'                        #Here is the number of BACnet devices that need to be simulated, if the number is 2, then the following settings must have 2, which are bacdev_1, bacdev_2

config settings 'bacdev_1'
    option device_name 'LHT65N-1'                  #The identification name of the bacnet device
    option device_id '10001'                               #The unique identification code in the same network segment of BACnet,Scope is(1 - 4194302)
    option device_port '47912'                           #The IP port occupied by Bacnet when it starts, Scope is (1024 - 65535)

config settings 'bacdev_2'
    option device_name 'LHT65N-2'         
    option device_id '10002'           
    option device_port '47913'   

2.7.2 Run BACnet

After the configuration is complete, run the following command to start BACnet, The following are two ways to run BACnet:

(1) With /etc/config/bacnet configuration, and to run the registration server on the current machine, start it with the following command (configure the /etc/config/bacnet file correctly):

bacserver  -c -s

(2) Without /etc/config/bacnet, and to run the registration server on the current machine, start it with the following command:

bacserver -s -a 10.130.2.80 -p 47808 

This command simulates two devices, with device IDs 47910 and 47911

Enter bacserver -h to output help

bacserver -h 

image-20230327154700-3.png

2.7.3 Read devices and modify devices

Enter baccli -h to output help

baccli -h 

image-20230327165836-1.png

Examples:

(1) List the current Bacnet devices:

baccli -l -a

image-20230327174537-3.png

(2) List device information based on device ID:

baccli -l -i id

image-20230327174556-4.png

(3) List the device details by device ID:

baccli -l -v -i id

(4) Modify the specified attribute value based on the device ID:

baccli -i id -p prop -w value

image-20230327174853-5.png

The user can check the data of the device by using the yabe BACnet tool

image-20230327171824-2.png

 

Tags:
    
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0