Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Holger Lembke
@holgerlembke
n, code works totally fine. I was just thinking about the best practice coding style.
Drzony
@drzony
you wrote "as far as I see, assignments to int32_t are not atomic."
Holger Lembke
@holgerlembke
yeah. thats because I have no clue about anything....
I was looking at the generated asm code and it is a little bit overwhelming...
Drzony
@drzony
int32_t aaa = 123; is a single cycle op
int32_t aaa = somevar; might not be, depending on where somevar is stored
in both cases aaa will be changed in a single cycle
but in second case there might be a separate fetch operation for somevar
Holger Lembke
@holgerlembke
I know that my data link has errors, so the isr might simply "miss" something. so I wanted to check if I might do something wrong or if I see the link errors. Im quite sure, I see the link errors. but who knows...
bedtime. bye. and thanks @drzony
Byron Johnson
@bwjohns4
Can you send firmware updates between esp8266 using ESP NOW?
So one esp8266 retrieved from network and then transmits to the next one that only has ESP NOW connection
Juraj Andrássy
@jandrassy
@bwjohns4 the Update object from core stores and applies the binary. you can transport the update binary every possible way to transport data.
Paulo Cabral Sanz
@paulocsanz
Hi, I've been getting this SSL error, but the cert is not invalid, and the certstore isn't actually accessed (I log every access to the hook functions), can someone help me understand the best way to debug this please?
[hostByName] request IP for: iop-monitor-server.tk
[hostByName] Host: iop-monitor-server.tk IP: 104.236.4.125
:ref 1
BSSL:_connectSSL: start connection

_iobuf_in:       0x3fff441c
_iobuf_out:      0x3fff8574
_iobuf_in_size:  16709
_iobuf_out_size: 597
[TRACE] TRACER: Entering new scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
[TRACE] TRACER: Free Stack 1988, Free DRAM 11552, Biggest DRAM Block 11280, Connection 1
[TRACE] TRACER: Leaving scope, at line 59, in function virtual void iop::CertStore::installCertStore(br_x509_minimal_context*), at file cert_store.cpp
BSSL:Installed certstore
:wr 226 0
:wrc 226 226 0
:ack 226
:rn 536
:rd 5, 536, 0
:rdi 536, 5
:rch 536, 536
:rd 85, 1072, 5
:rdi 531, 85
:rch 1072, 536
:rch 1608, 536
:rd 5, 2144, 90
:rdi 446, 5
:rd 2049, 2144, 95
:rdi 441, 441
:c 441, 536, 2144
:rdi 536, 536
:c 536, 536, 1608
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rd 536, 536, 0
:rdi 536, 536
:c0 536, 536
:rn 536
:rch 536, 536
:rd 914, 1072, 0
:rdi 536, 536
:c 536, 536, 1072
:rdi 536, 378
BSSL:_run_until: closed
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'
Is there a doc about those weird SSL logs?
The server port is 4001
Earle F. Philhower, III
@earlephilhower:matrix.org
[m]
BSSL:Couldn't connect. Error = 'Certificate is expired or not yet valid.'
Have you enabled NTP and set the system time? The date/time of certs are verified as well as their signing chains.
See the BSSL_Validation example which shows a failure before time is set followed by a success immediately after setting the time using the same certificate.
Paulo Cabral Sanz
@paulocsanz
Thank you!
Paulo Cabral Sanz
@paulocsanz
It fixed the issue
Byron Johnson
@bwjohns4
I'm using WiFiManager and often the captive portal closes out while it's being used. I don't think it's a WM issue but maybe more of a system troubleshooting exercise. Do phones and other devices send out multiple background requests that would interfere with the captive portal redirect?
Byron Johnson
@bwjohns4
Does anyone know why a string concat by doing page += pitem would sometimes be skipped? I have a sequential order of things that get added to page and randomly this one += addition gets skipped! I even do a Serial.println(pitem.length()) to ensure that it's not empty. It just randomly skips it sometimes!
  pitem = getParameters(FPSTR(HTTP_CONFIG_HTML), useDefaults);

  page += pitem; //this sometimes gets skipped!!!!!

  page += FPSTR(HTTP_FORM_END);
  page += FPSTR(HTTP_BACKBTN);
  page += FPSTR(HTTP_END);
Hasenradball
@hasenradball
Hello ESP8266 experts, what is the best way to use the esp8266 without wifi:
a) just switch to WIFI_OFF
or
b) restart via deepSleep with the option RF_DISABLED
?
d-a-v
@d-a-v:matrix.org
[m]
Starting from core v3.0, wifi is already off at boot
Byron Johnson
@bwjohns4

As further troubleshooting, here is my code and output. I had the problem when using getParamsOut() before, then I removed the params altogether to embed my HTML config directly into WM (not elegant, but easier to edit the HTML directly rather than build through params).

Sometimes pitem gets added in, then sometimes it doesn't!!! How can this be? I added size checks below to show that pitem is not empty but somehow doesn't get added to page via page += pitem

  page += FPSTR(HTTP_FORM_WIFI_END);

  pitem = getBwjohns4StoredHTML(FPSTR(HTTP_CONFIG_HTML), useDefaults);
          Serial.print("Size of Pitem: ");
          Serial.println(pitem.length());
          Serial.print("Page Size Before: ");
          Serial.println(page.length());
  page += pitem;
          Serial.print("Page Size After: ");
          Serial.println(page.length());
  page += FPSTR(HTTP_FORM_END);
  page += FPSTR(HTTP_BACKBTN);
  page += FPSTR(HTTP_END);

Then here is the output:

wm:[2] AP: -86 Deathstar wm:[2] AP: -86 SpectrumSetup-18
wm:[2] AP: -87 SpectrumSetup-04
Size of Pitem: 7776
Page Size Before: 6230
Page Size After: 6230
wm:[2] <- Request redirected to captive portal
wm:[2] <- HTTP Root wm:[2] <- Request redirected to captive portal
*wm:[2] <- HTTP Root

Hasenradball
@hasenradball
@d-a-v:matrix.org but whats exately the difference beteeen WIFI_OFF and start with RF_DISABLED?
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