respeaker / usb_4_mic_array

ReSpeaker 4 Mic Array with builtin VAD, DOA, AEC, Beamforming & NS
https://www.seeedstudio.com/ReSpeaker-Mic-Array-v2.0-p-3053.html
Apache License 2.0
141 stars 65 forks source link

usb.core.USBError when trying to update firmware #5

Closed petitsurfeur closed 6 years ago

petitsurfeur commented 6 years ago

Hi

Using a Debian 9.4 x64 Virtual Machine with python 2.7.13 and pip 9.0.1 and the Respeaker Mic Array v2.0. I have a usb.core.USBError when I try to update the firmware.

Here is the error

root@srv-debian-02:/opt/Git_Repos/usb_4_mic_array# python dfu.py --download 6_channels_firmware.bin
entering dfu mode
found dfu device
downloading
Traceback (most recent call last):
  File "dfu.py", line 229, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "dfu.py", line 224, in main
    dev.revertfactory()
  File "dfu.py", line 210, in __exit__
    self.leave()
  File "dfu.py", line 204, in leave
    return self._out_request(self.XMOS_DFU_RESETFROMDFU)
  File "dfu.py", line 175, in _out_request
    request, value, self.interface, data, self.TIMEOUT)
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 1043, in ctrl_transfer
    self.__get_timeout(timeout))
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 883, in ctrl_transfer
    timeout))
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error

Here are the log from syslog

Jun 12 22:59:11 srv-debian-02 kernel: [ 3371.628133] usb 1-2.1: USB disconnect, device number 12
Jun 12 22:59:18 srv-debian-02 kernel: [ 3379.345637] usb 1-2.1: new full-speed USB device number 13 using uhci_hcd
Jun 12 22:59:19 srv-debian-02 kernel: [ 3379.965855] usb 1-2.1: New USB device found, idVendor=2886, idProduct=0018
Jun 12 22:59:19 srv-debian-02 kernel: [ 3379.965861] usb 1-2.1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
Jun 12 22:59:19 srv-debian-02 kernel: [ 3379.965865] usb 1-2.1: Product: ReSpeaker 4 Mic Array (UAC1.0)
Jun 12 22:59:19 srv-debian-02 kernel: [ 3379.965868] usb 1-2.1: Manufacturer: SEEED
Jun 12 22:59:19 srv-debian-02 systemd-udevd[29612]: Process '/usr/sbin/alsactl -E HOME=/run/alsa restore 1' failed with exit code 99.

[[ Executing Firmware upgrade]]

Jun 12 22:59:34 srv-debian-02 kernel: [ 3394.589396] usb 1-2.1: USB disconnect, device number 13
Jun 12 22:59:35 srv-debian-02 kernel: [ 3395.979126] usb 1-2.1: new full-speed USB device number 14 using uhci_hcd
Jun 12 22:59:35 srv-debian-02 kernel: [ 3396.301677] usb 1-2.1: not running at top speed; connect to a high speed hub
Jun 12 22:59:35 srv-debian-02 kernel: [ 3396.337589] usb 1-2.1: New USB device found, idVendor=2886, idProduct=0018
Jun 12 22:59:35 srv-debian-02 kernel: [ 3396.337596] usb 1-2.1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
Jun 12 22:59:35 srv-debian-02 kernel: [ 3396.337600] usb 1-2.1: Product: ReSpeaker 4 Mic Array (UAC1.0)
Jun 12 22:59:35 srv-debian-02 kernel: [ 3396.337603] usb 1-2.1: Manufacturer: SEEED

Can you help me ?

xiongyihui commented 6 years ago

It should be usb permission error. Try to run the command with sudo

petitsurfeur commented 6 years ago

Hi I also tried yesterday with the sudo command. Is it normal that the firmware upgrade disconnects the USB device ?

thanks

petitsurfeur commented 6 years ago

Hi It's normal that the firmware upgrade disconnects the USB device. I used a RPI to upgrade the firmware and it worked.