Sample Bacnet Messages Via Arcnet and Point-To-Point (Rs-232)
Sample Bacnet Messages Via Arcnet and Point-To-Point (Rs-232)
This document shows examples of BACnet messages as they might appear on an ARCNET or BACnet
Point-to-Point (PTP) link. The examples describe the derivation of the encoded values from the service
definitions and encoding rules contained in ANSI/ASHRAE 135-1995, the BACnet standard (referred to
herein as BACnet or ANSI BACnet.)
References to page numbers and to numbered clauses are to the BACnet standard.
SEQUENCE {}
means that one of each item in the bracketed construct is included, unless it is marked with the
keyword OPTIONAL, in which case it may or may not be included.
SEQUENCE OF item
means a list of zero or more items. The item may be another ASN.1 definition, or it may be a
SEQUENCE {}. Note the difference between the one-shot SEQUENCE and the list defined by
SEQUENCE OF.
CHOICE {}
means a selection of one item of the bracketed construct is included.
BACnet Samples - 2
[n]
A number in square brackets denotes a context tag, which will generally appear in the encoding
(the exception being tags defined in the APDU header productions)
ABSTRACT-SYNTAX.&Type
Indicates that a CHOICE of any tagged datatype is legal.
Attempts to implement a requester as the master of a master/slave pair will not be successful unless the
above concerns are addressed. In particular, implementations must be prepared to receive various
broadcast messages from time to time. For example, the Tracer Summit Workstation will broadcast
Who-Is messages on a periodic basis. Summit BCUs may issue such messages as well.
To establish a PTP connection with the BCU, a PTP REQUESTER sends "BACnet"<CR>
0x42
0x41
0x43
0x6E
0x65
0x74
0x0D
0x55 Preamble
0xFF
0x0C Frame Type 12: Connect Request
0x00 Length = 0
0x00
BACnet Samples - 3
0x55 Preamble
0xFF
0x0D Frame Type 13: Connect Response
0x00 Length = 0
0x00
0xDC Header CRC
0x55 Preamble
0xFF
0x01 Frame Type 1: Heartbeat XON
0x00 Length = 0
0x00
0x76 Header CRC
0x55 Preamble
0xFF
0x01 Frame Type 1: Heartbeat XON
0x00 Length = 0
0x00
0x76 Header CRC
If The BCU does not transmit any other frames for 15 seconds, it will send a Heartbeat frame. Requester
implementations should be prepared to receive Heartbeat frames at any time.
The PTP REQUESTER sends I-Am-Router-To-Network (required by BACnet, but optional as far as the
BCU is concerned.) This message is described in clauses 6.4.2, 6.6.3.3, and 6.7. The network layer
header is described in clause 6.2.
Note: the correct contents of the network header for this message are currently under discussion. The
issue is whether or not a DNET and DADR (and possible SNET and SADR) should be present.
Implementations should be prepared for all combinations of network header.
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 9
0x09
0xDA header CRC
NPDU follows
0x01 Network version 1
0x88 Network control octet
Bit7 =1 "network message"
Bit6 =0 not used
Bit5 =0 DNET absent
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
Bit1,0 = 00 normal priority
BACnet Samples - 4
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0xBB Header CRC
4.1 Who-Is
The Who-Is and I-Am services are described in clause 16.9. The ASN.1 definition of these services is in
clause 21. These are Unconfirmed services. On page 348, BACnet-Unconfirmed-Request-PDU is
defined to be a service-choice followed by a service-request. The comment states that tags are not used
in the header encoding. Header encoding for BACnet-Unconfirmed-Request-PDU is shown in clause
20.1.3.3.
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 12
0x0C
0x41 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
Bit1,0 = 00 normal priority
0xFF DNET 0xFFFF (broadcast)
0xFF
0x00 DLEN 0 (denotes broadcast)
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x10 APDU type 1: Unconfirmed Request (with DLE escape)
0x90
0x08 Service Choice 8: Who Is
No Tagged Service parameters for this example
0xE2 Data CRC
0x56
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
4.2 I-Am
When the BCU receives a Who-Is whose device instance range limits include the BCU's Device Identifier,
or a Who-Is which does not contain device instance range limits, the BCU will respond by broadcasting an
I-Am.
The I-Am service is described in clause 16.9. The ASN.1 definition is in clause 21. This is an
Unconfirmed service. On page 348, BACnet-Unconfirmed-Request-PDU is defined to be a
service-choice followed by a service-request. The comment states that tags are not used in the header
encoding. Header encoding for BACnet-Unconfirmed-Request-PDU is shown in clause 20.1.3.3.
Note that the network header for both ARCNET and PTP specifies a global broadcast destination.
BACnet Samples - 7
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 24
0x18
0xD5 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
Bit1,0 = 00 normal priority
0xFF DNET 0xFFFF (broadcast)
0xFF
0x00 DLEN 0 (denotes broadcast)
0x00 SNET 0x0001
0x01
0x01 Source address length 1 octet
0x01 SADR 0x01
0xFF Hop Count 255
APDU follows
0x10 APDU type Unconfirmed Request (with DLE escape)
0x90
0x00 Service Choice 0: I Am
Tagged Service parameters follow
0xC4 Application Tag 12 (Object Identifier), length 4
0x02 Object type 8 (Device), Object Instance 1
0x00
0x00
0x01
0x22 Application Tag 2 (Unsigned Integer), length 2
0x01 Maximum APDU size: 480
0xE0
0x91 Application Tag 9 (Enumerated), length 1
0x00 segmentation: segmented-both
0x21 Application Tag 2 (Unsigned Integer), length 1
0x02 value 2 = vendorID Trane
0xCB Data CRC
0x1A
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack XON
0x00 Length = 0
0x00
0xBB Header CRC
BACnet Samples - 8
segmented-message
BOOLEAN, TRUE if this is a segmented message, FALSE otherwise. FALSE in this example.
more-follows
BOOLEAN, TRUE if this is a segmented message, and this is not the final segment. FALSE
otherwise. FALSE in this example.
segmented-message-accepted
BOOLEAN, TRUE if the requester will accept a segmented BACnet-Complex-ACK-PDU as a
response, FALSE otherwise. TRUE in this example.
maximum-APDU-size-accepted
Specifies the maximum size of a single PDU or PDU segment. In this example, an enumerated
value of 3, denoting a maximum of 480 octets. This is the maximum value allowed for BACnet
PDUs on ARCNET and PTP, and is the maximum value accepted by the BCU.
invokeID
"Serial number" used by the requester to associate the response with the request. All segments
of a segmented request must have the same invokeID. The invokeID should be incremented for
each new BACnet-Confirmed-Request-PDU. This facilitates debugging, as it allows responses
to be correlated with the requests which caused them. The invokeID will increment in each
example which follows.
sequence-number
Identifies the segments of a segmented BACnet-Confirmed-Request-PDU. Not present in
un-segmented requests, such as this example.
proposed-window-size
Specifies the maximum segmentation window size acceptable to a requester sending a
segmented BACnet-Confirmed-Request-PDU. Not present in un-segmented requests, such as
this example.
service-choice
The service-choice is defined to be of type BACnetConfirmedServiceChoice, which is defined on
page 350 as an enumeration. The value for readProperty is 12 decimal.
service-request
The service-request is defined to be of type BACnet-Confirmed-Service-Request, which is defined
on page 351. The CHOICE for readProperty is the production ReadProperty-Request, which is
defined on page 355 as a SEQUENCE consisting of "objectIdentifier", tagged with context tag 0
and of type BACnetObjectIdentifier; "propertyIdentifier", tagged with context tag 1 and of type
BACnetPropertyIdentifier; and "propertyArrayIndex", an OPTIONAL unsigned integer tagged with
context tag 2. Since the present-value of an Analog Input Object is not an array, the index will
not be present in this example.
BACnet Samples - 10
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 23
0x16
0x2E Header CRC
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
0x00 Invoke ID 0
0x0C Service Choice 12: Read Property
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x00 Data: Object type 0 (Analog Input), Object Instance 1
0x00
0x00
0x01
0x19 Context Tag 1, length 1: BACnetPropertyIdentifier
0x55 Data: Property 85: present-value
0xD8 Data CRC (second octet is 0x13 with DLE escape)
0x10
0x93
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0xBB Header CRC
Since the response includes data, it must be returned as a BACnet-ComplexACK-PDU. On page 349,
BACnet-ComplexACK-PDU is defined to be a SEQUENCE of items. The comment states that tags are
not used in the header encoding.
Header encoding for BACnet-ComplexACK-PDU is shown in clause 20.1.5. Values may be determined
as follows:
BACnet Samples - 12
segmented-message
BOOLEAN, TRUE if this is a segmented response, FALSE otherwise. FALSE in this example.
more-follows
BOOLEAN, TRUE if this is a segmented response, and this is not the final segment. FALSE
otherwise. FALSE in this example.
original-invokeID
Will contain the invokeID of the BACnet-Confirmed-Request-PDU which is being responded to.
sequence-number
Identifies the segments of a segmented BACnet-Confirmed-Request-PDU. Not present in
un-segmented requests, such as this example.
proposed-window-size
Specifies the maximum segmentation window size acceptable to a responder sending a
segmented BACnet-ComplexACK-PDU. Not present in un-segmented ComplexACKs, such as
this example.
service-ACK-choice
The service-ACK-choice is defined to be of type BACnetConfirmedServiceChoice, which is
defined on page 350 as an enumeration. The value for readProperty is 12 decimal.
service-ACK
The service-ACK is defined to be of type BACnet-Confirmed-Service-ACK, which is defined on
page 351. The CHOICE for readProperty is the production ReadProperty-ACK.
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 28.
0x1C
0xB0 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
BACnet Samples - 13
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
service-choice
The service-choice is defined to be of type BACnetConfirmedServiceChoice, which is defined on
page 350 as an enumeration. The value for readPropertyMultiple is 14 decimal.
service-request
The service-request is defined to be of type BACnet-Confirmed-Service-Request, which is defined
on page 351. The CHOICE for readPropertyMultiple is the production
ReadPropertyMultiple-Request, which is defined on page 356 as a SEQUENCE consisting of a
SEQUENCE OF ReadAccessSpecifications.
BACnet Samples - 15
In this example, the request contains a single ReadAccessSpecification, which in turn specifies a single
BACnetPropertyReference for the property to be read.
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 24
0x18
0x4D Header CRC
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
0x02 Invoke ID 2
0x0E Service Choice 14: Read Property Multiple
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x00 Object type 0 (Analog Input), Object Instance 1
0x00
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyReference
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
BACnet Samples - 16
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
Since the response includes data, it must be returned as a BACnet-ComplexACK-PDU. On page 349,
BACnet-ComplexACK-PDU is defined to be a SEQUENCE of items. The comment states that tags are
not used in the header encoding.
Header encoding is as for the example of 5.2 except for service-ACK-choice and service-ACK:
service-ACK-choice
The service-ACK-choice is defined to be of type BACnetConfirmedServiceChoice, which is
defined on page 350 as an enumeration. The value for readPropertyMultiple is 14 decimal.
service-ACK
The service-ACK is defined to be of type BACnet-Confirmed-Service-ACK, which is defined on
page 351. The CHOICE for readPropertyMultiple is the production ReadPropertyMultiple-ACK,
which is defined on page 356 as a SEQUENCE OF ReadAccessResults.
Each element of the listOfResults SEQUENCE OF consists of a "propertyIdentifier", tagged with context
tag 2 and of type BACnetPropertyIdentifier; a "propertyArrayIndex", an OPTIONAL unsigned integer
tagged with context tag 3; and a CHOICE of either "propertyValue" tagged with context tag 4 and of type
ABSTRACT-SYNTAX.&Type, or propertyAccessError, tagged with context tag 5 and of type Error.
In this example, the response contains a single ReadAccessResult, which specifies a single element
listOfResults.
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 30
0x1E
0xD7 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
BACnet Samples - 18
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0x23 Header CRC
Note that the response in this example was conveyed in a Data 1 frame. Examples in this document
should not be assumed to be consecutive. Note that transmit and receive sequence numbers (Data 0
versus Data 1) are independent. They must be processed as described in clause 10. Both sequence
numbers must be reset to zero whenever a connection is made.
BACnet Samples - 19
In this case, the request contains a single ReadAccessSpecification, which specifies a SEQUENCE OF
(list of) three BACnetPropertyReferences, one for each of the three properties to be read.
The encoding is as described in the previous example, except that the SEQUENCE OF
BACnetPropertyReference contains three elements between its opening and closing tags.
BACnet Samples - 20
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 28
0x1C
0x28 Header CRC
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
0x02 Invoke ID 2
0x0E Service Choice 14: Read Property Multiple
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x00 Object type 0 (Analog Input), Object Instance 1
0x00
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyReference
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x55 Property 85: present-value
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x6F Property 111: status-flags
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x75 Property 117: units
0x1F Context Tag 1, closing tag
0xC8 Data CRC
0xDC
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
BACnet Samples - 21
0x00 Length = 0
0x00
0x23 Header CRC
In this case, the response contains a single ReadAccessResult, which specifies a SEQUENCE OF (list of)
three SEQUENCE, one for each of the three properties to be returned.
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 43
0x2B
0x5C Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
Bit1,0 = 00 normal priority
0x00 DNET 0x0002
0x02
0x01 Destination address length 1 octet
0x15 DADR 0x15
0x00 SNET 0x0001
0x01
0x01 Source address length 1 octet
0x01 SADR 0x01
0xFF Hop Count 255
APDU follows
0x30 APDU type 3: Complex ACK
0x02 Invoke ID 2
0x0E Service Choice 14: Read Property Multiple ACK
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x00 Data: Object type 0 (Analog Input), Object Instance 1
0x00
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF SEQUENCE
0x29 Context Tag 2, length 1: BACnetPropertyIdentifier
0x55 Data: Property 85: present-value
0x4E Context Tag 4, opening tag: ABSTRACT-SYNTAX.&Type
0x44 Application Tag 4 (Real), length 4
0x42 Data: value = 46.4
0x39
0x99
0x9A
0x4F Context Tag 4, closing tag
0x29 Context Tag 2, length 1: BACnetPropertyIdentifier
0x6F Data: Property 111: status-flags
BACnet Samples - 22
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyReference
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x55 Property 85: present-value
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x6F Property 111: status-flags
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x75 Property 117: units
0x1F Context Tag 1, closing tag
In this case, the response contains a single ReadAccessResult, which specifies a SEQUENCE OF (list of)
three SEQUENCE, one for each of the three properties to be returned.
In this case, the request contains two ReadAccessSpecifications, one for each object. Each
ReadAccessSpecification specifies a SEQUENCE OF (list of) one BACnetPropertyReference.
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 33
0x21
0xC2 Header CRC
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
BACnet Samples - 25
0x06 Invoke ID 6
0x0E Service Choice 14: Read Property Multiple
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x00 Data: Object type 3 (Binary Input), Object Instance 1
0xC0
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyReference
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x55 Data: Property 85: present-value
0x1F Context Tag 1, closing tag
0x0C Context Tag 0, length 4: Object Identifier
0x00 Data: Object type 0 (Analog Input), Object Instance 1
0x00
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyReference
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x55 Data: Property 85: present-value
0x1F Context Tag 1, closing tag
0x98 Data CRC
0x16
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0xBB Header CRC
The response contains two ReadAccessResults, each of which specifies a SEQUENCE OF (list of) one
property value.
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 43
0x2B
0x5C Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =0 SNET not present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0002
0x02
BACnet Samples - 26
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
BACnet Samples - 27
The response contains two ReadAccessResults, each of which specifies a SEQUENCE OF (list of) one
property.
In this example, the value to written will be "inactive" (0), and the priority will be 7 (shown in Table 19-1 as
available for general use).
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 28
0x1C
0xB0 Header CRC
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
BACnet Samples - 30
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
0x05 Invoke ID 5
0x0F Service Choice 15: Write Property
Tagged Service parameters follow
0x0C Context Tag 0, length 4: Object Identifier
0x01 Data: Object type 4 (Binary Output), Object Instance 1
0x00
0x00
0x01
0x19 Context Tag 1, length 1: BACnetPropertyIdentifier
0x55 Data: Property 85: present-value
0x3E Context Tag 3, opening tag: ABSTRACT-SYNTAX.&Type (value)
0x91 Application tag 9 (enumerated), length 1
0x00 Data: enumerated value 0: inactive
0x3F Context Tag 3, closing tag
0x49 Context Tag 4, length 1: unsigned (priority)
0x07 Data: value 7
Since the response does not include data, it must be returned as a SimpleACK-PDU. On page 348,
BACnet-SimpleACK-PDU is defined to be a SEQUENCE of an invokeID and a service-ACK-choice. The
comment states that tags are not used in the header encoding. Header encoding for
BACnet-SimpleACK-PDU is shown in clause 20.1.4.
0x55 Preamble
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 14
0x0E
0x26 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
BACnet Samples - 32
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0xBB Header CRC
Example of a WritePropertyMultiple for the present-value property of Binary Output Object instance
number 1.
In this example, the value to written will be inactive, and the priority will be 7 (shown in Table 19-1 as
available for general use).
0x55 Preamble
0xFF
0x03 Frame Type 3: Data 1
0x00 Length = 30
0x1E
0x4F Header CRC
BACnet Samples - 34
NPDU follows
0x01 Network version 1
0x2C Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =1 reply expected (confirmed service request)
Bit1,0 = 00 normal priority
0x00 DNET 0x0001
0x01
0x01 Destination address length 1 octet
0x01 DADR 0x01
0x00 SNET 0x0002
0x02
0x01 Source address length 1 octet
0x15 SADR 0x15
0xFF Hop Count 255
APDU follows
0x02 APDU type 0: Confirmed Request; Bit1: Segmented Response Accepted
0x03 Max response 3: up to 480 octets
0x07 Invoke ID 7
0x10 Service Choice 16 (escaped): Write Property Multiple
0x90
Tagged Service follows
0x0C Context Tag 0, length 4: Object Identifier
0x01 Data: Object type 4 (Binary Output), Object Instance 1
0x00
0x00
0x01
0x1E Context Tag 1, opening tag: SEQUENCE OF BACnetPropertyValue
0x09 Context Tag 0, length 1: BACnetPropertyIdentifier
0x55 Data: enumerated value 85: present-value
0x2E Context Tag 2, opening tag: ABSTRACT-SYNTAX.&Type (value)
0x91 Application Tag 9 (enumerated), length 1
0x00 Data: 0 = inactive
0x2F Context Tag 2, closing tag
0x39 Context Tag 3, length: unsigned (priority)
0x07 Data: Value 7
0x1F Context Tag 1, closing tag
0xD0 Data CRC
0x81
0x55 Preamble
0xFF
0x07 Frame Type 7: Data Ack 1 XON
0x00 Length = 0
0x00
0x23 Header CRC
0x55 Preamble
BACnet Samples - 35
0xFF
0x02 Frame Type 2: Data 0
0x00 Length = 14
0x0E
0x26 Header CRC
NPDU follows
0x01 Network version 1
0x28 Network control octet
Bit7 =0 "BACnet APDU"
Bit6 =0 not used
Bit5 =1 DNET present
Bit4 =0 not used
Bit3 =1 SNET present
Bit2 =0 no reply expected
Bit1,0 = 00 normal priority
0x00 DNET 0x0002
0x02
0x01 Destination address length 1 octet
0x15 DADR 0x15
0x00 SNET 0x0001
0x01
0x01 Source address length 1 octet
0x01 SADR 0x01
0xFF Hop Count 255
APDU follows
0x20 APDU type 2: Simple ACK
0x07 Original Invoke ID 7
0x10 ServiceACK Choice 16 (escaped): Write Property Multiple
0x90
0x1B Data CRC
0x4E
0x55 Preamble
0xFF
0x06 Frame Type 6: Data Ack 0 XON
0x00 Length = 0
0x00
0xBB Header CRC
0x55 Preamble
0xFF
0x0E Frame Type 14: Disconnect Request
0x00 Length = 1
0x01
0x89 Header CRC
0x03 Disconnect reason 3: other
0xE3 Data CRC
0xC2
0x55 Preamble
0xFF
0x0F Frame Type 15: Disconnect Response
0x00 Length = 0
0x00
0xEF Header CRC
The "error" is defined to be of type BACnet-Error, which is defined on page 361 as a CHOICE. The value
of the CHOICE for writePropertyMultiple, defined to be of type WritePropertyMultiple-Error. The comment
on BACnet-Error states that the context tags on the CHOICE are not to be used in the encoding.
Error is defined on page 363 as a sequence consisting of two enumerations: error-class and error-code.
In the case of a non-existent object, the error-class will be "object" and the error-code will generally be
"unknown-object".
BACnet Samples - 38
In the case of an unknown object, the firstFailedWriteAttempt is the first property in the propertyList.
The PTP framing and Network information of a BACnet-Error-PDU are as shown in the previous
examples. The APDU portion is defined in clause 20.1.7, and might appear as follows:
The PTP framing and Network information of a BACnet-Error-PDU are as shown in the previous
examples. The APDU portion might appear as follows:
The PTP framing and Network information of a BACnet-Reject-PDU are as shown in the previous
examples. The APDU portion is defined in clause 20.1.8, and might appear as follows:
The PTP framing and Network information of a BACnet-Abort-PDU are as shown in the previous
examples. The APDU portion is defined in clause 20.1.9, and might appear as follows: