Python2.7(on Windows) Need to capture serial port output into log files during Python/Robot script run
<p>We are testing networking devices to which test interaction is done using serial ports. Python 2.7 with Windows is used to achieve this using the PySerial module of Python. 
The scripts are run using Robot framework.</p>

<p>We observe that the Robot logs do not contain the serial device interaction dialogues. </p>

<p>We tried checking on Robot framework forums and it is unlikely that such support exists at Robot framework level.</p>

<p>We need to implement this in Python.
How can the following be achieved:
I) Basic requirement: All script interaction with the (multiple) test devices on serial port needs to be captured into a log file
II) Advanced requirement: while the script is not actively interacting with the test device there has to be continuous background monitoring of the device under test over serial ports for any errors/crashes</p>

<p>Thanks!</p>

<p>I may be incorrect but perhaps you want to capture data sent/received between computer and device through serial port. If this is true then serial port sniffer will be required. Linux and mac os x does not support sniffing however you may use sniffing for windows.</p>

python python-2.7 testing automated-tests robotframework