Open cjacky475 opened 2 years ago
I'm having the same problem... it only started this week, it worked perfectly before this week.
boolean mqreconnect()
{
digitalWrite(LED, 0);
Serial.printf("Client %s connecting to EMQX\n", client_id.c_str());
digitalWrite(LED, 1);
if (client.connect(client_id.c_str(), mqttu.c_str(), mqttk.c_str(), lwt.c_str(), 0, true, lwm.c_str()))
{
// Once connected, publish an announcement...
Serial.println("EMQX connected");
client.publish(topic.c_str(), "{\"DevID\": \"MakeS\", }");
// ... and resubscribe
client.subscribe(topic.c_str());
}
else
{
Serial.print("EMQX connection failed with state ");
Serial.print(client.state());
Serial.println();
}
return client.connected();
}
And it's still failing while I type.
Sorry, my problem was caused by bad power supply, the problem was gone after I changed to a better power supply.
Nope, it started failing again, I even load my program to a new board, and got the same result.
@Rainbrony, did you solve it?
I changed to RTOS SDK, it still cannot connect to EMQX with my computer's USB, but work great with my power bank, 充电宝。
I have the same issue, any progress on this @cjacky475?
@tonykambo, I couldn't find anything that would make my code connect to AWS IoT Core. Not sure what to do.
Hello, I am trying to connect to AWS IoT on my ESP8266, but it's not connecting. I've checked the credentials, everything is fine. I see no logs in AWS IoT. I can connect with same credentials from my ESP32, but I use
MQTTClient.h
on ESP32 and I set credentials differently there viasetCertificate
,setPrivateKey
and etc. which is not available on ESP8266Logs:
Code: