Home > Net >  The.net SerialPort. Why there are two Open repeat operation?
The.net SerialPort. Why there are two Open repeat operation?

Time:09-20

Because of the deficiency in the hardware setup, cause I use c # SerialPort to a serial port communication, Open has probabilistic cause hardware reset () or crash, but the serial port tools in other languages, even the simplest Open python also won't appear the problem, I wonder why, to find the embedded showed a software. The.net SerialPort. The Open what, found that there are two repeated operation, don't understand why this is so, can someone off and confused? Thank you very much!

This is a.net

This is a python

This is a serial debugger, called sscom packer will not see what is language

In addition to a serial port tools, the.net and python are only configured serial port number and baud rate, the other is built-in default arguments, but the open operation python leaner (?) ,.net open operation was obviously twice repeated operation, why need to do this?
Only a few points, hope don't mind

CodePudding user response:

A top

CodePudding user response:

By the way, hardware is needed when I was in the open can make RTS
But even as follows:
SerialPort. RTS=true;
SerialPort. The Open ();
Thread.sleep (100);
SerialPort. RTS=false;
Is enabled, only after the Open 100 milliseconds later is not enabled, this also is can make only after the Open, can cause the firmware shutdown, can not completely avoid the problem...
I want Open to let the RTS enabled, this how do ah
  •  Tags:  
  • C#
  • Related