Skip to content

NetworkClient localIP() always returns IPAddress(0,0,0,0) #9843

Closed
@ayushsharma82

Description

@ayushsharma82

Board

ESP32 Dev Module

Device Description

Wemos D1 Mini ESP32 Board

Hardware Configuration

Bare Board

Version

v3.0.1

IDE Name

Arduino IDE 2

Operating System

macOS 14.5

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

115200

Description

NetworkClient class in ESP32 Arduino Core v3.0.1 always returns IPAddress(0,0,0,0) via localIP() method regardless of which interface is used (AP / STA / AP_STA ).

This was diagnosed as part of my feature request PR: #9842 . The ON_STA_FILTER and ON_AP_FILTER didn't work as intended because localIP was always returned as IPAddress(0,0,0,0).

Sketch

Ref: https://github.com/espressif/arduino-esp32/blob/3.0.1/libraries/Network/src/NetworkClient.cpp#L604

Debug Message

`IPAddress(0,0,0,0)` is returned instead of actual local IP.

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