I have a issue on a device and this will be my first step in LINUX world (and with the Raspberry Pi).
The situation :
I have two devices connected through RS232.
One device regularly stop to communicate (No more data on TX).
After analysis, a XON is the solution to relaunch the communication.
So we suppose that an XOFF has been send and I must prove it.
I need to do two thinks :
1) Use a SNIFFER on the SERIAL port (RX & TX) and create a LOG FILE.
2) Listen on the TX and if there is no more transmission then I send a XON and I restart the Sniffer that will create a new file.
1) Sniffer solution :
For the Sniffer, I see http://jpnevulator.snarl.nl/.
It has the possibility to log BIN and ASCII.
2) Listening & Transmit XON :
I think about a little program with PYTHON that Listen to TX.
How to do such listening easily?
This program listen on the TX and if there is no more data, it will do :
1) STOP the SNIFFER : I suppose it not complicated to do.
2) Commute a Relay (to disconnect the RX pin from te other device and connect to the RPi)
3) Rpi will SEND the XON
4) Restart the Sniffer.
I suppose, that I absolutely need to use two SERIAL ports :
- one to Spy the RX+TX for the Sniffer : http://www.lammertbies.nl/comm/cable/RS ... nitor.html
- and another to Listen the TX on the second serial port.
Is it the good way or is it a better solution?
Who can give some advices and guide me in the Python listener?