I've built a PLC server and test client for linux-x64 in Visual Studio with https://github.com/S7NetPlus/s7netplus
All run OK on Ubuntu 22.04. The PLC server created a named pipe which I have to write to with the Java app.
So the Java app will only have to write "1" to this existing named pipe. Nothing else. I'm using something like:
RandomAccessFile pipe = new RandomAccessFile("\\\\.\\pipe\\pipename ", "rw");
short sVal = 1;
pipe.write((byte) sVal);
But the server is not changing status of pipename when writing from Java.
I googled all over ,thread like this and similar but for starters I'm unable to locate where this named pipe lives in my Ubuntu?
So this part is troubling me "\\\\.\\pipe\\pipename "
This is probably incorrect but I don't understand how to find and reference named pipe in Java.
The pipe is definitely existing on Ubuntu since the PLC server and test client are working OK.
EDIT
So when running PLC server I can find all processes to which the server process is writing. The server process is implementing 2 pipes:
userjo@UBUNTU-VM:~$ sudo ls -l /proc/428576/fd
total 0
lrwx------ 1 root root 64 stu 23 08:56 0 -> /dev/pts/6
lrwx------ 1 root root 64 stu 23 08:56 1 -> /dev/pts/6
lrwx------ 1 root root 64 stu 23 08:58 10 -> 'socket:[85449454]'
lr-x------ 1 root root 64 stu 23 08:58 12 -> 'pipe:[85449455]'
l-wx------ 1 root root 64 stu 23 08:58 13 -> 'pipe:[85449455]'
lr-x------ 1 root root 64 stu 23 08:58 14 -> /home/userjo/plc/plcserver/userjoplcserver.dll
lr-x------ 1 root root 64 stu 23 08:58 15 -> /home/userjo/plc/plcserver/userjoplcserver.dll
lr-x------ 1 root root 64 stu 23 08:58 16 -> /home/userjo/plc/plcserver/System.Runtime.dll
lr-x------ 1 root root 64 stu 23 08:58 17 -> /home/userjo/plc/plcserver/System.Console.dll
lr-x------ 1 root root 64 stu 23 08:58 18 -> /home/userjo/plc/plcserver/System.Threading.Thread.dll
lr-x------ 1 root root 64 stu 23 08:58 19 -> /home/userjo/plc/plcserver/System.Threading.Tasks.dll
lrwx------ 1 root root 64 stu 23 08:56 2 -> /dev/pts/6
lr-x------ 1 root root 64 stu 23 08:58 20 -> /home/userjo/plc/plcserver/System.Runtime.Extensions.dll
lr-x------ 1 root root 64 stu 23 08:58 21 -> /home/userjo/plc/plcserver/System.Threading.dll
lrwx------ 1 root root 64 stu 23 08:58 22 -> /dev/pts/6
lr-x------ 1 root root 64 stu 23 08:58 23 -> /home/userjo/plc/plcserver/System.Collections.dll
lr-x------ 1 root root 64 stu 23 08:58 24 -> /home/userjo/plc/plcserver/System.Text.Encoding.Extensions.dll
lr-x------ 1 root root 64 stu 23 08:58 25 -> /dev/urandom
lr-x------ 1 root root 64 stu 23 08:58 26 -> /home/userjo/plc/plcserver/S7.Net.dll
lr-x------ 1 root root 64 stu 23 08:58 27 -> /home/userjo/plc/plcserver/System.IO.Pipes.dll
lr-x------ 1 root root 64 stu 23 08:58 28 -> /home/userjo/plc/plcserver/System.Net.Sockets.dll
lr-x------ 1 root root 64 stu 23 08:58 29 -> /home/userjo/plc/plcserver/S7.Net.dll
lr-x------ 1 root root 64 stu 23 08:56 3 -> 'pipe:[85449450]'
lr-x------ 1 root root 64 stu 23 08:58 30 -> /home/userjo/plc/plcserver/netstandard.dll
lr-x------ 1 root root 64 stu 23 08:58 31 -> /home/userjo/plc/plcserver/System.Net.Primitives.dll
lr-x------ 1 root root 64 stu 23 08:58 32 -> /home/userjo/plc/plcserver/Microsoft.Win32.Primitives.dll
lr-x------ 1 root root 64 stu 23 08:58 33 -> /home/userjo/plc/plcserver/System.Diagnostics.Tracing.dll
lrwx------ 1 root root 64 stu 23 08:58 34 -> 'socket:[85448469]'
lrwx------ 1 root root 64 stu 23 08:58 35 -> 'socket:[85452277]'
lr-x------ 1 root root 64 stu 23 08:58 36 -> /home/userjo/plc/plcserver/System.Memory.dll
lr-x------ 1 root root 64 stu 23 08:58 37 -> /home/userjo/plc/plcserver/System.Threading.ThreadPool.dll
lr-x------ 1 root root 64 stu 23 08:58 38 -> /home/userjo/plc/plcserver/System.Collections.Concurrent.dll
lrwx------ 1 root root 64 stu 23 08:58 39 -> 'anon_inode:[eventpoll]'
l-wx------ 1 root root 64 stu 23 08:58 4 -> 'pipe:[85449450]'
lr-x------ 1 root root 64 stu 23 08:58 40 -> 'pipe:[85452278]'
l-wx------ 1 root root 64 stu 23 08:58 41 -> 'pipe:[85452278]'
lrwx------ 1 root root 64 stu 23 08:58 42 -> 'socket:[85454101]'
lr-x------ 1 root root 64 stu 23 08:58 43 -> /home/userjo/plc/plcserver/System.Runtime.InteropServices.dll
lrwx------ 1 root root 64 stu 23 08:58 44 -> 'socket:[85449498]'
lrwx------ 1 root root 64 stu 23 08:58 45 -> 'socket:[85452306]'
lr-x------ 1 root root 64 stu 23 08:58 46 -> 'pipe:[85453000]'
l-wx------ 1 root root 64 stu 23 08:58 47 -> 'pipe:[85453000]'
lrwx------ 1 root root 64 stu 23 08:56 5 -> /dev/pts/6
lrwx------ 1 root root 64 stu 23 08:58 6 -> /dev/pts/6
lrwx------ 1 root root 64 stu 23 08:58 7 -> /dev/pts/6
lr-x------ 1 root root 64 stu 23 08:58 9 -> /home/userjo/plc/plcserver/System.Private.CoreLib.dll
The question is - which one is the pipe I'm supposed to write to from Java and how to reference it?