最近、USBシリアル接続を介してTronxy 3DプリンタをUbuntu Server 20.04を実行しているLinuxボックスに接続しました。一部のカスタムマクロの問題を診断するのに役立つように、Pronsole(printrunツールスイートのユーティリティ)を使用したいと思います。 Pronsole環境を起動し、connect
コマンドを使用してプリンタに接続でき、問題やエラーは発生しませんでした。ただし、たとえば、Pronsoleを介してgcodeコマンドをプリンタに直接プッシュすると、コマンドラインG28
に次の出力が表示されます。私はLinuxエラーやPythonに慣れていないため、これらのエラーを読み取れないか、解決策を見つけるためにGoogleで何を検索するのかわかりません。私は本当に説明の助けを探していると思います。
ttyUSB1 22°> G28
SENDING:G28
ttyUSB1 22°> Exception in thread read thread:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 333, in \_readline
line\_bytes = self.\_readline\_nb()
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 329, in \_readline\_nb
return self.printer.readline()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 595, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in \_bootstrap\_inner
[self.run](https://self.run)()
File "/usr/lib/python3.10/threading.py", line 953, in run
self.\_target(\*self.\_args, \*\*self.\_kwargs)
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 420, in \_listen
line = self.\_readline()
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 354, in \_readline
if 'Bad file descriptor' in e.args\[1\]:
IndexError: tuple index out of range
Can't write to printer (disconnected ?):
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
OSError: \[Errno 5\] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 750, in \_send
self.printer.write((command + "\\n").encode('ascii'))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: \[Errno 5\] Input/output error
Can't write to printer (disconnected ?):
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
OSError: \[Errno 5\] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 750, in \_send
self.printer.write((command + "\\n").encode('ascii'))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: \[Errno 5\] Input/output error
Can't write to printer (disconnected ?):
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
OSError: \[Errno 5\] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 750, in \_send
self.printer.write((command + "\\n").encode('ascii'))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: \[Errno 5\] Input/output error
Can't write to printer (disconnected ?):
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 621, in write
n = os.write(self.fd, d)
OSError: \[Errno 5\] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/printrun/printcore.py", line 750, in \_send
self.printer.write((command + "\\n").encode('ascii'))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 655, in write
raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: \[Errno 5\] Input/output error
Disconnecting after 4 failed writes.
ベストアンサー1
まあ、私の問題はソフトウェアの問題ではなく、ハードウェアの問題であることがわかりました。 3Dプリンタがコマンドを実行しようとするたびに電源が切れ、USBシリアルコントローラとホストコンピュータの接続がしばらく切断されます。