Skip to content

Device disconnected during reset #2

@ReservedField

Description

@ReservedField

If I try to upload any firmware (tested with both eVic and Presa firmwares), the device disconnects during reset. I have the Presa FW installed right now, but it also happens with the eVic one.

$ sudo evic upload somefirmware.bin

Found device:
    Manufacturer: Nuvoton
    Product: HID Transfer
    Serial No: XXXXXXXXXXXX

Reading data flash...

    Device name: Presa TC75W
    Firmware version: 1.02
    Hardware version: 1.01

Writing data flash...

Traceback (most recent call last):
  File "/bin/evic", line 9, in <module>
    load_entry_point('evic==0.1', 'console_scripts', 'evic')()
  File "build/bdist.linux-x86_64/egg/evic/cli.py", line 157, in main
  File "build/bdist.linux-x86_64/egg/evic/device.py", line 205, in reset_system
  File "build/bdist.linux-x86_64/egg/evic/device.py", line 125, in send_cmd
  File "build/bdist.linux-x86_64/egg/usb/core.py", line 878, in write
  File "build/bdist.linux-x86_64/egg/usb/backend/libusb1.py", line 778, in intr_write
  File "build/bdist.linux-x86_64/egg/usb/backend/libusb1.py", line 856, in __write
  File "build/bdist.linux-x86_64/egg/usb/backend/libusb1.py", line 552, in _check
usb.core.USBError: [Errno 19] No such device (it may have been disconnected)

After this obviously it won't work, but it can be brought back to life with the official updater. I worked around this by adding a try/except to the call to dev.reset_system() in cli.py, ignoring the exception. It works fine now, with all kinds of firmwares. Actually, the device disconnecting during reset should be expected. I'm not sure this is the best way to fix it, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions