Page 1 of 1

ESP32 Unable to get IP from Server in Native_OTA

Posted: Wed Apr 10, 2019 12:30 pm
by dhananjay.sutariya
Hi ,
I'm trying to use all the code of Native_ota_example in my code . In which case, im carefully following all the necessary steps we take during native_ota example . And Running Https server.
Whilst my esp32 is getting connected to my local network as it can be seen here:
976) native_ota_example: Setting WiFi configuration SSID MYWIFI...
I (1076) phy: phy_version: 4100, 6fa5e27, Jan 25 2019, 17:02:06, 0, 0
I (1076) wifi: mode : sta (24:0a:c4:1d:34:f0)
I (1076) native_ota_example: Preparing to Connect
I (1096) native_ota_example: Connected
$ ota
I (11666) native_ota_example: Starting OTA example...
I (11666) native_ota_example: Running partition type 0 subtype 0 (offset 0x00010000)
I (11666) native_ota_example: Waiting for Wifi Event Bits
$
This event is not happening: SYSTEM_EVENT_STA_GOT_IP

Please Help

Thanks ,
Dhananjay Sutariya

Re: ESP32 Unable to get IP from Server in Native_OTA

Posted: Thu Apr 11, 2019 8:50 am
by luisonoff
I recently faced very similar problem and it was caused by our DHCP service not providing IP to some MACs or something like that. Recommend you try same code but connecting to a different wifi network just to check that it is now caused by that wifi network, for example I checked this using wifi hotspot of my smartphone.

Apart of this, I think IDF should better manage those situations where the DHCP is not giving you IP address, no idea how.

Re: ESP32 Unable to get IP from Server in Native_OTA

Posted: Thu Apr 11, 2019 5:45 pm
by fly135
Put some debug prints in the event handler for SYSTEM_EVENT_STA_DISCONNECTED. More specifically see if you are getting that event and print the reason code.

John A