Closed dequn closed 2 years ago
maybe setDTR means set DTR to low level output or not
so setDTR(True)
makes low level output
setDTR(False)
makes high level output
doc here
Hello, I looked up some basic knowledge about serial communication, mostly is about RS-232 standard. DTE(Date Terminal Equipment, our computer reference) asserts DTR (Data Terminal Read) when it is ready to receive data, so RTS(Request to send) also. When these two box checked, it stand for we can receive data, but if has been set the opposite value background, We can't read data from serial conn anymore. I think we don't need think about the high/low level, just send a logic value and pySerial do it for us.
Actually, I tried to jump into pySerial source code, but as the first time to do hardware work, it's a little hard for me to understand absolutely. Hope for your explanation, Thank you!
that's right, these two checkbox of this software(comtool) means set DTR/RTS to high level or not, but not set to valid or not. And i didnt consider hadware flowcontrol in my early work, I can change the meaning of DTR/RTS checkbox to the same as pyserial do later.
I added hardware flow control, and it controlled by pyserial
and when you want to control it by hand, the RTS DTR item now turn on means enable, not mean pin level anymore
According to the code, you may just set the opposite of DTR and RTS, I debug a full day for it, even through I doubt it's maybe my laptop system's bug or the driver bug.