-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response to WhoIs on Linux #88
Comments
Hi @moebassist, I don't know how familiar you are with BACnet and/or this library, so just a couple of basic info/questions first:
|
Hi @gralin , Thanks for the response! I have an entire HMI application running on .Net 4.7.1 via Mono. It reads data from many Modbus RTU serial devices and acts as a data gateway, publishing the serial data to ModbusTCP and BACnet. The code uses WinForms to run on Linux, hence .Net 4.7.1. I'm just confirming that I have been sending 'WhoIs' requests from YABE, using 'iptraf' on the Linux PC I see: UDP (46 bytes) from 192.168.1.76:63630 (my development PC - I'm not sure why the YABE connection uses this port) to 192.168.1.255:47808 (My Linux PC and the port I've started the server on). As a work around, I'm sending an 'IAm' every 30 seconds from my BACnet server - but it defeats the point of browsing :) Ant. |
It IS to do with broadcast, and nothing to do with machine configuration. Looking at
At the end of this function For my fix, I've revised the constructor to include the broadcast endpoint and store it in a private variable in the same manner as the IP address:
And changed
to
This means The source mentions this too:
My application changes the OS IP/Subnet (via an 'options' dialogue) - I don't have to get it from the OS - therefore I wrote a helper function to calculate broadcast address from IP/subnet strings:
.....Now it works on Linux. It's not a fix for everyone. |
@moebassist Great, thanks a lot. Your solution worked perfectly for me. |
Are you experiencing memory leak as per #89 ? |
In addition to the above, the
|
Windows forwards packets sent to broadcast address to all the addresses bound within the subnet.
This is highly OS dependent. As stated before, Windows will forward these, thus, you will receive all the broadcasts twice on Windows systems. I fixed this some days ago. Will send a PR as soon as I can. |
Hi,
I'm running V2.0.4 on Ubuntu via Mono. If I connect YABE to my PC's ethernet adaptor and the launch my BACnet server app (running on a separate PC Ubuntu 18), everything works well because right after starting the server, an 'Iam(Storage.Deviceid) is executed.
However, when the BACnet server app is running before YABE, it fails to detect a 'Send WhoIs'. I've reviewed incoming packets on the Ubuntu machine and I can confirm the Ethernet adaptor is receiving the broadcast traffic via 192.168.1.255 so there's no firewall/routine issues.
I've added debug code to the 'OnWhoIs' handler which is correctly subscribed to the server (BacNetClient.OnWhoIs += xxxx) that should output 'Who Is' to the console - it never appears, so my guess is the event isn't executing.
Any thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: