ESP32 Alexa Smart Speaker

BuddyCasino
Posts: 255
Joined: Sun Jun 19, 2016 12:00 am

ESP32 Alexa Smart Speaker

Postby BuddyCasino » Tue Aug 01, 2017 7:44 pm

Finally found the time to release it. It still has quite a few bugs, but it works.
You can now ask Alexa stuff with an ESP32.

Heres the code: https://github.com/MrBuddyCasino/ESP32_Alexa

The documentation still needs a lot of work. Hope its not too cryptic.

User avatar
hassan789
Posts: 137
Joined: Thu Jun 29, 2017 2:15 am

Re: ESP32 Alexa Smart Speaker

Postby hassan789 » Fri Aug 11, 2017 3:31 am

BuddyCasino, impressive and amazing! Very nicely modularized.
This is a great project to learn HTTP/2

I see you have two different clients to manage http2 sessions, one using mbedTLS and the other using BearSSL with asio.

Few comments and questions:
1. Your asio/registry seems complex... almost like a cooperative scheduler. Was there no simpler alternative, such as FreeRTOS tasks? I am guessing you did this due to using BearSSL?

2. Did you try http2 via cURL? The Alexa documentation seems to recommend this route...

Thanks

BuddyCasino
Posts: 255
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Alexa Smart Speaker

Postby BuddyCasino » Fri Aug 11, 2017 7:17 am

Thanks. I would have been happy to have such nghttp2 examples, glad someones finds it useful. Took weeks to get it right.

At first I used FreeRTOS tasks, which was simple and clean but I needed deep stacks and that consumed too much memory. So unfortunately I had to make an event loop and get into callback hell. Its not even evented, its just busy polling.
That could be improved by making it evented and introducing proper state machines, but at that point I was exhausted.

EDIT:
> 2. Did you try http2 via cURL

I didn't try that because I suspect that it will exceed my memory limits. I might be wrong though. Also I wanted to learn the HTTP/2 protocol and how evented I/O works.

mayuresh
Posts: 2
Joined: Mon Jun 12, 2017 6:23 am

Re: ESP32 Alexa Smart Speaker

Postby mayuresh » Wed Aug 23, 2017 3:08 am

This is a really awesome work.
Do you have a SPI RAM connected to your setup/ if so, whats the size?
Also, would this code work on ESP 32 WROOM which has just 520KB RAM?

BuddyCasino
Posts: 255
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Alexa Smart Speaker

Postby BuddyCasino » Wed Aug 23, 2017 5:20 am

It works with the stock Wroom module, no extra RAM required.

leoplf
Posts: 1
Joined: Tue Feb 27, 2018 3:28 am

Re: ESP32 Alexa Smart Speaker

Postby leoplf » Wed Feb 28, 2018 6:19 am

Hi,
I find in the source from you github that you have used the PSRAM module as FIFO for the mic input and mp3 output. So, really no external RAM is needed? Or I have mistaken something else?
Thanks for your generous help.

Best Regards'
Leo.

chegewara
Posts: 585
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Alexa Smart Speaker

Postby chegewara » Wed Jun 13, 2018 8:24 am

Just a little demo
https://youtu.be/3VkszFgxXfg

Trialblazer47
Posts: 60
Joined: Mon Jun 26, 2017 5:36 am

Re: ESP32 Alexa Smart Speaker

Postby Trialblazer47 » Sat Jul 14, 2018 6:06 pm

Your project is awesome somehow I got a work to make it do in micro python. So I am looking for how ESP32 talks with AVS or Alexa? This process needs to be understood first for me. I am not sure how far I can do it in uPython.
Thanks.

chegewara
Posts: 585
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Alexa Smart Speaker

Postby chegewara » Sun Jul 15, 2018 4:35 pm


Kumar Karny
Posts: 1
Joined: Wed Aug 01, 2018 8:37 pm

Re: ESP32 Alexa Smart Speaker

Postby Kumar Karny » Wed Aug 01, 2018 8:47 pm

Your project is awesome. But every 10 minutes it's rebooting . Let me know how to fix this issue.

see log below.
I (671272) alexa: frame received: 7
Guru Meditation Error: Core 1 panic'ed (LoadStoreError)
. Exception was unhandled.
Core 1 register dump:
PC : 0x401b91cb PS : 0x00060830 A0 : 0x800ebc79 A1 : 0x3ffd0090
0x401b91cb: xorbuf at C:/esp32/ESP32_Alexa/components/bear_ssl_component/../bear_ssl/src/symcipher/
aes_ct_ctr.c:45

A2 : 0x40000000 A3 : 0x3ffd0290 A4 : 0x00000052 A5 : 0x6bf9ff52
A6 : 0x0b090f02 A7 : 0x23022003 A8 : 0x27f8404a A9 : 0x0000001f
A10 : 0x30c54e90 A11 : 0xf0f0f0f0 A12 : 0xae8626c7 A13 : 0x00050e00
A14 : 0x0e060607 A15 : 0x0708000a SAR : 0x00000010 EXCCAUSE: 0x00000003
EXCVADDR: 0x40000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff

Backtrace: 0x401b91cb:0x3ffd0090 0x400ebc76:0x3ffd00b0 0x400f4111:0x3ffd0300 0x400f435e:0x3ffd0330
0x401b8c59:0x3ffd0370 0x400e8f8b:0x3ffd03a0 0x400e93c1:0x3ffd03c0 0x400e8411:0x3ffd03e0 0x400e8441:
0x3ffd0430 0x400e7333:0x3ffd0450 0x400e73a1:0x3ffd0470 0x400e6119:0x3ffd0490 0x400d3db7:0x3ffd04c0
0x401b91cb: xorbuf at C:/esp32/ESP32_Alexa/components/bear_ssl_component/../bear_ssl/src/symcipher/
aes_ct_ctr.c:45

0x400ebc76: br_aes_ct_ctr_run at C:/esp32/ESP32_Alexa/components/bear_ssl_component/../bear_ssl/src
/symcipher/aes_ct_ctr.c:98

0x400f4111: do_ctr at C:/esp32/ESP32_Alexa/components/bear_ssl_component/../bear_ssl/src/ssl/ssl_re
c_gcm.c:118

Thanks,
Kumar

Return to “Showcase”

Who is online

Users browsing this forum: No registered users and 2 guests