-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
conclusion: declinedWill not be worked onWill not be worked ontopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: enhancementProposed improvementProposed improvement
Description
Hi,
Which MQTT version does the library currently support? We are struggling our heads to know why our arduino nano 33 iot always get a connection refused when connecting to EMQX 4.x broker but not when connecting to mosquito.
const char broker[] = "test.mosquitto.org";
int port = 1883;
WiFiClient wifiClient;
MqttClient mqttClient(wifiClient);
void setup() {
Serial.begin(1000000);
while (!Serial);
while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
// failed, retry
Serial.print(".");
delay(5000);
}
Serial.println("Device connected to the network");
if (!mqttClient.connect(broker, port)) {
Serial.print("MQTT connection failed! Error code = ");
Serial.println(mqttClient.connectError());
while (1);
}
Serial.println("You're connected to the MQTT broker");
}
that ends up with a succesfully connection to "test.mosquitto.org".
But if we use for example:
IPAddress broker(192, 168, 1, 33);
then we always ends up with an unsuccessfully connection. We have no idea why... port 1883 is open and accessible from local network but EMQX 4.x broker supports MQTT 3.1.1 and 5.0
Could be that the problem? Any other idea?
Thank you so much in advance
tysonmatanich
Metadata
Metadata
Assignees
Labels
conclusion: declinedWill not be worked onWill not be worked ontopic: documentationRelated to documentation for the projectRelated to documentation for the projecttype: enhancementProposed improvementProposed improvement