I want to use raspberry pi 4 to read some values from Mitsubishi FX1n PLC over programing port(RS232) and I use RS232-USB adapter with CH340 chip. The problem is that I have to send ASCII REQ(05 in hex) from RPI and receive ASCII ACK(06 in hex) from PLC to open the connection and this value is treated as Frame error by CH340 driver in linux.
I write "SCADA" program in C# (visual studio) and I run it with mono on RPI. I've test the program in Windows and it works fine, but on RPI, I get read timeout with same settings and same CH340 adaptor. After more tests, i've notice that RPI reset the port when receive ACK. I've try also to simulate this with arduino that also have CH340 cip and on Windows works fine, but on RPI I see RX led from arduino blinking(REQ command) and immediately after that is blinking the power led and TX led from arduino is not flashing. If I send anything else from Arduino to RPI is working fine. I also made a bridge between RX and TX on RS232 - USB adapter and I receive back what I send from RPI. So, the adapter is not defective.
So, my question: Is there a way to stop port reseting from RPI on ACK receive?
PS: Sorry for my bad English.