Open xkostrna opened 1 month ago
While the application at 192.168.251.5
is down the operating system is sending back the ICMP error, there is no application listening on the port. When it is restarted it responds correctly again, but for some reason 192.168.251.3
isn't processing it. Please run...
py -m bacpypes3 --address 192.168.251.3 --debug bacpypes3.ipv4
and see if you are getting something like this when the I-Am comes back...
DEBUG:bacpypes3.ipv4.IPv4DatagramProtocol:datagram_received b'\x81...
Which should be followed by something like this...
DEBUG:bacpypes3.ipv4.IPv4DatagramServer:confirmation <bacpypes3.pdu.PDU object at 0x79c5075edcf0>
<bacpypes3.pdu.PDU object at 0x79c5075edcf0>
pduSource = <IPv4Address 192.168.251.5>
pduDestination = <IPv4Address 192.168.251.3>
pduExpectingReply = False
...
If the application is not getting PDU then it's not a BACpypes problem, but if it is and you're still getting no response, there's something else going on.
p.s.- when you say "...restart the BACnet connection..." there is no connection in BACnet
Sorry for late response.
Thanks for suggestion, I've run bacpypes3 as you suggested with argument --debug
. Output of the --debug
is working as you stated, I'm able to see PDU objects in both situations. Most important thing is that we figured out the behavior changes when I set my NetworkCategory to Private in Windows.
I run this cmd:
py -m bacpypes3 --address 192.168.251.3
I send Who-Is
to the device on address 192.168.251.5 which is responding normally like this:
> whois 192.168.251.5
5 192.168.251.5
Now I restart the device so it doesn't respond which is OK and after restarting it responses again:
> whois 192.168.251.5
No response(s)
---After while----
> whois 192.168.251.5
5 192.168.251.5
I set the NetworkCategory to private using this command:
Get-NetConnectionProfile -InterfaceAlias 'Ethernet 6' | Set-NetConnectionProfile -NetworkCategory Private
I run this cmd:
py -m bacpypes3 --address 192.168.251.3
I send Who-Is
to the device on address 192.168.251.5 which is responding normally like this:
> whois 192.168.251.5
5 192.168.251.5
Now I restart the device so it doesn't respond which is OK and after restarting i still can't see response in console however in Wireshark yes:
> whois 192.168.251.5
No response(s)
---After while----
> whois 192.168.251.5
No response(s) (even when Wireshark sees actual response)
I have to exit and re-run bacpypes3 to see actual response.
The problem
After restarting bacnet device we no longer recieve response to the Who-Is service.
Use-Case
py -m bacpypes3 --address 192.168.251.3
> whois 192.168.251.5
5 192.168.251.5
No response(s)
No response(s)
We are tracking everything with a Wireshark so we see when the device successfully connects to the bacnet. We also see the request and responses between our stack and the device. Everything works fine until we restart the bacnet on the target device. Then we can only see the
No response(s)
even when in the Wireshark everything seems fine.Evidence: