LoginSignup
0
2

More than 5 years have passed since last update.

pySerial > link: シリアル送信できないときの/dev/ttyUSB0復旧スクリプト (Python)

Last updated at Posted at 2018-01-26
動作環境
Ubuntu 16.04.3 LTS desktop amd64
tmux 2.1-3build1
Python 2.7.12
Python 3.5.2
pySerial v2.5

関連

動作不具合

pySerialを使用していると何かの条件で送信ができなくなる。
その復旧方法を調べた。

answered Mar 2 '15 at 20:33
Peter

によるreset_usb.pyを使う。

使用しているUSBシリアルアダプタはProlifcのもの。

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 009: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

lsusbでProlificがひっかかるように[driver_name]として指定する。

$ sudo python reset_usb.py Prolific
resetting driver: Prolific

送信できるようになった。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2