Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
d-a-v
@d-a-v:matrix.org
[m]
@hasenradball: I'm not a power-off specialist. I believe RF_DISABLED is the powerdown version of WIFI_OFF, meaning, more power with WIFI_OFF but a shorter time to get back on than with RF_DISABLED. The datasheet will help you more.
d-a-v
@d-a-v:matrix.org
[m]
@bwjohns4: long Strings and ram shortage often go together.
Don't forget you can stream Streams, Strings and progmem arrays directly to http clients without allocating anything.
server.chunkedResponseModeStart() / server.sendContent(progmem1) / server.sendContent(String2) / server.sendContent(Stream3) / ... / server.chunkedResponseFinalize()
Byron Johnson
@bwjohns4
@d-a-v Thank you! I’ll look into this!
Byron Johnson
@bwjohns4
I'm trying to diagnose why the captive portal randomly closes in WiFiManager. Using an iphone to connect, sometimes the captive portal just shuts down right around the time that it loads. Does anyone know what signals the ESP8266 Webserver might send that would tell the client (iphone) to shutdown the connection? Is it the .stop()?
I know that often the iphone makes several requests that get redirected, but why might sometimes the captive portal session just randomly close down?
Byron Johnson
@bwjohns4
the config requests are handled by server->handleRequest() but then at the same time if additional probes are sent by the iphone they are handled by the doredirect. Is there a chance the when the .stop() is called below in response to a duplicate probe, it would close the active captive portal in use by the previous probe?
  if (doredirect) {
    #ifdef WM_DEBUG_LEVEL
    DEBUG_WM(DEBUG_VERBOSE,F("<- Request redirected to captive portal"));
    #endif
    server->sendHeader(F("Location"), (String)F("http://") + serverLoc, true);
    server->send ( 302, FPSTR(HTTP_HEAD_CT2), ""); // Empty content inhibits Content-length header so we have to close the socket ourselves.
    server->client().stop(); // Stop is needed because we sent no content length
    return true;
  }
  return false;
}
Martin Chlebovec
@martinius96
I saw in HTTPS request example, there must be time set to ESP from NTP service because of X.509 certificates.
Is there option to set time from time of compilation sketch? I cannot find some example for it, but I think it is possible.
I want to use it in ULP application, I don't want to set time each time after wakeup from external service.
d-a-v
@d-a-v:matrix.org
[m]
This is to wait for NTP time
Byron Johnson
@bwjohns4
can you get DNS from dhcp while still using static ip/subnet/gateway?
cuberwr
@cuberwr
image.png
i can't save my code to flash
ERROR: Too big to save to flash (1221 vs 0 bytes)
the ide give me this error
and the AP
seems not work
i can't fiand the AP on my phone
cuberwr
@cuberwr
have you guys know the reason ?
Drzony
@drzony
it seems that your board is not in flashing mode
what board are you using?
cuberwr
@cuberwr
i'm using esp201
image.png
image.png
cuberwr
@cuberwr
based on esp8266ex
Drzony
@drzony
to upload fw you need to enter flashing mode
cuberwr
@cuberwr
download javascript code need flashing mode ?
i m
Drzony
@drzony
read espruino docs
this is Arduino gitter
I'm not familiar with espruino
maybe you need a different flsh layout for espruino image
but it seems that you need to enter flashing mode
Drzony
@drzony
if you have a board with usb connection, then flash mode is enabled via RTS/DTR
but on your board you need to do this manually
Byron Johnson
@bwjohns4
Esp8266 web server crossing tcp/http streams or just crashing with lots of simultaneous captive portal probe request? Has anyone seen this? Maybe an OOM thing? I get partial page responses sometimes when my request to esp8266 web server gets sabotaged by many probe requests
Drzony
@drzony
usually there are several requests for generate204, on my side I did captive portal a bit differently, sending DNS responses for well known "check" domains to non-existing addresses
Byron Johnson
@bwjohns4
Trying to debug this with the OOM flag in pio and I get a million compile errors when including "umm_malloc/umm_malloc_cfg.h". Why won’t it compile with this to allow OOM debugging? The errors are like missing typedefs or something
Max Prokhorov
@mcspr:matrix.org
[m]
@bwjohns4: just -DDEBUG_ESP_OOM should be enough? _cfg header is already included through the Arduino.h. not sure why the pio doc adds -include
plus theres no mention of -DUMM_POISON_CHECK (...but I don't remember whether that flag already enables it, so maybe it is not needed...)
Byron Johnson
@bwjohns4
Thank you I got it working!
How long does esp8266 web server keep stuff in memory after serving a page? I have a captive portal that works fine except when being bombarded with many simultaneous probe requests which run out my memory.
Is there a way to make server free memory faster between connections?
That said, you may have encountered a new issue. What does OOM debug say ?
Byron Johnson
@bwjohns4

The lowest memory version of LWIP is already the default, right?

My OOM doesn't give anything too enlightening, the main thing that I see is that part of my page doesn't get added to the response sometimes. It uses a bunch of page += buildups that I'm trying do differently now. I think sometimes the String += function can't allocate more or something like that. I only seem to find this issue when many probe requests are sent back to back

d-a-v
@d-a-v:matrix.org
[m]
@bwjohns4: There is a way to send a complex / long webpage without building huge strings, by using chunked answers