Skip to content
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

I wrote a program with bacnet4j. The jar package of the window platform can be scanned to the device when running. The device cannot be scanned on Linux Centos. They are all in the same network segment #79

Open
youngKizZz opened this issue Feb 10, 2023 · 7 comments

Comments

@youngKizZz
Copy link

No description provided.

@terrypacker
Copy link

It would be helpful if you provide more specific information. However I would guess that the "scan" you are talking about is the Discovery process. This uses UDP broadcast packets, Windows and Linux handle these differently. In linux if you don't bind to 0.0.0.0 you won't receive these messages.

@wangdong-ivymobile
Copy link

hi @terrypacker , we met the same issue. Regarding how windows and linux handles broadcast differently, could you point us to a reference? We have spent countless hours trying to figure out this issue.
Do you know how to properly set up bacnet4j so it can seamlessly work on both windows and linux?
Thanks.

@abbottyf
Copy link

this is important In linux if you don't bind to 0.0.0.0 you won't receive these messages. First of all, you judge whether you are in the same network segment. You can only scan the device in the same network segment. If you are not in the same network segment, you can only cross network segments. Specify object-type and ins to obtain data. Hope it helps you

@terrypacker
Copy link

@wangdong-ivymobile, @abbottyf if correct. Here is an old issue for the same problem:

#53

@wangdong-ivymobile
Copy link

@terrypacker @abbottyf thanks for the explanation.
I was really surprised by the behavior. Can we detect this problem and handle it in the library? Is there a better way other than binding to 0.0.0.0.
For example, I found some bacnet device broadcast to 255.255.255.255, some to 192.168.2.255(assuming 192.168.0.1/24), if we explicitly listen to broadcast channels, should we listen to both?

@terrypacker
Copy link

I had played around with this a little some time ago and wrote this test:

https://github.com/MangoAutomation/BACnet4J/blob/master/src/test/java/com/serotonin/bacnet4j/adhoc/MultipleLocalDevices.java

@qinyi8888
Copy link

  1. Bind the ip address to: "0.0.0.0"
  2. check the network settings, see if the network PREFIX, NETMASK of linux system and Windows computer are the same.
  3. check if linux system firewall setting is normal, open udp port. You can try to close the firewall to try.
    Hope it can help you.
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants