BiancoRoyal / node-bacstack

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

BUG always using port 47808 #34

Open Andrius1008 opened 3 years ago

Andrius1008 commented 3 years ago

Node Version: v14.17.0

Node BACstack Version: 1.0.0

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

Feature Request / Question

-

Current Behaviour (Bug Report)

const bacnetClient = new Bacnet({ port: 47809, // Use BAC1 as communication port interface: '192.168.222.11', // Listen on a specific interface broadcastAddress: '192.168.222.255', // Use the subnet broadcast address apduTimeout: 60000 // Wait twice as long for response });

currently discovering in port 47808,but in options there is 47809.

So the bug in transport.js Line 100. this._server.send(buffer, 0, offset, port || DEFAULT_BACNET_PORT , address);

variable "port" is undefined.

Expected Behaviour (Bug Report)

-

Steps to reproduce Issue (Bug Report)

-

Apollon77 commented 3 years ago

@Andrius1008 Could you prepare a PR?