[Solved] Matrix-creator-hal not work

Sorry for the slow reply… getting similar error as freedomrock

-devices/fpga_info
IDENTIFY = 0
VERSION = 0

Hi,

For all you having problems getting HAL to work, can you try the installation steps in this video (also note there is a link with all the commands used).

Please, let me know how it goes.

1 Like

Well I tried that and got the same results. No joy from the LEDs, Zero and NaN from sensors and floating point error from the micarray apps.
For status LEDs, I have 2 blue on top and one blue on the bottom of Matrix.
Note: I am using the Matrix Creator, but I think the process is the same.
Also, I had this working before, mics, LEDs and all the sample code; but I moved it from home to lab and that’s when I started to have issues.

Did that as well and am getting the same results as freedomrock… Thought i was never able to get it to work

So, working before you moved it to the lab? Can you share if you are using the same power supply.
Also, could you test starting from scratch or maybe testing again in your house to see if you can find the root cause.

Yes same power supply …This is what i have tried

  1. Running programs from all three layers
  2. full power down and reboot
  3. Changing from one RasPi to another (moving Matrix and SD card)
  4. Reinstall of Matrix system
  5. Installing Matrix system on other RasPi (so different SD card but same Matrix Creator)
  6. Fresh Raspian image burn and fresh install of the Matrix system
  7. Reading several blogs and implementing given instructions
    The only thing that I have not done is to reprogram the FPGA, I tried following instructructions on how to do this and got this error:
    Can’t find description for a cable named matrix_pi
    // Thank you for the help and quick response btw

matrix_creator is a known cable so I tried this:
sudo xc3sprog -c matrix_creator firmware-0.8/blob/system.bit -p 1

And the response was this:
No JTAG Chain found

Hello @freedomrock and @whilom ,

  1. Verify the source list:
$ cat /etc/apt/sources.list.d/matrixlabs.list 
deb https://apt.matrix.one/raspbian stretch main
  1. Verify matrixio packages:
$ dpkg -l | grep matrix
ii  libmatrixio-creator-hal:armhf   0.2.0                        armhf        Hardware Abstraction Layer for MATRIX.
ii  libmatrixio-malos:armhf         0.1.2                        armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-protos:armhf        0.1.1                        armhf        Protocolbuffers for MATRIX abstraction layer
ii  matrixio-creator-init           0.4.1                        armhf        Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii  matrixio-malos                  0.3.0                        armhf        Allows queries to MATRIX Creator hardware via ZMQ.
ii  matrixio-openocd                1.0.1                        armhf        Open on-chip JTAG debug solution for ARM and MIPS systems
ii  matrixio-protobuf               3.4.0                        armhf        Protocol Buffers - Google's data interchange format. (From GRPC 3.4.0)
ii  matrixio-xc3sprog               1.1.1                        armhf        Spartan3, XCF and CPLD JTAG programmer and other utilities.

Now we need to test the status of the FPGA, could you run:

$ sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash

If all of the scripts go well, you could read the version of the software in the FPGA:

  • MATRIX Voice
$ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info 
IDENTIFY = 6032bad2
VERSION = 10004
  • MATRIX Creator
$ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info 
IDENTIFY = 5c344e8
VERSION = 10005

I am looking forward to your results,

Thank You

Kevin Patino

Kevin, thank you for your assistance.
Almost there, it failed on FPGA status. Here are the results of my steps:

Source list:


 pi@raspberrypi:~$ cat /etc/apt/sources.list.d/matrixlabs.list
 deb https://apt.matrix.one/raspbian stretch main

Verify matrixio packages:


$ dpkg -l | grep matrix
ii  libmatrixio-creator-hal:armhf         0.2.0                                armhf        Hardware Abstraction Layer for MATRIX.
ii  libmatrixio-malos:armhf               0.1.2                                armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-malos-dev                 0.1.2                                armhf        Libraries of MATRIX abstraction layer for MOS
ii  libmatrixio-protos:armhf              0.1.1                                armhf        Protocolbuffers for MATRIX abstraction layer
ii  libmatrixio-protos-dev                0.1.1                                armhf        Protocolbuffers headers for MATRIX abstraction layer
ii  libswresample2:armhf                  7:3.2.10-1~deb9u1+rpt1               armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  matrixio-creator-init                 0.4.1                                armhf        Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii  matrixio-malos                        0.3.0                                armhf        Allows queries to MATRIX Creator hardware via ZMQ.
ii  matrixio-malos-wakeword               0.1.4                                armhf        Voice commands for MATRIX Creator hardware via ZMQ callback.
ii  matrixio-malos-zigbee                 0.1.3                                armhf        Allows queries to MATRIX Creator hardware via ZMQ.
ii  matrixio-openocd                      1.0.1                                armhf        Open on-chip JTAG debug solution for ARM and MIPS systems
ii  matrixio-pocketsphinx                 0.1.0                                armhf        This is PocketSphinx, one of Carnegie Mellon University's open source large
ii  matrixio-protobuf                     3.4.0                                armhf        Protocol Buffers - Google's data interchange format. (From GRPC 3.4.0)
ii  matrixio-sphinxbase                   0.1.0                                armhf        This is PocketSphinx, one of Carnegie Mellon University's open source large
ii  matrixio-xc3sprog                     1.1.1                                armhf        Spartan3, XCF and CPLD JTAG programmer and other utilities.

test the status of the FPGA,


$ sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash
**** Could not program FPGA

Version of the software in the FPGA:


~$ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info
IDENTIFY = ffffffff
VERSION = ffffffff

Hello @freedomrock,

It seems a Hardware issue, as I read in your previous post:

Your board works before. I am going to send a Direct Message in order to help you with your board.

Also could you check the quality of the Power Supply.

Regards,

Kevin Patino

For power supply, not sure how to completely check the quality. But it is a 2-2.5 amp and monitor works with it attached) I know that weak power supplies will have issues with accessories) I have 2 RasPi 3s so I went ahead and swapped with the newer power supply.
After reboot … same results

Hi Kevin,

Thanks for all the help. I’m very close too though I may have the same problem as freedomrock

cat /etc/apt/sources.list.d/matrixlabs.list 
deb https://apt.matrix.one/raspbian stretch main

Verify matrix-io packages

dpkg -l | grep matrix
ii  libmatrixio-creator-hal:armhf          0.2.0                          armhf        Hardware Abstraction Layer for MATRIX.
ii  libmatrixio-creator-hal-dev            0.2.0                          armhf        Hardware Abstraction Layer for MATRIX (headers)
ii  libswresample-dev:armhf                7:3.2.10-1~deb9u1+rpt1         armhf        FFmpeg library for audio resampling, rematrixing etc. - development files
ii  libswresample2:armhf                   7:3.2.10-1~deb9u1+rpt1         armhf        FFmpeg library for audio resampling, rematrixing etc. - runtime files
ii  matrixio-creator-init                  0.4.1                          armhf        Install scripts that can program the MATRIX Creator FPGA and SAM3 IMU.
ii  matrixio-openocd                       1.0.1                          armhf        Open on-chip JTAG debug solution for ARM and MIPS systems
ii  matrixio-xc3sprog                      1.1.1                          armhf        Spartan3, XCF and CPLD JTAG programmer and other utilities.

FFPGA

sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash
**** Could not program FPGA

Version of FPGA:

sudo /usr/share/matrixlabs/matrixio-devices/fpga_info
IDENTIFY = 0
VERSION = 0

Hi @whilom,

It seems a Hardware Issue, We will contact you via Direct Message.

Respect of this thread, I will mark it as RESOLVED.

Thank You,

Kevin Patino.

@kevindpatino, I am having similar issue as @freedomrock

~$ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info
IDENTIFY = ffffffff
VERSION = ffffffff

and malos service status also seems to be failing.

pi@raspberrypi:~ $ sudo systemctl status matrixio-malos.service
● matrixio-malos.service - Matrix Abstraction Layer for OS
   Loaded: loaded (/lib/systemd/system/matrixio-malos.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Wed 2018-02-28 04:01:52 UTC; 6min ago
  Process: 1511 ExecStart=/usr/bin/malos (code=killed, signal=FPE)
 Main PID: 1511 (code=killed, signal=FPE)

Feb 28 04:01:52 raspberrypi malos[1511]: **************
Feb 28 04:01:52 raspberrypi malos[1511]: You can query specific driver info using port 20012.
Feb 28 04:01:52 raspberrypi malos[1511]: Registered driver IMU with port 20013.
Feb 28 04:01:52 raspberrypi malos[1511]: Registered driver Humidity with port 20017.
Feb 28 04:01:52 raspberrypi malos[1511]: Registered driver Everloop with port 20021.
Feb 28 04:01:52 raspberrypi malos[1511]: Registered driver Pressure with port 20025.
Feb 28 04:01:52 raspberrypi malos[1511]: Registered driver UV with port 20029.
Feb 28 04:01:52 raspberrypi systemd[1]: matrixio-malos.service: Main process exited, code=killed, status=8/FPE
Feb 28 04:01:52 raspberrypi systemd[1]: matrixio-malos.service: Unit entered failed state.
Feb 28 04:01:52 raspberrypi systemd[1]: matrixio-malos.service: Failed with result 'signal'.

Please help!!

Hola @Manu

Could you try with: MATRIX Creator - Voice Hardware Test

Regards,

Kevin Patino

@kevindpatino Thank you for the quick response.

I have very little experience with PI, Linux and Matrix. I’ve been having trouble getting it to work with various results each time.

But yesterday night when I went home, I tried running the Alexa sample app and that sort of fixed most of my issues. I believe installing libmatrixio-creator-hal and libmatrixio-creator-hal-dev helped.

I did try the hardware test you suggested and everything looks good.

pi@raspberrypi:~ $ sudo /usr/share/matrixlabs/matrixio-devices/matrix-init.bash
*** MATRIX Voice has a updated firmware
*** MATRIX Voice initial process has been launched
pi@raspberrypi:~ $ sudo /usr/share/matrixlabs/matrixio-devices/fpga_info 
IDENTIFY = 6032bad2
VERSION = 10006

But I do have some issues. I am not quite sure if it is really the matrix voice issue or just my raspbian.

When I record voice with arecord, its creating the wav file. But if I play that recorded wav file with aplay, I have mixed results. Playing with the analog device, its playing fine. But If I chose one of the connected USB speakers its not.

pi@raspberrypi:~ $ arecord -D mic_channel8 -r 16000 -f S16_LE test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
^CAborted by signal Interrupt...
pi@raspberrypi:~ $ aplay -D hw:0,0 test2.wav 
Playing WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
pi@raspberrypi:~ $ aplay -D hw:2,0 test2.wav
Playing WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
aplay: set_params:1305: Channels count non available

Is this something you might be help me with?

Also, I have some trouble getting matrix voice as an input device for webrtc on chromium browser. I have set matrix voice mic_channel8 as my default input device (arecord work with defaults just fine). My project is to get SIP working from browser using SIPJS. I could use one of the connected USB mics for this and it work fine. But if I set the mic_channel8 as default input, its not working. I googled and I do not see any one using matrix voice for this purpose.

Hello @Manu

Great, you don’t have a Hardware issue :slight_smile:

  1. If you have mixed results between analog device and USB device, it means that the issue is on the playback side. So, you need to check the support for your USB device.

Maybe if you check the kernel log with dmesg you could see if something is happening.

  1. MATRIX Voice has 8 physical microphones, enumerated from 0 to 7, the microphone 8 is a virtual microphone (beamformed). Now, this implementation is unstable, we are working on it now. So, for now, I will recommend using a physical microphone as default input device.

If you have more questions or doubts, could you create a new thread?, this one is marked as SOLVED. We could discuss in a clean thread and share it with the community :slight_smile:

Best Regards,

Kevin Patino

Thank you @kevindpatino, I’ve created a new topic for this Matrix Voice / Creator as input device on chromium.