yaacov / node-modbus-serial

A pure JavaScript implemetation of MODBUS-RTU (and TCP) for NodeJS
ISC License
630 stars 239 forks source link

RTS / CTS #214

Closed ghost closed 6 years ago

ghost commented 6 years ago

How can I enable/disable RTS/CTS on RS-485 communication?

yaacov commented 6 years ago

Hi, thanks for the question.

We use node-serialport for serial comunication, youcan pass the options using a options hash [1] while opening connection. You can see the options available in the serialport docs or code [2]. Another option is to set this from outside using some tool like stty [3].

[1] https://github.com/yaacov/node-modbus-serial/blob/master/examples/simple.js#L11 [2] https://github.com/node-serialport/node-serialport/blob/910438c2ca349a717eb45b00b7576e908b1d1aeb/src/serialport.h#L68 [3] http://www.tutorialspoint.com/unix_commands/stty.htm

ghost commented 6 years ago

Thanks!