Node-red communication with NOLEK S9 via RS232

I am trying to read leak test data from a NOLEK S9 unit but i cannot appear to get this setup correctly.
I am using a serial node with the following
Baud rate: 9600
Data bits: 8
Stop bits: 2
Parity: None
Flow: none

Serial port : /dev/ttyS2:9600-8N2 (For COM port 1 on the IOT2040)

Node red v1.2.1 is running on a siemens IOT2040, (I know it is an older version, but the IOT2040 does not want to run anything more up to date)

Any Info on how to request data from the NOLEK unit would be greatly appreciated

Welcome to the forum!

Does this show any data?

cat /dev/ttyS2:9600-8N2

Thanks for that suggestion, I get a response of No such file or directory?
Does this mean the port is not setup correctly?

try

screen /dev/ttyS2:9600-8N2

That comes back with Cannot execute, no such file or directory when I execute that query in the Terminal screen.

What is the output of:

ls /dev/ttyS2*

When I type that command it responds with
/dev/ttys2

Then you only need ttys2 as your port.

yes, I have /dev/ttyS2 as the port, see image

Change ttyS2 to ttys2.

I don't think those two statements make sense?
Since bash is case sensitive, if there is a /dev/ttys2 then ls /dev/ttyS2* should not show it?

You are, of course, right!

is Node RED running in some type of container?
where the physical hardware isn't present in it's virtualised env?

  • Also check the credentials of the entity running Node RED, it may not have the rights to see ports (add it to the dialout group perhaps. -if its related of course)

I don't do (or work) on these things - but food for thought

There are both, i have a /dev/ttys2 and also /dev/ttyS2

I believe if i short pin 2 and 3 on the serial cable, any message sent out will be returned?
Is that a way to check if the com port is setup correctly?

I shorted pin 2 and 3 and the message that was sent came back.
Does this mean the COM port is working correctly?

Yes, that is a reasonable conclusion.

What does ls -l /dev/tty[sS]2 show? Please copy the output and show us.
This is an example from my Debian PC
crw-rw---- 1 root dialout 4, 66 Jun 27 15:54 /dev/ttyS2

As I understand it, a serial port should be a character special device, so the first character of the output should be 'c'.
Also I would expect it to have a capital S (though I don't know if the Siemens IOT2040 follows this convention).

If the /dev/ttys2 line begins with '-' then it is a normal not a character special file and was probably created in error.

I typed ls -l /dev/tty[sS]2 and got the following

crw-rw---- 1 root dialout 4, 66 Jul 8 11:11 /dev/ttyS2
crw-rw-rw- 1 root tty 3, 50 Jul 7 15:08 /dev/ttys2

OK thanks.

Is the node red user a member of the group dialout?

cat /etc/group | grep dialout