ESP32 Unable to get IP from Server in Native_OTA

dhananjay.sutariya
Posts: 41
Joined: Thu Feb 28, 2019 12:21 pm

ESP32 Unable to get IP from Server in Native_OTA

Postby dhananjay.sutariya » Wed Apr 10, 2019 12:30 pm

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

User avatar
luisonoff
Posts: 40
Joined: Fri Feb 09, 2018 12:20 pm

Re: ESP32 Unable to get IP from Server in Native_OTA

Postby luisonoff » Thu Apr 11, 2019 8:50 am

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.

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: ESP32 Unable to get IP from Server in Native_OTA

Postby fly135 » Thu Apr 11, 2019 5:45 pm

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

Who is online

Users browsing this forum: Google [Bot] and 143 guests