widesky / node-bacstack

The BACnet protocol library written in pure JavaScript
https://www.npmjs.com/package/@widesky/node-bacnet
MIT License
0 stars 1 forks source link

[Feat] Add support for discovering bacnet devices via global broadcast. #1

Open SamuelToh opened 4 years ago

SamuelToh commented 4 years ago

Node Version: 12.4.0

Node BACstack Version: 0.2.4

Feature Request

There is a limitation on the current client whereby devices behind a BBMD, bacnet router, is undiscoverable as they cannot be reached by the standard local broadcasting.

Current Behaviour (Bug Report)

Expected Behaviour (Bug Report)

Configurable network destination value, default it to 65535

Steps to reproduce Issue (Bug Report)

SamuelToh commented 4 years ago

Had a quick scan at the src code and noticed that it is actually possible to perform whoIs through global broadcasting. Example: myClient.whoIs({address: '10.1.201.255', net: 65535}, {lowLimit: 2503900, highLimit: 2503900});

Note that, the docs state that the first parameter receiver for the whoIs op must be a piece of string, which is the target device's address. This is not true. It can be an object whereby you inject the broadcasting address to the address key and then the network destination value as net.

Then the supplementary options for lower and upper limits can be configured via the options param.

Sounds like this piece of work will just be an doc update.