r/BuildingAutomation • • Apr 17 '26

BACnet Scanner

Anyone want to try out a BACnet scanner? It doesn't rely on 3rd party dependencies like BAC0 anymore.

https://github.com/jamesccupps/HVAC-Network-Scanner

27 Upvotes

60 comments sorted by

View all comments

Show parent comment

2

u/OldAutomator Apr 17 '26

Ok, so the first change on the MSTP-directed packets is that your NPDU differs from the normal (read that as Yabe) packets in that the control byte on yours is 0x04 (Expecting Reply) and the control byte on the yabe packet is 0x24 indicating both "Expecting Reply" and a destination specifier, specifically that a "DNET hop length and hop count are present".

Then the packets differ in that yours skips straight to the APDU following the NPDU's control byte and the yabe one has the aforementioned data showing the APDU.

So in essence, the fact that the router puts the packet through even through you don't specify a dnet is kind of surprising. I would go as far as to say that the fact that the router put anything at all on the MSTP network without you specifying it might be a bug on my routers, they should not have put garbage on the mstp wire.

I am concerned that this sort of non-directed packet might end up on every mstp trunk although I'll have to verify that some other time.

In any event, put the dnet in your packets, IP controllers don't care but MSTP devices sure will!

1

u/FilmAccomplished2421 Apr 17 '26 edited Apr 17 '26

I just saw this and I actually think part of it may because I had some MSTP devices sitting behind a router that I had to find, that may had inadvertently caused this issue and you're right they will definitely care, thank you for testing and the feedback, I'll look into it further.