HTTP server simple example

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

HTTP server simple example

Postby accacca » Thu Aug 09, 2018 3:59 pm

Good evening,
I am a newbie with espressif products, I have been studying ESP32 for a few days, for now I have only uploaded examples in my ESP32-WROOM-32D devkit.
I have a problem with the example in the "http_server/simple" folder

The ESP32 seems to register correctly with the AP and from the serial log I see that it has also obtained an IP.
The device, however, is unreachable even with a simple PING from a PC connected to the same network.

The router (MikroTik) list the device and its MAC but without IP assigned.
While I continue to study someone can help me with some ideas on where to investigate,
I attach lso the startup serial log.

Thanks in advance
Attachments
capture.txt
serial startup log
(8.83 KiB) Downloaded 809 times

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Fri Aug 10, 2018 5:57 am

Strange behaviour.
After poweroff the router, the device is adressed correctly but if I reboot the ESP32 again the same problem
Mikrotik or ESP32 problem uff!! No good day for learning ESP32...

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Mon Aug 13, 2018 8:10 am

today I did some tests with a static IP and it works
Perhaps the problem is in the DHCP?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: HTTP server simple example

Postby kolban » Mon Aug 13, 2018 8:17 pm

If it were me, I'd try a set of permutations starting with alternate access points. Many cell phones these days provide the capability to be an access point. If so, configure your ESP32 to be a station to an alternate access point and see if different symptoms show up.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Tue Aug 14, 2018 6:47 pm

I did this test before assigning a fixed IP to the ESP32.
With another AP (Ubiquiti) everything works without problem.

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

Re: HTTP server simple example

Postby fly135 » Tue Aug 14, 2018 7:58 pm

The IP assigned to your ESP32 device in the example is "192.168.1.13". You need to tell us the IP of the computer sending the ping.

John A

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Wed Aug 15, 2018 8:17 am

Deviecs are connected to the same router
ESP32 ip=192.168.1.13 connected to Wifi AP router interface
PC ip= 192.168.1.16 connected to Eth router interface

I also tried ping from a smartphone (App Ping & Net) connected in wifi to the same router (The phone IP 192.168.1.12)

There seems to be something strange in DHCP, Whit DHCP enabled ESP32 takes the IP address and terminates always the address assignment procedure correctly. But on the MikroTik side there is instead something that does not work correctly. If I check the IP lease window of the router (Suggestion from the Mikrtoik forum) I see the ESP32 MAC the expiration timer for the address but the IP field is empty. My idea is some incompatibility or imperfection in DHCP process. I should try with wireshark on linux where it seems it is possible to sniff the wifi traffic (..What I've never tried to do ...)

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Wed Aug 15, 2018 8:20 am

Sorry I forget:
Also using another esxample: simple_wifi I have the same beahvior

(How I can edit a posted message ?)

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: HTTP server simple example

Postby Ritesh » Wed Aug 15, 2018 8:50 am

accacca wrote:Sorry I forget:
Also using another esxample: simple_wifi I have the same beahvior

(How I can edit a posted message ?)
Which ESP32 IDF you are using? Because we are working on ESP32 IDF 2.0, 2.1, 3.0 and other development branch and we didn't see any issue like you have faced.

So, Would you please provide more details with sample example code so that it will be more helpful for me to provide support regarding that issue?
Regards,
Ritesh Prajapati

accacca
Posts: 33
Joined: Mon Aug 06, 2018 4:59 pm

Re: HTTP server simple example

Postby accacca » Wed Aug 15, 2018 9:43 am

Sorry for trivial question Ritesh
Where I can check the version number ?
I just started with ESP32 I think the isntalled ESP_IDF is 3.0.1 but how I can check the version ?

However I have the problem only with MicrotTik router and DHCP active.
Wiht other AP (ubiquiti) fixed IP or DHCP, or with MikroTik router but with a fixed IP in STA I don't see problems.

Who is online

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