-
Notifications
You must be signed in to change notification settings - Fork 82
MKR1000 mqtt example failed, error code -2 #34
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
Comments
Hi I've the same issue: Hardware: Software:
The MQTT-Client returns Error -2, that means (Connection refused by server). Thanks. |
Hi 👋 can you please provide a minimal code which demonstrates the problematic behaviour? |
HI Here is the Example-Code with changed objects for TLS-Connection to test.mosquitto.org:8883 Zip-File containes
Thanks. Greetz and happy easter. |
Hi. I spoke with @Rocketct who took a look at your code and he suggests to take a look at https://github.com/arduino/ArduinoCloudProviderExamples which contains examples when one wants to use TLS/SSL with MQTT. |
Hi, Anyway, thank you for your help, I appreciate it. |
Hi @realonedoe 👋
-BearSSLClient sslClient(wifiClient);
+BearSSLClient sslClient(wifiClient, true); |
Good morning @realonedoe 👋 I'm closing this now, if you need anything else please just reopen this issue. |
Hi, I've tried the example provided in this library, it connects well to my wifi but I cant seem to connect to the broker (I've tried google iot core and aws iot core, but none also works and return the same error). It always returns error code -2.
Board version: Arduino SAMD Boards 1.8.6
Firmware: WINC1501 Model B (19.6.1)
The text was updated successfully, but these errors were encountered: