rashevskyv / dbi

Author is duckbill
2.19k stars 93 forks source link

USB Communication Failed DBI > v576 #278

Closed superevr closed 1 year ago

superevr commented 1 year ago

Similar to https://github.com/rashevskyv/dbi/issues/252, dbi.nro versions 598 and 616 give a USB Communication Failed error message when attempting to connect to dbibackend.

DBI version 576 works good, so I've downgraded for now.

Here is the trace from DBI 616 after DBI on the Switch is forced to exit after the error.


Waiting for switch reset...
Exception in thread Thread-1 (start_server):
Traceback (most recent call last):
  File "/Downloads/Source/dbi/dbibackend", line 89, in poll_commands
    cmd_header = bytes(in_ep.read(16, timeout=0))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 423, in read
    return self.device.read(self, size_or_buffer, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 1029, in read
    ret = fn(
          ^^^
  File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/Downloads/Source/dbi/dbibackend", line 173, in start_server
    poll_commands()    
    ^^^^^^^^^^^^^^^
  File "/Downloads/Source/dbi/dbibackend", line 109, in poll_commands
    connect_to_switch()
  File "/Downloads/Source/dbi/dbibackend", line 155, in connect_to_switch
    dev.reset()
  File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 961, in reset
    self._ctx.backend.reset_device(self._ctx.handle)
  File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 911, in reset_device
    _check(self.lib.libusb_reset_device(dev_handle.handle))
  File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 2] Entity not found```
rashevskyv commented 1 year ago

Did u update backend script?

вт, 3 жовт. 2023 р., 03:14 користувач Superevr @.***> пише:

Similar to #252 https://github.com/rashevskyv/dbi/issues/252, dbi.nro versions 598 and 616 give a USB Communication Failed error message when attempting to connect to dbibackend.

DBI version 576 works good, so I've downgraded for now.

Here is the trace from DBI 616 after DBI on the Switch is forced to exit after the error.

Waiting for switch reset... Exception in thread Thread-1 (start_server): Traceback (most recent call last): File "/Downloads/Source/dbi/dbibackend", line 89, in poll_commands cmd_header = bytes(in_ep.read(16, timeout=0)) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 423, in read return self.device.read(self, size_or_buffer, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 1029, in read ret = fn( ^^^ File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 846, in bulk_read return self.read(self.lib.libusb_bulk_transfer, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 954, in read _check(retval) File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 604, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret])usb.core.USBError: [Errno 5] Input/Output Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/Downloads/Source/dbi/dbibackend", line 173, in start_server poll_commands() ^^^^^^^^^^^^^^^ File "/Downloads/Source/dbi/dbibackend", line 109, in poll_commands connect_to_switch() File "/Downloads/Source/dbi/dbibackend", line 155, in connect_to_switch dev.reset() File "/Library/Python/3.11/lib/python/site-packages/usb/core.py", line 961, in reset self._ctx.backend.reset_device(self._ctx.handle) File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 911, in reset_device _check(self.lib.libusb_reset_device(dev_handle.handle)) File "/Library/Python/3.11/lib/python/site-packages/usb/backend/libusb1.py", line 604, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret])usb.core.USBError: [Errno 2] Entity not found```

— Reply to this email directly, view it on GitHub https://github.com/rashevskyv/dbi/issues/278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELSODNG5NHGT6R5X4WYTJ3X5NKGJAVCNFSM6AAAAAA5QFIEVCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZDGMBUGA2TGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

superevr commented 1 year ago

I expected the 616 tagged source https://github.com/rashevskyv/dbi/blob/616/dbibackend or even the main branch https://github.com/rashevskyv/dbi/blob/main/dbibackend to be the latest backend script.

Instead, it was the script in the release: https://github.com/rashevskyv/dbi/releases/download/616/dbibackend.tar.xz

Its working now that I'm using both release files instead.