-1

I cannot understand the bacnet protocol. I tried to read the official documentation, but I cannot understand the definition of data. The corresponding keyword for the request for the specified service choices cannot be found.

I tried to understand ASN. 1 encoding, but I couldn't match the data very well

  • Can you please give some more information what are you trying to achieve? Any sample code and reference to any document – Gaurav Pathak Mar 27 '23 at 10:18
  • I want to parse the information contained in the BACnet message,Now I only parse the completed frame header,The name of the document is 《A Data Communication Protocol for Building Automation and Control Networks》. – Xiaofei You Mar 28 '23 at 01:41
  • Are you trying to write a BACnet stack from scratch? Please refer https://github.com/bacnet-stack/bacnet-stack. I suggest you to start with an existing proven BACnet stack and customize or add features as per your requirement instead of starting from scratch – Gaurav Pathak Mar 28 '23 at 12:00
  • No, I am currently trying to use npacp to grab the specified BACnet data stream and parse the message. Currently, I am stuck parsing the data.Maybe you misunderstood what I meant – Xiaofei You Mar 29 '23 at 01:20

1 Answers1

0

I'm sure someone might argue against my answer, but I'm going to give you a cheat way of starting with an understanding, with more of an observation approach.

For me personally - having a small amount of understanding (about BACnet), I would argue that if understanding BACnet is like having a black belt in Karate, then (I personally think) that understanding 'ASN' can be like one of the later/progressed Dans in a black belt, i.e. it's probably not best to try to understand ASN straight away as a generic topic/understanding, maybe instead just pick some simple examples.

(For most cases, if you understand some of the basics then it almost comes down in a lot of situations to appreciating the grouping of values, and the basic datatypes of each type of value - a poor-man's explanation/simplified understanding of the specifics of ASN.)

If you really want to dive straight into a better understanding or at least introduction, then consider using, a) 'YABE' with its 'Room Simulator' sample, and b) 'VTS' and/or 'Wireshark' to focus upon the structure of each request & response.

(I.e. Once you get to see what some of the chicken's eggs look like, then you can better appreciate/start to understand the specifics of how it was produced by the chicken. :P)

That just might be the "in"/approach (/angle of attack) that you're looking for. ;)

DennisVM-D2i
  • 416
  • 3
  • 8
  • I understand what you mean. Thank you very much. I will do as you say – Xiaofei You Mar 29 '23 at 01:21
  • @XiaofeiYou Well, if you feel the answer is relevant - to you & potentially others, please do vote for it. – DennisVM-D2i Mar 29 '23 at 22:06
  • @XiaofeiYou Thanks for the vote. As much as it's nice for me personally to see my efforts appreciated, it also helps the community/all others to find relevant & trustworthy content easier, by seeing at least one person (if not many) have confirmed the validity/usefulness of the content/answer. ;) – DennisVM-D2i Apr 05 '23 at 07:57