esp8266-aws_iot icon indicating copy to clipboard operation
esp8266-aws_iot copied to clipboard

trying to connect to greengrass

Open muradali362 opened this issue 7 years ago • 0 comments

Hello,

i have sucessfully used this example to connect to aws cloud and published data it is working like a charm :) Now i have added my thing to a greengrass group added policy of greengrass to it and deployed it to my greengrass core running on raspberry pi
updated certifiates in data folder ca.der file to my cores ca.der file updated host address to ip of my greengrass core code: #include "FS.h" #include <ESP8266WiFi.h> #include <PubSubClient.h>

// Replace it with your wifi name and password const char* ssid = "tmfacility"; const char* password = "password4u"; IPAddress server(192, 168, 1, 105);

WiFiClientSecure espClient; PubSubClient client(server, 8883, espClient); // Set MQTT port to 8883 long lastMsg = 0; char msg[50];

Output is: . WiFi connected IP address: 192.168.1.114 Heap: 41032 Success to open cert file cert loaded Success to open private cert file private key loaded Heap: 35256 Attempting MQTT connection...pm open,type:2 0 failed, rc=5 try again in 5 seconds Attempting MQTT connection... failed, rc=5 try again in 5 seconds Attempting MQTT connection... failed, rc=5 try again in 5 seconds Attempting MQTT connection... failed, rc=5 try again in 5 seconds Attempting MQTT connection... failed, rc=5 try again in 5 seconds

can anyone help me what i am doing wrong

muradali362 avatar Aug 30 '18 08:08 muradali362