New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware flowcontrol (RTS CTS) does not work #89
Comments
As by 23 march 2018 this still doesn't work. Testing on Linux Mint and tried on Python 3.5 and 2.7. |
I use setRTS(value=1), but the pin in the fpga is always low. it is seems that the function of setRTS is disable? what show i do to implement the same functionality? |
if you want to have control over the RTS and DTR pins, do not use the |
@ril3y Did zsquare's answer solve your problem? Maybe we can get this issue closed out. |
I'm also having a problem when setting EDIT: To clarify, I'm not using the RTS and DTR pins and have those set to |
I found a solution! (At least to my problems) Apparently when setting Here is some example code to do the RTS and CTS logic yourself: import time
import serial
# Since we are doing the RTS and CTS logic ourselves, keep 'rtscts=False'
mySerial = serial.Serial(port='COMX', baudrate=9600, rtscts=False)
# To send some information:
dataToSend = 'HelloWorld!'
mySerial.setRTS(True)
# Wait for CTS signal
while not mySerial.getCTS():
pass
mySerial.write(bytes(dataToSend, 'ascii'))
time.sleep(0.25) # Wait for the data to have sent before disabling RTS
mySerial.setRTS(False) |
I'm finding it will write to TX independent of the state of CTS. Strange because underlying termios works fine for me. |
No matter what is passed the RTS pin will not go high. We have tested this on windows and osx and its the same. Here is a relevant snippet from the discussion here:
https://www.raspberrypi.org/forums/viewtopic.php?t=51582&p=398290
Since I'm using the pySerial class to do the serial operations I'm not directly accessing any pins on the board at all. In my case the problem seems to be a difference between how the python pySerial class works and the Microsoft serial class works. The Microsoft class works perfectly fine. The pySerial class does not, whether it's running on a PC or on my Raspberry Pi. The difference is that the Microsoft serial class properly sets the RTS line (which feeds into the EN [enable] line of the RF board), but the pySerial class does not. In fact, the pySerial method, setRTS(), doesn't appear to actually set the RTS line. That's why I had to default to essentially cutting off the pin between the RTS and the EN, leaving EN un-connected, which leaves the RF device in a constant enabled state.
The text was updated successfully, but these errors were encountered: