Skip to content

httpupdate fails when WiFi is configured #11029

@AcuarioCat

Description

@AcuarioCat

Board

ESP32

Device Description

Custom hardware

Hardware Configuration

I2C devices

Version

v3.0.7

IDE Name

Visual Studio

Operating System

Windows

Flash frequency

40MHz

PSRAM enabled

no

Upload speed

91200

Description

When WiFi is configured with an IP, Gateway and subnet the http update code fails and returns
HTTP_UPDATE_FAILED Error (-1): HTTP error: connection refused

When WiFi is configured for dhcp (no configuration applied via WiFi.config(..)) it works correctly.

I have set the ip, gateway and subnet to the same values as reported when dhcp is used but the httpupdate still fails.
The update only fails when WiFi is configured.

Sketch

//if (!WiFi.config(localIP, localGateway, subnet)) {
        //    Serial.println("STA Failed to configure");
        //    apWifi = true;
        //}

        WiFi.begin(ssid.c_str(), pass.c_str());

        Serial.print("Connected to ");
        Serial.println(WiFi.SSID());
        Serial.print("IP address: ");
        Serial.println(WiFi.localIP());
        Serial.print("GW address: ");
        Serial.println(WiFi.gatewayIP());
        Serial.print("SN address: ");
        Serial.println(WiFi.subnetMask());

Debug Message

Connected to Terrapico
IP address: 192.168.0.194
GW address: 192.168.0.1
SN address: 255.255.255.0

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions