esp_wifi_repeater icon indicating copy to clipboard operation
esp_wifi_repeater copied to clipboard

make the ESP an AP and disable DHCP

Open odaiayoob opened this issue 5 years ago • 9 comments

Hello,

I need to use the esp as wifi extender or access point, without DHCP, how can i do that ? i need to disable DHCP and set static IP, GW, subnet and DNS, then all IPs come from main DHCP

odaiayoob avatar Mar 13 '19 19:03 odaiayoob

Currently you cannot disable the DHCP server, but bou are free to choose static IPs in the APs subnet.

As the esp_wifi_repeater is in fact a (NAT-)Router, a central DHCP server won't work. Each AP has to span its own subnet and DHCP broadcast requests are not even forwarded across router boundaries.

martin-ger avatar Mar 13 '19 22:03 martin-ger

Is it possible to add a new feature to disable DHCP server? if it's possible, Can you tell me where to start?

odaiayoob avatar Mar 13 '19 22:03 odaiayoob

If you can compile the sources with the esp-open-sdk, you can simply add a wifi_softap_dhcps_stop() after line 3688 in user_main.c.

But as said before: you can use static IPs in AP subnets even without modification: the DHCP server only assigns addresses in the range from 2-128. Anything from 129-254 is free for static assigned IPs.

martin-ger avatar Mar 14 '19 09:03 martin-ger

I believe that odaiayoob mean to use IP in the same subnet of main DHCP.

zoomx avatar Mar 14 '19 14:03 zoomx

@zoomx Correct,

I need to make my ESP an access point only and I need to set fixed IP for it from main DHCP, and any device connected to this Access point get the IP from main DHCP,

odaiayoob avatar Mar 14 '19 15:03 odaiayoob

I just read this post, after write a new issue... i want to do the same thing.. use only my main dhcp and disable esp dhcp...

defaliz avatar Jan 18 '22 20:01 defaliz

what your wanting is a transparent bridge mode so the extender is invisible on the network not doing nat.

geofrancis avatar Jan 18 '22 20:01 geofrancis

Transparent bridge does not work, sorry.

martin-ger avatar Jan 18 '22 21:01 martin-ger

thank for your reply Martin and your great work ! regards

defaliz avatar Jan 19 '22 12:01 defaliz