Skip to main content

reComputer R1000 use bacnet MS/TP

Introduction

BACnet MS/TP (Master-Slave/Token Passing) is a communication protocol for building automation and control networks. It is part of the BACnet (Building Automation and Control Networks) protocol suite. MS/TP usually uses the RS-485 physical layer and bus topology. All devices are connected to the same twisted pair cable. There are master stations and slave stations in the MS/TP network. The master is responsible for generating and delivering the token, while the slave only responds when a request is received. The master device determines which device can send data by passing the token. The token passing mechanism ensures that communication on the bus is orderly and conflict-free

This article mainly introduces how to perform functional testing of bacnet MS/TP protocol on reComputer R1000.We simulated a bacnet MS/TP server on reComputer R1000, and then used YABE on the W10 PC to check whether the device is present. If the device we simulated can be found normally, it means that the bacnet MS/TP communication is normal.

Getting Start

Before you start this project, you may need to prepare your hardware and software in advance as described here.

Hardware Preparation

reComputer R1000

Software

  • Since bacnet MS/TP uses the RS485 physical layer, you can refer to this wiki on how to use the RS485 function on reComputer R1000 normally.
  • We simulate a server with the help of the bacnet-stack library application, so you need to enter the following command to download it:
    git clone https://github.com/bacnet-stack/bacnet-stack.git
    cd bacnet-stack
  • Please go to this link and download YABE (Yet Another BACnet Explorer).
  • Please go to this link and download wireshark.

Hardware Configuration

This test uses an RS485 to USB module to connect reComputer R1000 and W10 PC.

pir

Steps to test bacnet mstp communication function

Step 1: Download bacnet-stack.

Step 2: The default serial port number of bacnet-stack is /dev/ttyUSB0. If the port number you actually use is not it, communication will not be possible, so you need to modify the port number. The file name that needs to be modified is ports/ linux/rs485.c. Change this to the port number you need to use. I changed it to /dev/ttyAMA30.

Step 3: Enter the following instructions to compile. The compilation results can be seen in the bin directory.

make clean
make mstp
# wait
cd bin/

Step 4: Run bacserv and use YABE to search for simulated devices.You can see that the device we simulated was successfully searched.

Step 5: Use wireshark to view bacnet MS/TP messages.You can see that the device we simulated passes the token. Since there are no other devices on my bus, it keeps passing the token.

Tech Support & Product Discussion

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...