Skip to content

ESP32 AP Mode Local IP #6270

@Fideus

Description

@Fideus

Board

ESP32

Device Description

Custom Board

Hardware Configuration

not relevant

Version

v1.0.6

IDE Name

Arduino

Operating System

Windows 10

Flash frequency

80

PSRAM enabled

no

Upload speed

921600

Description

Hello all,

I got a Problem Setting up an Access Point. there seems to be an DHCP server starting at Address x.x.x.241. This will cause an Problem if setting up the local IP in this range, like the example below.
Is there a option that this would be possible?
For my actual project the local IP Address could be changed by an user, and so this could cause problems.
Actual it works if I limit the local IP to x.x.x.240 But it would me more flexible if this isn't necessarry

Sketch

#include <WiFi.h>

IPAddress local_IP(192,168,1,254);
IPAddress gateway(192,168,1,9);
IPAddress subnet(255,255,255,0);

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

  Serial.print("Setting soft-AP configuration ... ");
  Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed!");

  Serial.print("Setting soft-AP ... ");
  Serial.println(WiFi.softAP("ESPsoftAP_01") ? "Ready" : "Failed!");

  Serial.print("Soft-AP IP address = ");
  Serial.println(WiFi.softAPIP());
}

void loop() {}

Debug Message

Setting soft-AP configuration ... Failed!
Setting soft-AP ... Ready
Soft-AP IP address = 192.168.1.254

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions