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!