Errors when attempting to read
-
If the app had actually received the response and for some reason misinterpreted it, you would see an exception like, "No waiting recipient for message: peer=...". Were there other messages, or just the timeouts?
-
Just the timeout. If you look at the packets in wireshark, bacnet4j sends the request 3 times and gets a reply back each time. For some reason it is refusing to read the awk packet. The packet bacnet4j is sending is identical to the one bacbeat sends out. However, bacbeat recognizes the awk packet and displays the value, while bacnet4j does not, so it shouldn't be a hardware problem.
The code running those 2 methods are here:
InetAddress deviceIP = InetAddress.getByName("192.168.16.3"); WriteProperty(deviceIP,47808,3331779,2,1,(float)3.3); String result = ReadProperty(deviceIP,47808,3331779,2,1);
-
Do you know how to add System.out statements to the code and build the jar? It seems as if BACnet4J isn't getting the response at all, since any other possibility should cause an exception to be thrown.
If so, add the following line in IpMessageControl at line 424:
try { socket.receive(p); System.out.println("Received a packet!"); // ADD THIS LINE incomingExecutorService.execute(new IncomingMessageExecutor(p)); p.setData(buffer); }
If the packet is being received, then we can go down the BACnet4J road. If not, there must be something else preventing its proper routing.
-
Added the line, and complied.
When running the line, nothing changed (did not display the "packet received message").
The question is however, why is bacbeat able to receive the packet while bacnet4j is not?
I have a few computers here, do you think I should try executing on another one?
-
The question is however, why is bacbeat able to receive the packet while bacnet4j is not?
running as root vs. usual user?
windows firewall?
port in use by other program? -
@craig said:
The question is however, why is bacbeat able to receive the packet while bacnet4j is not?
running as root vs. usual user?
windows firewall?
port in use by other program?- Running as administrator (windows)
-I'll shut off windows firewall and test that theory in a bit, though it was working last week with windows firewall on. - Happens directly after a fresh bootup. Before, when my program didn't exit properly I had to restart it to get it working again (thus the port was in use). On a fresh bootup however, I have doubts the bacnet port (47808) would be in use. I will however try to test for this.
Thanks for the tips :)
- Running as administrator (windows)
-
I'm also having the same error "Timeout while waiting for response for id 0 " as Randy.
I'm getting it with the following code: localDevice.getExtendedDeviceInformation(remoteDevice);
I looked at the wireshark and Bacnet4J is sending the readProperty request for property protocol-services-supported 3 times
and my device is answering everytime. I can see the data sent back but Bacnet4J can't seem to catch it.What is weird is that my code was working 1 year ago and tried it again this week and I get this.
Anyone found the reason for that problem or a workaround?
I suspect that something changed in our bacnet network but I don't know what to look for...
thanks!
Eric
-
@Randy hello,Randi, How did you solve the problem of InvocationTargetException,now I am also facing the same problem
-
@BigKING please create a new thread and reference this one. This one was solved over twelve years ago!
Fox