Disable RTS/DSR Handshaking while keeping lines high in PySerial

橙三吉。 提交于 2019-12-11 12:43:45

问题


I'm using PySerial to read serial messages form a device. The device communicates in TTL. The TTL->RS-232 converter (which is then emulated on its USB input) requires DSR and RTS lines be high to receive power.

So I attempt to send data:

import serial
port = serial.Serial(arguments...,rtscts=True,dsrdtr=True)
port.write(b'Hello World)

This script will hang forever (or I've never seen it exit). I'm assuming this is because my handshaking lines are dictating I currently can't send a message.

Is there a way to keep my hand shaking lines high, while sending AND receiving messages. I.E.: Bi-directional communication independent of HandShaking

Version Info:

Python3.5 Windows7 Professional x86_64

来源:https://stackoverflow.com/questions/37284228/disable-rts-dsr-handshaking-while-keeping-lines-high-in-pyserial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!