Search code examples
pythonbacnet

Yabe detects BACnet device but BAC0.connect does not


I am trying to connect to my BACnet device using BAC0. Yabe is able to detect the BACnet device. However when I try to connect to the device via BAC0.connect(network IP) followed by BAC0.device(device IP and other parameters) I get the error msg - IP address provided is invalid. Check if another software is using port 47808. When I run the command the Wireshark trace shows BACnet APDU protocol being used with appropriate Confirmed-REQ and Complex-ACK msg between the local-network-IP and device-IP, suggesting that the device was polled. However the Wireshark trace shows up after the command terminates with the error message. Could it be that the command terminates prematurely? If so, how to handle it?


Solution

  • Figured it out. The IP address was correct. But there was another software that starts automatically and runs in the background. It also uses BACNet. As a result the port 47808 was getting used by this software. Wireshark was capturing the communication to the device via this software, since the software has a discovery tool for BACnet devices. BAC0.connect works now.