Input device could not be opened for Matrix Creator and google assistant


#1

Hello Community

This is a question about projet MATRIX Creator Running Google Assistant. I’ve followed instruction https://www.hackster.io/matrix-labs/matrix-voice-and-matrix-creator-running-google-assistant-e9751e and I arrive to step Install the Google Assistant SDK and Sample Code.

When I type “googlesamples-assistant-hotword --project_id MATRIX-CREATOR --device_model_id matrix-creator-e92d7-matrix-creator-p3l4o6” ,it show me the error

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sc
[FATAL:audio_input_stream.cc(47)] Input device could not be opened: default
Aborted

I’ve also use instructions here https://github.com/matrix-io/matrixio-kernel-modules to setup the mics.And KERNEL SETUP is well done.

Why audio Input device could not be opened ?


#2
  1. Are you able to record from default device using arecord like this?
    arecord -r 16000 -f S16_LE test.wav

  2. Can you share the output of

cat /etc/asound.conf

  1. The instructions in the Hackster guide are sufficient. So, maybe following some of the steps in the readme https://github.com/matrix-io/matrixio-kernel-modules something went wrong. What part of the readme did you follow?

Last time I tried that guide in Hackster was good, I will try again in case something changed.

Will let you know.


#3

Hi

  1. can’t record using arecord

  2. the output of cat /etc/asound.conf

  3. I typed “sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel”
    Then I made

$ curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
$ echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list


sudo apt-get update
sudo apt-get upgrade


sudo apt install matrixio-creator-init


sudo apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel git 


sudo reboot

Then I made

$ git clone https://github.com/matrix-io/matrixio-kernel-modules
cd matrixio-kernel-modules/src
make && make install

I would like add  Add in /boot/config.txt

" dtoverlay=matrixio "

But this command is already in the file config.txt.

By the way ,after install KERNEL,I would like to make Zwave Initial Setup.
But it always show me that

sudo apt-get matrixio-creator-init
E: Invalid operation matrixio-creator-init
pi@raspb:~ $ sudo apt-get matrixio-zwave-utils
E: Invalid operation matrixio-zwave-utils

Do you have the solution?


#4

Regarding this question. Where you trying to install a package? In this case you missed the install command. Should be like:

sudo apt-get install matrixio-creator-xxxx

-Yoel


#5

@bluegreen, I just tested the guide and it work! I strongly recommend you to start from a fresh SD Raspbian installation.

Let me know how it goes.

-Yoel


#6

Hi, Yoel
I re formated SD and started from a fresh card.

Then I’ve followed step by step to install
matrix-io/matrixio-kernel-modules
matrix-io/matrix-malos-zwave
matrix-io/libzwaveip

But when I run " malos_zwave" ,it showed me erros messages bellow ,and I couldn’t use zwaveoperation like ADDNODE ,LIST. Do you know why this message?

And I typed $ ./reference_client -s 192.168.1.77 , it show error bellow .
192.168.1.77 is matrix ethernet IP adress, 192.168.1.76 is Matrix wifi connection adress
Is it the same as IP of MATRIX ZIP Gateway? If not ,how we can check IP of MATRIX ZIP Gateway.

Thank you very much for your answer


#7

Hi @bluegreen,
I am a little bit confused. Are you following the Gogole Assistant guide on Hackster? I ask this because that guide does not have any ZWave setup.

-Yoel


#8

I’m encountering this error, too, after following the Hackster tutorial and then following this Shairport tutorial immediately thereafter. I went to bring up google-matrixio-assistant-hotword after a reboot to enable audio_pwm_mode=2 in /boot/config.txt and the GA stuff will no longer work.

The google-matrixio-assistant-hotword program outputs:

ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
[FATAL:audio_input_stream.cc(47)] Input device could not be opened: default

The Shairport stuff works, though.

Also, arecord fails:

$ arecord --duration 5 --rate 16000 --format S16_LE test.wav
ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
arecord: main:788: audio open error: No such file or directory

The kernel module doesn’t appear to load:

$ lsmod | grep matrix

despite:

$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
matrixio-everloop

and when I try manually

$ sudo modprobe matrix-everloop
modprobe: FATAL: Module matrix-everloop not found in directory /lib/modules/4.14.77-v7+

The module appears not to be present:

$ sudo modprobe matrix <tab>
matrix-keymap  matrix_keypad

#9

I think something went weird. I removed the Matrix modules and kernel headers, and then reinstalled the Matrix modules:

sudo apt remove matrixio-kernel-modules raspberrypi-kernel-headers
$ sudo apt install matrixio-kernel-modules
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  raspberrypi-kernel-headers
The following NEW packages will be installed:
  matrixio-kernel-modules raspberrypi-kernel-headers
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.1 MB/16.1 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf raspberrypi-kernel-headers armhf 1.20180924-1 [16.1 MB]
Fetched 16.1 MB in 35s (459 kB/s)
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 43495 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20180924-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20180924-1) ...
Selecting previously unselected package matrixio-kernel-modules.
Preparing to unpack .../matrixio-kernel-modules_0.1.4_armhf.deb ...
Unpacking matrixio-kernel-modules (0.1.4) ...
Setting up raspberrypi-kernel-headers (1.20180924-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.71+
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.71-v7+
Setting up matrixio-kernel-modules (0.1.4) ...
Enabling firmware loading at startup

Creating symlink /var/lib/dkms/matrixio/0.1/source ->
                 /usr/src/matrixio-0.1

DKMS: add completed.
Error! echo
Your kernel headers for kernel 4.14.77-v7+ cannot be found at
/lib/modules/4.14.77-v7+/build or /lib/modules/4.14.77-v7+/source.
dpkg: error processing package matrixio-kernel-modules (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 matrixio-kernel-modules
E: Sub-process /usr/bin/dpkg returned an error code (1)

OK, that’s pretty strange!

$ ls /lib/modules/4.14.77-v7+
kernel         modules.alias.bin  modules.builtin.bin  modules.dep.bin  modules.order    modules.symbols
modules.alias  modules.builtin    modules.dep          modules.devname  modules.softdep  modules.symbols.bin

Huh.


#10

A previous kernel version’s headers appear to be present, though:

$ ls /lib/modules/4.14.71-v7+/
build   modules.alias      modules.builtin      modules.dep      modules.devname  modules.softdep  modules.symbols.bin
kernel  modules.alias.bin  modules.builtin.bin  modules.dep.bin  modules.order    modules.symbols

#11

I think the headers package is out of sync with the kernel package somehow.

$ dpkg-query -L raspberrypi-kernel-headers | tail -n 2
/lib/modules/4.14.71+/build
/lib/modules/4.14.71-v7+/build