|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
capture serial communication with socat
Hello,
i tried to record the complete communication between my laptop and a serial device. NetBSD identies this as uslsa. I can connect via pyserial on ttyU0. Now i want to save the complete communication in both directions. So i use socat to create a pseudo device which connects to the real hardware over the tunnel. I use the following[1] command but nothing happens. Neither on the screen nor in log file. [1] Quote:
|
|
|||
You can capture serial communication to file with tip(1) by using the following .tiprc file in your home directory:
Code:
!beautify record='LOGS/serial-log.txt' script verbose !hardwareflow
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Apparently I either did not understand the problem and/or you did not describe it fully
Anyway, tip will capture serial data that arrives or comes in at the serial port it is connected to. It does log this data but does this buffered. That means only when it has saved up a rather large chunk of data it will be written to the log file. Sometimes the log file will only be written when exiting tip. BTW this buffering mechanism could be the reason why you do not see any data in the socat log file (yet). If you have a non-interactive program on your laptop that uses an USB to serial port to communicate (send and receive) then indeed you need something that acts as a man-in-the-middle. Or you need to extend that program to log everything to file. Two weeks ago I started writing a Perl script as a tip replacement. It forks a child process:
It still has a lot of imperfections but I am willing to share/post it here.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pf interfering with local lan peer communication | tomp | OpenBSD Security | 3 | 2nd September 2011 09:12 PM |
Multiple serial consoles via null modem cable or serial console server | J65nko | General Hardware | 0 | 16th January 2010 12:01 AM |
Communication with su failed | amandus | OpenBSD Packages and Ports | 7 | 17th July 2008 07:17 AM |
Invalid capture filter: "not ip host "! | ccc | FreeBSD General | 2 | 19th June 2008 08:12 PM |
Mounting a second serial hd | keyboard112 | Other BSD and UNIX/UNIX-like | 4 | 12th May 2008 08:06 AM |