Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to connect to greengrass #10

Open
muradali362 opened this issue Aug 30, 2018 · 0 comments
Open

trying to connect to greengrass #10

muradali362 opened this issue Aug 30, 2018 · 0 comments

Comments

@muradali362
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant