[Solved] Matrix Voice & Alexa (New Version) .. authentication issue

My Matric Voice was running perfectly a week ago but when i tried to use it yesterday i was faced with a licensing expiry issue. So i decided to start from stratch and install again. I could not do it with the old version so had to go with your new version. On a new SD card, i flashed Raspbian Stretch and stated the process. I could not download your image for SDK (Etcher would not open it) so i went with the manual route. All went of up to step 6 where i received these error messages below. No need to say that my Matrix Voice and Alexa are no longer working…Can you help me?


pi@XXXX:~ $ bash startauth.sh
The refresh request failed with the response code 400. This might be due to a bad refresh token or bad client data. We will continue with getting a refresh token, discarding the one in the file.

pi@XXXX:~ $ bash startsample.sh
2018-06-03 14:58:18.670 [  1] I sdkVersion: 1.5.0
Running app with log level: DEBUG9
2018-06-03 14:58:18.694 [  1] 0 ConfigurationNode:initializeSuccess:configuration={"alertsCapabilityAgent"\:{"databaseFilePath"\:"/home/pi/db/alerts.db"}\,"certifiedSender"\:{"databaseFilePath"\:"/home/pi/db/certifiedSender.db"}\,"settings"\:{"databaseFilePath"\:"/home/pi/db/settings.db"\,"defaultAVSClientSettings"\:{"locale"\:"en-US"}}\,"notifications"\:{"databaseFilePath"\:"/home/pi/db/notifications.db"}\,"authDelegate"\:{"clientId"\:"amzn1.application-oa2-client.c07897144ff544c3b7d7b01d5f1a835b"\,"clientSecret"\:"c2e0ba887bd9b89392ba263788656afce7ad805648d38488dd1f117d8dcdff01"\,"deviceSerialNumber"\:"123456"\,"refreshToken"\:""\,"productId"\:"my_device"}}
2018-06-03 14:58:18.718 [  1] 9 MediaPlayer:createCalled
2018-06-03 14:58:18.917 [  1] 9 MediaPlayer:noOutputConversion
2018-06-03 14:58:18.922 [  1] 9 MediaPlayer:createCalled
2018-06-03 14:58:18.924 [  1] 9 MediaPlayer:noOutputConversion
2018-06-03 14:58:18.928 [  1] 9 MediaPlayer:createCalled
2018-06-03 14:58:18.930 [  1] 9 MediaPlayer:noOutputConversion
2018-06-03 14:58:18.934 [  1] 9 MediaPlayer:createCalled
2018-06-03 14:58:18.936 [  1] 9 MediaPlayer:noOutputConversion
2018-06-03 14:58:18.944 [  1] E AuthDelegate:initFailed:reason=missingConfigurationValue,key=refreshToken
startsample.sh: line 3: 12741 Segmentation fault      ./SampleApp "/home/pi/build/Integration/AlexaClientSDKConfig.json" "/home/pi/third-party/alexa-rpi/models" DEBUG9

Did you do the step where you had to login to the PI (localhost) to get a fresh token? It requires connecting with a second SSH terminal session while a script is running.


I’ve tires this but nothing happens. I am not even sure the Matrix mic works or sound coming trough.
I have tried on a different SD card the installation process the original way step 1 to 6 then change the code (as you instructed somewhere) to override the ALS configuration, then did step 5 (install MATRIX Software and Reboot) and step 6: Run Your Web Service, Sample App and Wake Word Engine
All went as I was during a few weeks ago but Alexa did not work. I get the below for the wakeword, No sound at all coming through

pi@XXX:~/Desktop/alexa-avs-sample-app $ cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && ./wakeWordAgent -e sensory
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
INFO:Initializing Sensory library | library name: TrulyHandsfree | library version: 5.0.0-beta.10.2 | model file: ../ext/resources/spot-alexa-rpi.snsr
WARNING:Library expires on: License expires on 28 Sep 2018 00:00:00 GMT
INFO:SensoryWakeWordEngine: mainLoop thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:WakeWordAgent: thread started
INFO:===> Connected to AVS client <===

Hi @helenina,

Just to check, did you follow this guide? https://www.hackster.io/matrix-labs/matrix-voice-and-matrix-creator-running-alexa-c-version-9b9d8d


Hi Yoel! Yes i did. I could not flash your sdk image because Ercher would not let me open it. So i went the manual way. I am not sure i’ve done step 3 correctly. I’ve just copy and paste the whole thing into rhe terminal. It let me carry on. I went all the way the instuctions and i had the error message. I sent a copy of the error in my first email.
Completely separate: in a different sd card, i tried again but with the instructions of the original release but with the addition of changing the alsa code as you were auggestong in a revisd instructions.
Now i am a bit lost . I do not understand why suddenly the Matrix and Alexa stopped working! I really count now on your help as i enjoyed using the Matrix voice.

I will look into this.

Please, bear in mind we are not supporting this java example app guide anymore, this guide is labeled as in “maintenance mode” by Amazon and the new C++ version is recommended instead.

Let me try to reproduce your error in step 6 and will get back to you.


Hi Yoel, ok, I will forget about the other SD card. The one with original installation.
I am looking forward to receiving your results

Thank you!

Hi! I have manage to make Alexa work. However, the sound is not coming from the speaker but from the monitor! I cannot even adjust the volume!
Can you help? why is the sound not coming from the speaker? how to change that?

Thank you

Great to hear that @helenina,

If you have a HDMI screen connected you have to setup the audio output, because the default becomes the HDMI audio. Maybe this solve it https://github.com/alexa/avs-device-sdk/issues/627

Sorry I do not understand. What do I need to do to have audio from the Pi audio Jack. I am not always using a HDMI screen but my mac via vnc.
Thank you

The proposed solution in the issue I shared is:

sudo amixer cset numid=3 1

Are you using Raspbian Stretch Lite version or Pixel version? Maybe is related to that

Hi, I am Raspbian desktop version
So I just need to go into terminal and type: sudo amixer cset numid=3 1 ?

Hi @helenina,

We checked the Alexa Hackster guide and made some updates to it using newer releases from Amazon. We also updated the fast installation image, if you want to give it a try. Is important to note that the new authentication method is different and easier, please create a new Security Profile in the Amazon Dev website following the instructions provided. Using the image makes the setup time way faster.

Thanks for you feedback. Let me know how it goes.


Hi Yoel,

I am trying with your new instructions but i am not successful. I have flashed your image on a new SD card. It worked this time. However, when i put the sd card in the Pi and when i launch the Pi i am asked for a matrix-alexa login and cannot go further. I have no idea what that is . Can you help?

Thank you

Use the default Rasbian login:

user: pi
password: raspberry

I have entered the log in and pasword but i am in terminal mode. I cannot access the normal desktop
I have : pi@matrix-alexa

What do i do next?
Are you sure you sent me the correct instructions?

Thank you

Try to type in step 6 of the hackster guide: https://www.hackster.io/matrix-labs/matrix-voice-and-matrix-creator-running-alexa-c-version-9b9d8d

If that doesn’t run Alexa, type


And post the results here so we can see the contents of the directory you are in.


Hi Sean,

I cannot do much with the SD card at the moment. I have uploaded the image via Etcher on my mac. Then i put the SD card into the PI. I was asked for a log in and password. I put Pi and raspberry. Even after this I am stuck. I cannot go onto the Pi desktop. It is all code.
So for me it is not even possible to do step 6 as you suggested. The whole thing does not seem right to me. Would there be an issue with the image?


Hi @helenina,

The problem you are seeing is because the pre-buitl image is the Raspbian Lite version that doesn’t come desktop interface, when you connect a HDMI monitor you only get the terminal access. Nevertheless, this is a fully functional system and you should be able to follow all steps, but it will required you to be comfortable with the terminal-only interface. You can give it a try and post questions here so we can help you.

If you preferer the desktop Raspbian version, please don’t use the pre-built image. Just start from a Raspbian Desktop version and follow the steps in the guide.


Step six is to type

bash ./startsample.sh

At the dollar prompt after logging in. Please try that.