Hi,
I'm working on framework integration on a Qt Project that runs on a Windows PC. All works fine if I have only one network enabled on my PC but when I enable the WiFi network I Cannot communicate with the BACNet devise that is connected on the ethernet cabled network.
More details:
1) BACNet device is 192.168.1.111
2) PC LAN is 192.168.1.50
3) PC WiFi is 10.10.30.192
Using bacwi.exe with WiFi network enabled after a while returns 0 total devices, but if i disconnect the WiFi Network returns 1 Total Devices with istance, MAC, etc
The same with every BACNet command of the Tools package and obviously of the framework.
We need to have 2 network, please help me!
Thanks
Luca Leoncavallo
Anonymous
The correct solution to handle BACnet broadcasts across different subnets is to use BVLC (BACnet Virtual Link Control) where the client applications use BACnet Foreign Device Registration, and some application (probably the server) runs a BBMD (BACnet Broadcast Management Device).
As an example, the demo/server (bacserv) application is configured as a BBMD, and the client demo applications (i.e. bacwi, bacrp, bacwp, etc) are configured to use environment variables to establish a BBMD connection as a foreign device.
For the client demo applications, set the BACNET_BBMD_PORT and BACNET_BBMD_ADDRESS of the BBMD, and use a non-standard (i.e. not 47808) BACNET_IP_PORT value. There are helper scripts /bin/bvlc.sh or bin/bvlc.bat to assist setting up the demo client applications to communicate with a BBMD at UDP port 47808.
Hi,
On Windows it's not clear how broadcast messages are sent when a socket is open without specifying the interface on which it as to be associated.
So when only one interface is on it's not a problem. When multiple are present you have to specify or windows gets (certainly) the first one.
Look at bip_init function. This function is called with the env param BACNET_IFACE or with nothing if it is not set.
So bip_int should be called with "192.168.1.50" param in your case.
Bye.
Hi,
Thank you so much for your support.
It seem that Qt does not manage correctly ENV Variables. I set BACNET_IFACE and the compiled tools works well but my Qt application does not work.
I've done a little modification to bip_init to force the IP Address and now everything works fine.
Luca