![]() So the original approach also can work: socat -lf >(sed -e '1,10 d' -e 's/\r//g' >log.txt). With ser2net and socat would it also work for sensors connected to a remote system. Some third party libraries, in particular libwrap, might not obey Serial The serial sensor platform is using the data provided by a device connected to the serial port of the system where Home Assistant is running. ![]() It seems cygwin does not support this, but it worked on a fairly old RedHat Linux.Īctually You can also use -lf (I'm not sure that this prints everything You need. So the text goes through awk and its output is written into log.txt.Īs You mentioned, You do not have awk this can be solved using sed (or tail and tr pipe but it needs an extra process). Actually this is a pipe to the process specified inside the brackets ( awk). This will create a process and >(.) returns a file like /dev/fd/68 and redirects the stderr to it. (Mind the space between the two > marks!!!) On a bash which supports process substitution it can be done like this: socat -v. I assume You want to have the log file sent into log.txt, cut the first 10 lines and all the \r characters removed. I have never used socat, but if it has -v log.txt option I have a possible solution for you as I see with -v option it prints the result also to stderr. One of the most popular solutions that you can find on the market today is called COM Port Redirector (for Linux and Windows operating systems). (my first approach was not correct, so I modify) As you already know, you can redirect serial ports to a remote PC using some dedicated third-party software. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |