Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send a recipient list. #46

Open
2 tasks
bgeaney opened this issue Jun 6, 2024 · 0 comments
Open
2 tasks

Unable to send a recipient list. #46

bgeaney opened this issue Jun 6, 2024 · 0 comments

Comments

@bgeaney
Copy link

bgeaney commented Jun 6, 2024

Node Version: X.Y.Z

Node BACstack Version: X.Y.Z

  • Bug Report
  • Feature Request
  • [ x] Question

Note: Make sure you have read the FAQs
before logging this issue.

Feature Request / Question

Hi,
I'm trying to send a recipient list to a notification class object and for some reason I'm seeing issues with the recipient and the process identifier. When I tried to dive in it looked that the value from the device seems to get passed to the process ID.
When I went to print out the encoded value from encodeBacnetObjectId it is equal to the value that presented as the ProcessIdentifier: 33554437 in the below capture.

Has anyone used this library to send a recipient list.
I'm using ANSI/ASHRAE Standard 135-2020

BACnetDestination ::= SEQUENCE {
valid-days BACnetDaysOfWeek,
from-time Time,
to-time Time,
recipient BACnetRecipient,
process-identifier Unsigned32,
issue-confirmed-notifications BOOLEAN,
transitions BACnetEventTransitionBits
}

My values I'm passing are:
var values= [
// Other recipient entry properties (optional)
{
type: bacnet.enum.ApplicationTag.BIT_STRING,
value: validDaysValue,
},
{
type: bacnet.enum.ApplicationTag.TIME,
value: date1,
},
{
type: bacnet.enum.ApplicationTag.TIME,
value: date2,
},{
type: 12,
value:{
type: 8,
device: 5,
}
},
{
type: bacnet.enum.ApplicationTag.UNSIGNED_INTEGER,
value: 0,
},
{
type: bacnet.enum.ApplicationTag.BOOLEAN,
value: 0,
},
{
type: bacnet.enum.ApplicationTag.BIT_STRING,
value: validTransitionsValue,
}
]
client.writeProperty(ipaddressRemote, { type: 15, instance: 0}, 102, value, (err, value) => {
if (err) {
console.error('Error:', err);
} else {
console.log('Notification class object written successfully:', value);
}
});

My wireshark capture (failing):
Building Automation and Control Network APDU
0000 .... = APDU Type: Confirmed-REQ (0)
.... 0000 = PDU Flags: 0x0
.111 .... = Max Response Segments accepted: Greater than 64 segments (7)
.... 0101 = Size of Maximum ADPU accepted: Up to 1476 octets (fits in an ISO 8802-3 frame) (5)
Invoke ID: 0
Service Choice: writeProperty (15)
ObjectIdentifier: notification-class, 0
Property Identifier: recipient-list (102)
Context Tag: 1, Length/Value/Type: 1
.... 1... = Tag Class: Context Specific Tag
0001 .... = Context Tag Number: 1
Length Value Type: 1
Property Identifier: recipient-list (102)
{[3]
.... 1... = Tag Class: Context Specific Tag
0011 .... = Context Tag Number: 3
.... .110 = Named Tag: Opening Tag (6)
valid Days: (Bit String) (TTTTTTT)
Application Tag: Bit String, Length/Value/Type: 2
.... 0... = Tag Class: Application Tag
1000 .... = Application Tag Number: Bit String (8)
Length Value Type: 2
Unused bits: 1
Monday = TRUE
Tuesday = TRUE
Wednesday = TRUE
Thursday = TRUE
Friday = TRUE
Saturday = TRUE
Sunday = TRUE
from time: 6:02:46.0 P.M. = 18:02:46.0
Application Tag: Time, Length/Value/Type: 4
.... 0... = Tag Class: Application Tag
1011 .... = Application Tag Number: Time (11)
Length Value Type: 4
to time: 8:02:46.0 P.M. = 20:02:46.0
Application Tag: Time, Length/Value/Type: 4
.... 0... = Tag Class: Application Tag
1011 .... = Application Tag Number: Time (11)
Length Value Type: 4
ProcessIdentifier: 33554437
Application Tag: BACnetObjectIdentifier, Length/Value/Type: 4
.... 0... = Tag Class: Application Tag
1100 .... = Application Tag Number: BACnetObjectIdentifier (12)
Length Value Type: 4
issue confirmed notifications: FALSE
Application Tag: Boolean, Length/Value/Type: 0
.... 0... = Tag Class: Application Tag
0001 .... = Application Tag Number: Boolean (1)
Length Value Type: 0
transitions: (Bit String) (TTT)
Application Tag: Bit String, Length/Value/Type: 2
.... 0... = Tag Class: Application Tag
1000 .... = Application Tag Number: Bit String (8)
Length Value Type: 2
Unused bits: 5
to-offnormal = TRUE
to-fault = TRUE
to-normal = TRUE
}[3]
.... 1... = Tag Class: Context Specific Tag
0011 .... = Context Tag Number: 3
.... .111 = Named Tag: Closing Tag (7)

VTS wireshark capture (working):
Building Automation and Control Network APDU
0000 .... = APDU Type: Confirmed-REQ (0)
.... 0000 = PDU Flags: 0x0
.000 .... = Max Response Segments accepted: Unspecified (0)
.... 0011 = Size of Maximum ADPU accepted: Up to 480 octets (fits in an ARCNET frame) (3)
Invoke ID: 11
Service Choice: writeProperty (15)
ObjectIdentifier: notification-class, 0
Property Identifier: recipient-list (102)
Context Tag: 1, Length/Value/Type: 1
.... 1... = Tag Class: Context Specific Tag
0001 .... = Context Tag Number: 1
Length Value Type: 1
Property Identifier: recipient-list (102)
{[3]
.... 1... = Tag Class: Context Specific Tag
0011 .... = Context Tag Number: 3
.... .110 = Named Tag: Opening Tag (6)
valid Days: (Bit String) (TFFFFFF)
Application Tag: Bit String, Length/Value/Type: 2
.... 0... = Tag Class: Application Tag
1000 .... = Application Tag Number: Bit String (8)
Length Value Type: 2
Unused bits: 1
Monday = TRUE
Tuesday = FALSE
Wednesday = FALSE
Thursday = FALSE
Friday = FALSE
Saturday = FALSE
Sunday = FALSE
from time: 2:07:22.0 P.M. = 14:07:22.0
Application Tag: Time, Length/Value/Type: 4
.... 0... = Tag Class: Application Tag
1011 .... = Application Tag Number: Time (11)
Length Value Type: 4
to time: 2:07:22.0 P.M. = 14:07:22.0
Application Tag: Time, Length/Value/Type: 4
.... 0... = Tag Class: Application Tag
1011 .... = Application Tag Number: Time (11)
Length Value Type: 4
DeviceIdentifier: device, 18057
Context Tag: 0, Length/Value/Type: 4
.... 1... = Tag Class: Context Specific Tag
0000 .... = Context Tag Number: 0
Length Value Type: 4
0000 0010 00.. .... .... .... .... .... = Object Type: device (8)
.... .... ..00 0000 0100 0110 1000 1001 = Instance Number: 18057
ProcessIdentifier: 0
Application Tag: Unsigned Integer, Length/Value/Type: 1
.... 0... = Tag Class: Application Tag
0010 .... = Application Tag Number: Unsigned Integer (2)
Length Value Type: 1
issue confirmed notifications: FALSE
Application Tag: Boolean, Length/Value/Type: 0
.... 0... = Tag Class: Application Tag
0001 .... = Application Tag Number: Boolean (1)
Length Value Type: 0
transitions: (Bit String) (TFF)
Application Tag: Bit String, Length/Value/Type: 2
.... 0... = Tag Class: Application Tag
1000 .... = Application Tag Number: Bit String (8)
Length Value Type: 2
Unused bits: 5
to-offnormal = TRUE
to-fault = FALSE
to-normal = FALSE
}[3]
.... 1... = Tag Class: Context Specific Tag
0011 .... = Context Tag Number: 3
.... .111 = Named Tag: Closing Tag (7)

Current Behaviour (Bug Report)

Expected Behaviour (Bug Report)

Steps to reproduce Issue (Bug Report)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant