Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

connection error code
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

connection error code

by cbfraser on Sat May 30, 2020 5:21 pm

a client that was working now on startup cycles through connect/subscribe/disconnect for about 17 iterations and then fails with the connect with error code 6. Where can I find the error codes and thus work out a recovery. And is it possible to find why the disconnect happens, because that triggers the multiple reconnects and subscriptions that eventually cause the code 6 rejection. The monitor page shows the connect/disconnect sequence but no errors.

Sometimes the client connects successfully and can go 12 hours or more - then rapid disconnect/connect followed by code 6

cbfraser
 
Posts: 8
Joined: Sun Apr 05, 2020 8:16 pm

Re: connection error code

by Systembolaget on Sun May 31, 2020 7:47 am

Depends on which connection you're referring to...

Adafruit WiFiNINA fork error codes:

// WL_NO_SHIELD = 255
// WL_IDLE_STATUS = 0
// WL_NO_SSID_AVAIL = 1
// WL_SCAN_COMPLETED = 2
// WL_CONNECTED = 3
// WL_CONNECT_FAILED = 4
// WL_CONNECTION_LOST = 5
// WL_DISCONNECTED = 6

Adafruit MQTT fork error codes:

case 1: Serial.println("Wrong protocol"); break;
case 2: Serial.println("ID rejected"); break;
case 3: Serial.println("Server unavailable"); break;
case 4: Serial.println("Bad username/password"); break;
case 5: Serial.println("Not authenticated"); break;
case 6: Serial.println("Failed to subscribe"); break;
default: Serial.println("Connection failed"); break;

Systembolaget
 
Posts: 251
Joined: Wed Mar 08, 2017 1:01 pm

Please be positive and constructive with your questions and comments.