Can't access some devices which can be accessed by BACnet Stack
I am facing a strange question. I am trying to use the BACnet4J to access a device with a list of objects such as Analog Input and output. I am able to receive the I-AM message from the device so that I can create RemoteDevice for it. However, I can't access its properties and objects and always get the error message in Wireshark: "Reject-Message-To-Network: Reject reason: 1(The router is not directly connected to DNET and ...)". I can do it using BACnet Stack.
My IP is A.B.73.178. I compared the messages in Wireshark and found that using BACnet Stack, I will firstly receive an I-AM message from a router (A.B.73.240) which is inside my subnet. In this message, the "BACnet Virtual Link Control" part shows that the IP of the actual device I am asking for is "C.D.100.42". If I use BACnet Stack, it will directly send a "read property" message to this IP address and receive the result from it. However, if I use BACnet4J, the program will send a message to my router "A.B.73.240" and then my router will send back that error message I mentioned in the previous paragraph. Is there anything I did wrong which results in this problem? Thank you very much!
Just to add some more information: I can use BACnet4J to access some devices and for these devices, when I receive the I-AM message, it is "Original-Unicast-NPDU" message in the "BACnet Virtual Link Control" part. For the devices which I can't access, the message is "Forwarded-NPDU" and there is an IP address there. I think this might be the reason that I get the error message.
Just found that the latest version of BACnet4J works well for this problem :)
Sorry for spamming!
No worries. Thanks for following up.