Accessing serial ports of a mbNET-device.
Question:
I want to read and write data to the serial ports of an mbNET.
I want to use the serial-in and Serial-out nodes which are in the default library.
How can I address the serial interfaces so I can send and receive serial data?
Answer:
The serial interfaces COM1 and COM2 can be addresses by using the following file directives:
/dev/ttyS1 for Com1
And
/dev/ttyS2 for Com2
See below an NodeRED example on how to send and receive data from and to the serial ports.
You need a Null-modem cable and a serial terminalprogram like RealTerm (https://sourceforge.net/projects/realterm/).
See also the attached file with the Json-code of the flow, which you can import into NodeRED.