Chat freely about anything...

User avatar
By Random Spaceship
#92553 Hello all,

I'm making a program for an ESP8266 that will, when not connected to a WiFi network, put the ESP8266 into STA/AP mode so the user can connect to it and configure it. So far, the ESP8266 switches modes properly when connected and disconnected. However, when attempting to connect to the ESP8266's soft AP, I can connect to it, but it does not assign an IP address, which makes me think that the DHCP server isn't running. I have the same issue regardless of whether the ESP is in AP or STA/AP mode.

I might try to post an MCVE at some point, but for now I don't have the time to extract the relevant code from the rest of the project.

I'm using the Arduino Framework, compiled via PlatformIO on the ESP-01 @ 160MHz.

Do any of you have suggestions? Thanks in advance!
User avatar
By QuickFix
#92569 An ESP doesn't have a DHCP server; you'll have to set an (static) IP address to the connecting device yourself in the same address space as the ESP (which is on 192.168.4.1), for instance 192.168.4.2.

BTW. This is not an advanced users topic. :idea:
Last edited by QuickFix on Mon Oct 11, 2021 6:30 am, edited 1 time in total.
User avatar
By schufti
#92573
QuickFix wrote:An ESP doesn't have a DHCP server; you'll have to set an (static) IP address to the connecting device yourself in the same address space as the ESP (which is on 192.168.4.1), for instance 192.168.4.2.

this is bs ... just look at the "captive portal" or "wifi manager" examples which would never work if that were true :roll: