FreeOurToes wrote on December 12, 2018:
Hi,
I have problems connecting to the greengrass device.
I have functional greengrass core with multiple devices on it and successfully sending data between each other.
I wanted to connect esp32 to it.
My steps were: Created new thing inside greengrass group by adding device. Used 1 click configurations etc. I downloaded certificates. Used CertificateConfigurator.html to create aws_clientcredential_keys.h . Setup endpoint and wifi settings. All setup was done using a cloned freertos repo.
I redeployed greengrass core which included new esp32 device thing.
I successfully, did MQTTEchoDemo. Device was publishing to the cloud.
But when I comment out mqttechodemo and un-commented greengrass discovery demo. It fails to connect.
Did I missed any steps? I am not sure where things are going wrong.
Thanks
This is the output from serial after WiFi connection established.
3 303 [main] WiFi Connected to AP. Creating tasks which use network...
4 304 [main] Write code signing certificate...
I (3140) PKCS11: Initializing SPIFFS
I (3150) PKCS11: Partition size: total: 52961, used: 2761
5 306 [main] Write device private key...
I (3270) PKCS11: Initializing SPIFFS
6 323 [main] Key provisioning done...
7 323 [IoT_GGD] Attempting automated selection of Greengrass device
I (3460) PKCS11: Initializing SPIFFS
I (3460) PKCS11: Initializing SPIFFS
I (3560) PKCS11: Initializing SPIFFS
I (3560) PKCS11: Initializing SPIFFS
I (3570) PKCS11: Initializing SPIFFS
I (4340) wifi: pm start, type:0
I (5440) PKCS11: Initializing SPIFFS
8 1248 [IoT_GGD] About to close socket.
9 1250 [IoT_GGD] Socket closed.
10 1250 [IoT_GGD] Stack high watermark for discovery helper task: 2620.
11 1750 [IoT_GGD] About to close socket.
12 1750 [IoT_GGD] Socket closed.
13 1750 [IoT_GGD] Stack high watermark for discovery helper task: 2092.
14 2254 [IoT_GGD] About to close socket.
15 2254 [IoT_GGD] Socket closed.
16 2254 [IoT_GGD] Stack high watermark for discovery helper task: 2092.
17 2761 [IoT_GGD] About to close socket.
18 2761 [IoT_GGD] Socket closed.
19 2761 [IoT_GGD] Stack high watermark for discovery helper task: 2092.
20 2761 [IoT_GGD] GGD - Can't connect to greengrass Core
21 2761 [IoT_GGD] Auto-connect: Failed to retrieve Greengrass address and certificate.
22 2761 [IoT_GGD] ----Demo finished----