respeaker / mic_array_dfu

ReSpeaker Microphone Array DFU tool for firmware upgrade
19 stars 22 forks source link

Could not find/open device #3

Closed akvkickstart closed 7 years ago

akvkickstart commented 7 years ago

I am trying to connect the Mic Array to Raspberry by and I am trying to setup the requirements:

I can see the device being registered to the RPi2b.

[ 5011.753818] hid-generic 0003:2886:0007.0003: hidraw1: USB HID v1.10 Device [SeeedStudio ReSpeaker MicArray UAC2.0] on usb-3f980000.usb-1.4/input4 [ 5013.513346] usbcore: registered new interface driver snd-usb-audio [ 5065.661624] usb 1-1.4: USB disconnect, device number 6 [ 5078.719343] usb 1-1.2: USB disconnect, device number 5 [ 5258.436788] usb 1-1.5: new full-speed USB device number 7 using dwc_otg [ 5258.537556] usb 1-1.5: not running at top speed; connect to a high speed hub [ 5258.539073] usb 1-1.5: config 1 interface 4 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1 [ 5258.540561] usb 1-1.5: config 1 interface 4 altsetting 0 has 2 endpoint descriptors, different from the interface descriptor's value: 1 [ 5258.541799] usb 1-1.5: New USB device found, idVendor=2886, idProduct=0007 [ 5258.541821] usb 1-1.5: New USB device strings: Mfr=1, Product=3, SerialNumber=0 [ 5258.541838] usb 1-1.5: Product: ReSpeaker MicArray UAC2.0 [ 5258.541853] usb 1-1.5: Manufacturer: SeeedStudio [ 5260.991953] hid-generic 0003:2886:0007.0004: hidraw0: USB HID v1.10 Device [SeeedStudio ReSpeaker MicArray UAC2.0] on usb-3f980000.usb-1.5/input4

But whenever I run: pi@rpigg:~/mic_array_dfu $ ./dfu --download respeaker_mic_array_8ch_raw.bin VID = 0x2886, PID = 0x7, BCDDevice: 0x31 Could not find/open device pi@rpigg:~/mic_array_dfu $

Can you please help with the issue?

akvkickstart commented 7 years ago

I run the following and it also worked:

pi@rpigg:~/mic_array_akv/mic_array $ speaker-test -t wav

speaker-test 1.0.28

Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 192 to 2097152 Period size range from 64 to 699051 Using max buffer size 2097152 Periods = 4 was set period_size = 524288 was set buffer_size = 2097152 0 - Front Left Time per period = 1.530202 0 - Front Left

I can hear sound from coming from the mic array.

xiongyihui commented 7 years ago

It's not support 48000Hz sample rate. You should use 16000Hz sample rate.

try:

speaker-test -D plughw:1
akvkickstart commented 7 years ago

I got that working, now whenever I run pixel_ring.py, I can see the lights working, but whenever I record, I don't here anything, how can you test the mic array?

akvkickstart commented 7 years ago

pi@rpigg:~ $ arecord -l List of CAPTURE Hardware Devices card 1: Array [ReSpeaker Microphone Array], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0

akvkickstart commented 7 years ago
pi@rpigg:~/mic_array_akv/mic_array $ python mic_array.py
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
(0, 'bcm2835 ALSA: - (hw:0,0)', 0L, 2L)
(1, 'bcm2835 ALSA: IEC958/HDMI (hw:0,1)', 0L, 2L)
(2, 'ReSpeaker Microphone Array: USB Audio (hw:1,0)', 8L, 2L)
(3, 'sysdefault', 0L, 128L)
(4, 'pulse', 32L, 32L)
(5, 'mic', 128L, 128L)
(6, 'speaker', 128L, 128L)
(7, 'dmix', 0L, 2L)
(8, 'default', 32L, 32L)
Traceback (most recent call last):
  File "mic_array.py", line 187, in <module>
    test_8mic()
  File "mic_array.py", line 173, in test_8mic
    with MicArray(16000, 4, 16000 / 4)  as mic:
  File "mic_array.py", line 42, in __init__
    raise Exception('can not find input device with {} channel(s)'.format(self.channels))
Exception: can not find input device with 4 channel(s)
pi@rpigg:~/mic_array_akv/mic_array $
xiongyihui commented 7 years ago

Sorry, it's a bug. Need to change with MicArray(16000, 4, 16000 / 4) as mic: to with MicArray(16000, 8, 16000 / 4) as mic:

It's fixed at the latest code.

prashantmaheshwari94 commented 7 years ago

I get the same error for this command: pi@raspberrypi:~/mic_array_dfu $ ./dfu --download respeaker_mic_array_8ch_raw.bin VID = 0x2886, PID = 0x7, BCDDevice: 0x31 Could not find/open device

Can anyone help me out here, there isn't much info in this error.

jacksun101 commented 7 years ago

I got the same error.

./dfu --download respeaker_mic_array_8ch_raw.bin VID = 0x2886, PID = 0x7, BCDDevice: 0x32 Could not find/open device

jacksun101 commented 7 years ago

Oh, I just tried adding "sudo" does the work!

prashantmaheshwari94 commented 7 years ago

sudo is required. Run the command with sudo, it will install.

KillingJacky commented 7 years ago

Will close this issue, please open a new issue if you have further questions.

ghost commented 5 years ago

I tried to update the firmware of the ReSpeaker Mic Array v2.0 via

sudo pip install pyusb click git clone https://github.com/respeaker/usb_4_mic_array.git cd usb_4_mic_array sudo python dfu.py --download 6_channels_firmware.bin

First, I also got the error message "ValueError: No DFU device found". When I used another USB cable to try to update the firmware again, the error message disappeared. I am using a HAMA cable (00173625).

See also issue on https://github.com/respeaker/mic_array/issues/22.

RevAngel7 commented 9 months ago

I have the same issue WITH sudo. lsusb shows the device as Bus 003 Device 015: ID 2886:0018 Seeed Technology Co., Ltd. ReSpeaker 4 Mic Array (UAC1.0) No other control or dfu device present to point to the ReSpeaker.

When trying to sudo ./dfu --download 1_channel_firmware.bin (the firmware file is in the folder)

VID = 0x174c, PID = 0x1153, BCDDevice: 0x1
VID = 0x1d6b, PID = 0x3, BCDDevice: 0x607
VID = 0x1d6b, PID = 0x2, BCDDevice: 0x607
VID = 0x5e3, PID = 0x626, BCDDevice: 0x6204
VID = 0x5e3, PID = 0x626, BCDDevice: 0x6204
VID = 0x1d6b, PID = 0x3, BCDDevice: 0x607
VID = 0xc45, PID = 0x800a, BCDDevice: 0x1
VID = 0x3eb, PID = 0xff01, BCDDevice: 0x92
VID = 0x1e7d, PID = 0x2de6, BCDDevice: 0x101
VID = 0x2109, PID = 0x2812, BCDDevice: 0xbe0
VID = 0x1a40, PID = 0x101, BCDDevice: 0x111
VID = 0x45e, PID = 0x823, BCDDevice: 0x20
VID = 0x5e3, PID = 0x610, BCDDevice: 0x6204
VID = 0x2886, PID = 0x18, BCDDevice: 0x300
VID = 0x5e3, PID = 0x610, BCDDevice: 0x6204
VID = 0x1d6b, PID = 0x2, BCDDevice: 0x607
VID = 0x1d6b, PID = 0x3, BCDDevice: 0x607
VID = 0x8087, PID = 0xaa7, BCDDevice: 0x1
VID = 0x26ce, PID = 0x1a2, BCDDevice: 0x0
VID = 0x6cb, PID = 0x1595, BCDDevice: 0x0
VID = 0x1017, PID = 0xa003, BCDDevice: 0x10c
VID = 0x1d6b, PID = 0x2, BCDDevice: 0x607
Could not find/open device

On Windows no luck either. Changed the Windows-Drivers to libusb-win32 with zadig. Then tried python dfu.py --download 1_channel_firmware.bin

Error in Line 15, in import usb.core ModuleFoundError: No module named 'usb'.

RevAngel7 commented 9 months ago

sudo python3 ./dfu.py --download 1_channel_firmware.bin worked. Seems to be an issue with the executable script, the python file is fine.