Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only able to run with Serial monitor opened? #253

Closed
jlutzwpi opened this issue Aug 1, 2023 · 6 comments
Closed

Only able to run with Serial monitor opened? #253

jlutzwpi opened this issue Aug 1, 2023 · 6 comments

Comments

@jlutzwpi
Copy link

jlutzwpi commented Aug 1, 2023

Hello again, really enjoying this code. It works great. Seeing 20 fps being recorded to SD. However, it looks like the webserver only starts up when a Serial monitor is opened. I would like to try to a battery-powered solution where I'm not connected via USB-C with a Serial monitor open. Is there a way to disable that? Typically it's a while(!Serial) call but there is a whole logging system so not sure if a similar command is issued elsewhere. Thanks!

@s60sc
Copy link
Owner

s60sc commented Aug 1, 2023

Nothing to do with app. Hardware issue?

@jlutzwpi
Copy link
Author

jlutzwpi commented Aug 1, 2023

OK, found the issue: had to comment out the following:

if (!strlen(ST_SSID)) wlStat = WL_NO_SSID_AVAIL;
  else {
    while (wlStat = WiFi.status(), wlStat != WL_CONNECTED && millis() - startAttemptTime < 5000)  {
     //comment out these lines to run without Serial monitor open
      //Serial.print(".");
      //delay(500);
      //Serial.flush();
    }
  }

I think it is just the Serial.flush() that causes the dependency because there are other Serial.println's throughout the code and I can now connect without the Serial monitor open.

@s60sc
Copy link
Owner

s60sc commented Aug 1, 2023

Appears to be an S3 specific problem
try

#if !CONFIG_IDF_TARGET_ESP32S3
      Serial.flush();
#endif

@s60sc
Copy link
Owner

s60sc commented Aug 1, 2023

There is an existing arduino-esp issue

does the following work

if (Serial) Serial.flush();

@jlutzwpi
Copy link
Author

jlutzwpi commented Aug 1, 2023

Huh, how about that? I loaded the MCU into my model rocket payload already, so I'll give that a try post-launch. Thanks for digging that up. I just commented it out for the time being since I didn't really need that debug capability if I'm running battery-powered. Thanks again!

@s60sc
Copy link
Owner

s60sc commented Aug 3, 2023

new 8.7.4

@s60sc s60sc closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants