Does anyone have a reliable greengrass core discovery working with ESP32?

mattsoftware wrote on June 09, 2019:

Hi. I am about to give up with trying to get this to work (it does not help that the last time I used c was at uni, but I digress).

I have a reasonable connection between my esp32 thing and iot, and the demo echo task seems to perform reliably. However when trying to run the greengrass discovery demo it somtimes works, but usualy does not. The success rate seems to be random, but I would guess that it only works once every 5-8 reboots. Something is just not working and I cant seem to figure out what it is.

I think the esp is getting the connection details correctly most of the time… but I am not sure. This is a typical run…

1 301 [IP-task] vDHCPProcess: offer c0a800bbip
I (3142) event: sta ip:, mask:, gw:
2 303 [IP-task] vDHCPProcess: offer c0a800bbip
3 304 [main] WiFi Connected to AP. Creating tasks which use network...
4 305 [main] Write certificate...
I (3162) PKCS11: Initializing NVS partition: "storage"
5 307 [main] Write device private key...
6 318 [IoT_GGD] Attempting automated selection of Greengrass device
7 1871 [IoT_GGD] About to close socket.
8 1875 [IoT_GGD] Socket closed.
9 1875 [IoT_GGD] Stack high watermark for discovery helper task: 2536.
10 2375 [IoT_GGD] About to close socket.
11 2375 [IoT_GGD] Socket closed.
12 2375 [IoT_GGD] Stack high watermark for discovery helper task: 1960.
13 2875 [IoT_GGD] About to close socket.
14 2875 [IoT_GGD] Socket closed.
15 2875 [IoT_GGD] Stack high watermark for discovery helper task: 1960.
16 3380 [IoT_GGD] About to close socket.
17 3380 [IoT_GGD] Socket closed.
18 3380 [IoT_GGD] Stack high watermark for discovery helper task: 1960.
19 3885 [IoT_GGD] About to close socket.
20 3885 [IoT_GGD] Socket closed.
21 3885 [IoT_GGD] Stack high watermark for discovery helper task: 1960.
22 4391 [IoT_GGD] About to close socket.
23 4391 [IoT_GGD] Socket closed.
24 4391 [IoT_GGD] Stack high watermark for discovery helper task: 1960.
25 4391 [IoT_GGD] GGD - Can't connect to greengrass Core
26 4391 [IoT_GGD] Auto-connect: Failed to retrieve Greengrass address and certificate.
27 4391 [IoT_GGD] ----Demo finished----

Being a newbie with c and freertos is kinda annoying as I am not able to work out if this is an issue with memory, or with freertos, or with the esp32 :confused:

Any help appreciated. Thank you.

Gaurav-Aggarwal-AWS wrote on June 17, 2019:


Apologies for the delayed response and sorry to hear that Greengrass demo is not working for you. You mentioned that it does not work reliably i.e. it works sometime and other times it does not. One of the possible reason is the weak WiFi signal. Can you try using some WiFi hotspot with better signal strength (probably by moving closer to hotspot, if possible)?