ESP32 Web Server Question?

mbalzano
Posts: 4
Joined: Tue Mar 27, 2018 10:28 am

ESP32 Web Server Question?

Postby mbalzano » Tue Mar 27, 2018 10:57 am

I built simple web server using the WIFI Code in the Arduino IDE just to open and close my garage door.
I used MIT APP inventer2 to make an app to control the ESP32 server.
It works great for about 24 hours then it seems to log off my network and I have to reboot the ESP32 to get it working again.
Any ideas would be helpful?

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

Re: ESP32 Web Server Question?

Postby kolban » Tue Mar 27, 2018 3:28 pm

When the ESP32 runs, it can generate log/diagnostic messages. These can enabled through a Make Menuconfig option to set the verbosity level required. From the story, I am hearing that something is working for a period of time ... and then it doesn't ... This would imply to me that some state has changed in the environment. At a minimum, we would have to ask "What does the ESP32 thing has changed?". For example, did the access point disconnect it? To acertain that, we would want to enable logs and capture them for the duration in question and then once a failure has been detected, go back through the logs and "see what we can find".
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

mbalzano
Posts: 4
Joined: Tue Mar 27, 2018 10:28 am

Re: ESP32 Web Server Question?

Postby mbalzano » Tue Mar 27, 2018 4:55 pm

How would we create a log? With something like wireshark?

mbalzano
Posts: 4
Joined: Tue Mar 27, 2018 10:28 am

Re: ESP32 Web Server Question?

Postby mbalzano » Thu Apr 05, 2018 1:19 am

kolban wrote:When the ESP32 runs, it can generate log/diagnostic messages. These can enabled through a Make Menuconfig option to set the verbosity level required. From the story, I am hearing that something is working for a period of time ... and then it doesn't ... This would imply to me that some state has changed in the environment. At a minimum, we would have to ask "What does the ESP32 thing has changed?". For example, did the access point disconnect it? To acertain that, we would want to enable logs and capture them for the duration in question and then once a failure has been detected, go back through the logs and "see what we can find".

I have been doing some research on how to turn on this logging feature but I have not been successful. I am fairly new to programming and I am teaching myself. Can you help me understand how to turn on this data logging in my esp32 project?

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

Re: ESP32 Web Server Question?

Postby kolban » Thu Apr 05, 2018 5:38 am

Have a read and play with the following ...

http://esp-idf.readthedocs.io/en/latest ... m/log.html

see how that helps and if there are questions, maybe create posts and threads related to those as needed.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

mbalzano
Posts: 4
Joined: Tue Mar 27, 2018 10:28 am

Re: ESP32 Web Server Question?

Postby mbalzano » Sat Apr 07, 2018 12:02 pm

mbalzano wrote:
kolban wrote:When the ESP32 runs, it can generate log/diagnostic messages. These can enabled through a Make Menuconfig option to set the verbosity level required. From the story, I am hearing that something is working for a period of time ... and then it doesn't ... This would imply to me that some state has changed in the environment. At a minimum, we would have to ask "What does the ESP32 thing has changed?". For example, did the access point disconnect it? To acertain that, we would want to enable logs and capture them for the duration in question and then once a failure has been detected, go back through the logs and "see what we can find".

So I found my way to menuconfig. No easy task I must say. But now my question is what would I turn on to monitor my esp32? And where would I go to review the results ?

sellonoid
Posts: 13
Joined: Thu Mar 29, 2018 10:25 pm

Re: ESP32 Web Server Question?

Postby sellonoid » Wed Apr 11, 2018 5:02 pm

I am a beginner at this like you. If I am understanding Neil correctly, start out by running "make menuconfig". I don't have it in front of me now to check, but as Neil said, look around in there and turn on verbose reporting or whatever it's called. Once you've done this, exit the menuconfig, saving your changes as you go. Then run "make monitor". This will cause the target ESP32 to feed data back to your computer via the USB connection. This can reveal a lot success and failure messages that you can likely make sense of. This of course requires your computer to be tethered to your ESP32 via USB, unless there's a way to do the same thing over WiFi, but maybe that's asking too much.

Jim

Who is online

Users browsing this forum: Majestic-12 [Bot] and 65 guests