ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Wed Jan 16, 2019 10:03 am

Hello,

I try to configure ESP32 Lyra MSC as Alexa box.

Right now I hang at the command:
make -j 8 flash VOICE_ASSISTANT=<alexa/gva/dialogflow> monitor

And have no idea what to put into <alexa/gva/dialogflow>. Where I can find it?

Is it necessary to register Lyra at Amazon VS?
I made there a registration for an other device, can the credentials be used with Lyra?

How the security credentials of AVS will be integrated into the Lyra installation?

Is an Android app necessary for this?

Many thanks for your help and best regards
Walter

ESP_Amit
Posts: 16
Joined: Mon Sep 24, 2018 12:43 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby ESP_Amit » Wed Jan 16, 2019 11:15 am

Hi Walter,

If you want to build and run Alexa app, you can use command
make -j8 flash VOICE_ASSISTANT=alexa monitor
If you want to build Google Voice Assistant, you can use
make -j8 flash VOICE_ASSISTANT=gva monitor
If you want to build Dialogflow, you can use
make -j8 flash VOICE_ASSISTANT=dialogflow monitor

You do not have to register LyraT board on Amazon portal to run Alexa with the SDK.

By security credentials, do you mean you Amazon account credentials? If so, when you start provisioning with Android/iOS app, app will perform OAuth2 with Amazon's authorisation server and will transfer tokens received from Amazon to the device over the same provisioning session, which will be used by the device for all subsequent queries to Alexa.

You need Android/iOS app for the initial provisioning and authentication.

Hope I have answered your questions.

Thanks,
Amit

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Wed Jan 16, 2019 3:44 pm

Hello Amit,

Many thanks for your quick replay !
I will test it immediately.

If one register a device at AVS, they provide security credentials. I got some for my Raspberry Pi and put them in during software setup.

Best regards
Walter

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Wed Jan 16, 2019 4:14 pm

Hello Amit,

During the command 'make -j 8 flash VOICE_ASSISTANT=alexa monitor' I got the following error message:

CC build/driver/rtc_module.o
CC build/http_server/src/httpd_uri.o
/home/walter/esp-avs-sdk/components/httpc/httpc.c: In function 'http_renew_session':
/home/walter/esp-avs-sdk/components/httpc/httpc.c:497:13: error: unknown field 'use_global_ca_store' specified in initializer
.use_global_ca_store = true,
^
AR build/jsmn/libjsmn.a
/home/walter/esp/esp-idf/make/component_wrapper.mk:285: recipe for target 'httpc.o' failed
make[1]: *** [httpc.o] Error 1
/home/walter/esp/esp-idf/make/project.mk:468: recipe for target 'component-httpc-build' failed
make: *** [component-httpc-build] Error 2
make: *** Waiting for unfinished jobs....
CC build/http_server/src/httpd_parse.o
CC build/http_server/src/httpd_sess.o

In the code nothing seems wrong:

httpc.c:497:

if (strncmp(httpc->host, url + u.field_data[UF_HOST].off, u.field_data[UF_HOST].len) ||
(httpc->is_tls != is_url_tls(url, &u))) { /* We need a new connection. */
http_connection_delete(httpc);
esp_tls_cfg_t tls_cfg = {
.use_global_ca_store = true,
};
httpc = http_connection_new(url, &tls_cfg);
if (!httpc) {
return NULL;
}
}

Any idea?
Best regards
Walter

ESP_Amit
Posts: 16
Joined: Mon Sep 24, 2018 12:43 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby ESP_Amit » Mon Jan 21, 2019 1:09 pm

Hi Walter

Sorry for the delayed reply.
Please apply couple of patches present in esp-idf-patches directory in esp-va-sdk repo, on esp-idf repo.

Thanks,
Amit

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Wed Jan 23, 2019 11:11 am

Hello Amit,

Many thanks for your replay.
I have repeat the patch section in the installation advice, but am not sure, whether this was right.
There has been no change in the error message.
Because I am (unfortunately) no Linux expert, what I have to do in order to implement the new patches.

BTW: Is there a kind of prebuild environment available, in which I have to input my AVS credentials and
then flash the ESP?

Many thanks again for your kind support.
Best regards
Walter

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

[Solved] Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Sat Jan 26, 2019 10:54 am

Hello Amit,

I have setup a new VM with Ubuntu 16.04 and repeated the procedure very carefully.

Now the ESP has been flashed successfully!

Many Thanks again for your support.

Best regards
Walter

PS. Ok, now I am hanging at the device authorization, but this is an other story.

ESP_Amit
Posts: 16
Joined: Mon Sep 24, 2018 12:43 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby ESP_Amit » Mon Jan 28, 2019 7:47 am

Hi Walter,

That's good to hear.

To answer your previous query regarding flashing pre-built environment for AVS credentials, unfortunately, there's no such mechanism in place. The only way to provide your credentials to the device right now is via Android/iOS app.

And if you are hung at device authorisation, I think your device might already have WiFi credentials, and hence it doesn't wait for app based configuration (which provides both, WiFi and AVS credentials). Please try erasing the NVS partition of your device (either via IDF's esptool utility or by using `nvs-erase` command on device console) and rebooting it. It would then wait for app based configuration which could provide new WiFi and AVS creds.

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Tue Jan 29, 2019 7:39 pm

Hello Amit,

Many thanks for your reply.
I will test your solution and will report.

Best regards
Walter

walt22
Posts: 18
Joined: Thu Dec 24, 2015 4:47 pm

Re: ESP32 Lyra MSC: How to get <alexa/gva/dialogflow> ?

Postby walt22 » Wed Jan 30, 2019 10:52 am

Hello Amit,

Thanks to your support, I make progress and am right now at this point:

I (xxx) conn_mgr_prov: Provisioning started with :
service name = ESP-Alexa-xxxx
service key =

You can use either the Android or iOS apps (links below) to provision your device to the desired Wi-Fi Access Point and associate the user's Amazon account with the device.

Android
iOS

And now, what to do with these Android and IoS links. For Android I find some source and binaries. Do you expect, one should install now development systems in order to implement apps? Or is or will be a ready to go app available in the Google Play or Apple store?
I am still confused.

Best regards
Walter

Who is online

Users browsing this forum: No registered users and 33 guests