question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bacnet device object and properties are not able to access but able to discover the devices

See original GitHub issue

I am using Yabe bacnet simulator which has both device simulator and explorer. But if I use the bacstack library , I am not able to use the device objects and proeprties. It is discovering the device but not able to load object and properties for usage.

Simulator which I used https://sourceforge.net/projects/yetanotherbacnetexplorer.

But in Yabe device explorer it is working. image

Simulator snap: image

The error which I am getting:

err:  Error: ERR_TIMEOUT
    at Timeout._onTimeout (C:\Users\EpsilonPrime\node_modules\bacstack\lib\client.js:75:16)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)

The nodejs code which I have used:

const bacnet = require('bacstack');

// Initialize BACStack
const client = new bacnet({apduTimeout: 3000});

console.log(client);

//console.log(client.EventEmitter)


// Discover Devices
client.on('iAm', (device) => {
  console.log('address----------> ', device.address);
  console.log('deviceId---------->  ', device.deviceId);
  console.log('maxApdu---------->  ', device.maxApdu);
  console.log('segmentation---------->  ', device.segmentation);
  console.log('vendorId---------->  ', device.vendorId);
  console.log('object type---------->  ', device.vendorId);
  console.log('vendorId---------->  ', device.vendorId);
});


client.whoIs();

// Read Device Object
client.readProperty('192.168.14.87', {type: 8, instance: 2195695}, 28, (err, value) => {
  console.log('value: ', value);
  console.log('err: ', err);
});

In the below image it is displaying that it is discovering the devices but it is not able to find objects. 98a2e5579a291af57edf750e1b8f9a52d52d427f

CqnnB

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jscott3201commented, Aug 23, 2021

Yes you can multiple machines target a device or poll each other. You should always be able to WhoIs your virtual instances as they are required by spec to have a few default fields like Vendor ID. If you want to simulate two devices on a machine you need to setup separate Ethernet interfaces. Something like “sudo ifconfig eth0:1 192.168.1.1/24” would work in Linux. Each instance of the service has to bind to the UDP port.

1reaction
jscott3201commented, Aug 23, 2021

BACnet is a long running UDP process in most stacks that binds to the adapter. Only one service can bind to 47808 at a time. Linux you can use ifconfig and setup a temporary adapter with IP/SUBNET.

192.168.1.1:47808 -> 192.168.1.2:47807 would be a valid path but not using the same source and destination IP. Basically mimicking the loop back behavior of the local machine at that point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I unable to connect to BACnet Devices?
If you are unable to connect to BACnet devices no matter what you do, try the BACnet Explorer (demo). If it does not...
Read more >
Unable to open BACnet Device object, getting ...
Cause. Objects either not located in the BACnet side of the bCX Device or they have been malformed as they were initially created....
Read more >
Bacnet device object and properties are not able to access but ...
I am using Yabe bacnet simulator which has both device simulator and explorer. But if I use the bacstack library , I am...
Read more >
ChristianTremblay/BAC0 - Gitter
For example, we might be able to see if there is a BBMD on the network and what it's IP address is, see...
Read more >
BACnet Object Browser - Desigo CC
The Write Property function on the Services menu is grayed out if editing the object property is not allowed. In addition, the BACnet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found