動作環境
CentOS 6.8 (64bit)
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
pySerial pyserial-2.7-py2.6.egg-info
関連
送信できなくなる
pySerialを使ったエミュレータを実装しているが、送信ができなくなる症状が発生する。
test_send_180125.py
import serial
import time
# on Python 2.6.6
atxt="hello"
def main():
print("Hello")
con1=serial.Serial('/dev/ttyUSB0', 9600, timeout=300)
while True:
#wrk = "from\r\n"
print(atxt)
con1.write(atxt);
time.sleep(1)
con1.close()
if __name__ == '__main__':
main()
対処
対処方法は今のところ不明である。
OSを再起動することで対処をするが、他の作業に影響してしまう。
関連
-
Raspberry Pi pyserial need constant reboot
- 問題を避けるためpySerial v2.5を使用している例がある