Skip to content

OTA upload failes after updated board from 3.3.0 to 3.3.1 #11855

@AbedKarmi

Description

@AbedKarmi

Board

ESP32 Dev Module

Device Description

DevKitC

Hardware Configuration

none

Version

v3.3.1

Type

Bug

IDE Name

Arduinoe IDE 2.3.6

Operating System

Windows 11

Flash frequency

40Mhz

PSRAM enabled

no

Upload speed

115200

Description

It was functioning flawlessly before the most recent update. I simply replaced setPasswordHash with setPassword and used the plain text password, and it worked perfectly on one Sketch, while it did not work for both plain text password and password hash after recent update!

Sketch

#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

const char* ssid = "xxx";
const char* password = "(xxx)";

void setup() {      
  Serial.begin(115200);

  // Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nConnected to WiFi");

  // Start OTA
  ArduinoOTA.setHostname("esp32-ota");
  //ArduinoOTA.setPassword("admin");
  ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3"); // admin

  ArduinoOTA.onStart([]() {
    Serial.println("Start updating");
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
    else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
    else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
    else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
    else if (error == OTA_END_ERROR) Serial.println("End Failed");
  });

  ArduinoOTA.begin();
  Serial.println("OTA Ready! IP: " + WiFi.localIP().toString());
}

void loop() {
  ArduinoOTA.handle();
  delay(100); // small delay to avoid watchdog
}

Debug Message

Sketch uses 1005027 bytes (51%) of program storage space. Maximum is 1966080 bytes.
Global variables use 49332 bytes (15%) of dynamic memory, leaving 278348 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\karmi\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.1\tools\espota.exe" -r -i 192.168.0.184 -p 3232 "--auth=admin" -f "C:\Users\karmi\AppData\Local\arduino\sketches\9C2507445C698FDFABD40457B1619791/sketch_sep18a.ino.bin"
Sending invitation to 192.168.0.184 
Authenticating...FAIL
12:23:44 [ERROR]: Authentication Failed
Failed uploading: uploading error: exit status 1

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions