Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Bryce Schober
@bryceschober
I suppose I could, but our application really wants to be softap, so I'm not sure the test would be very relevant...
Me No Dev
@me-no-dev
the test would show if softap is the issue :)
riataman
@riataman
how much memory is available for user programs?
wait
wrong channel, mean ask about the esp32
Bryce Schober
@bryceschober
@me-no-dev or @igrr : What does this wifi debug output mean about my attempt to be STA:
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
state: 5 -> 2 (2c0)
rm 0
wifi evt: 1
STA disconnect: 2
reconnect
state: 2 -> 0 (0)
scandone
state: 0 -> 2
... repeat ...
Bryce Schober
@bryceschober
@me-no-dev Well, for some reason I couldn't get the STA version of my UDP Tx test working... but I did end up trying unicast instead of broadcast as SoftAP, and there were no significant packet loss problems all the way down to 1 ms. I got a 97% reception rate at 1400kBps bandwith with 1400-byte packets and 1 ms between transmissions.
So the problem is definitely in the fact that it's broadcast instead of unicast. There's some invisible wall of impossibility in trying to UDP broadcast packets more frequently than 25 ms.
FYI, I'm testing this on the update_sdk_2.1.0 branch, since UDP broadcast is broken-ish without it
dragon-engineer
@dragon-engineer
hi, is already supported larger flash chips in Arduino IDE? I read that in IDF that should be okay since May 5th, release v2.1.0
brutzler
@brutzler
Hi, perhaps a stupid question.
Is there any possibility to check if the code in the flash of an ESP is the same as the actual opened source in Arduino IDE?
riataman
@riataman
probably not
not directly ..
you could cook up your own solution, but making your sketch print its own source hash or something. not that simple.
brutzler
@brutzler
and indirectly?
riataman
@riataman
you will need to incorporate code yourself to do that
I'm guessing with esptool you could download the binary out of the esp8266
and you can compare it with a binary you have
if you keep the binary you could compare thosre
stil the source can be the same, but the binary different
brutzler
@brutzler
same source, different binary? thats the dead end...
riataman
@riataman
anyway, there's no easy way to do it
the easy way is to incorporate a Serial.print("Version v1.2") to your sketch
and remember to change it everytime you make changes
brutzler
@brutzler
I thought the same way. Compile the sources and compare the binary file to the data reloaded from the flash. But if there is a different result on compiling the sources twice..... forget it
riataman
@riataman
yeah, I don't think the compiler does reproducible builds ..
you can try I guess?
brutzler
@brutzler
Once on a project, I used this:
__DATE__ and __TIME__
on a html-page.
There I could see the compiling date and time.
Half the way....
Martin Ayotte
@martinayotte
I'm using those DATE and TIME since more than a year ...
brutzler
@brutzler
@martinayotte
for the same usage as I, or different?
Martin Ayotte
@martinayotte
@brutzler , simply to know the build timestamp.
dragon-engineer
@dragon-engineer
Guys, I just updated my 6 months old SDK for Arduino IDE for esp8266, and the same project that was 328kB large in size and needed 42kB in RAM now compiled under new SDK takes 422kB and needs 45.7kB RAM. I didn't update any libraries :worried: I mean, wtf is going around here?
Cristóvão Trevisan
@cristovao-trevisan
Probably due to ask
Sdk updates
Cristóvão Trevisan
@cristovao-trevisan
I just don't see any problems since the increase isn't so big
dragon-engineer
@dragon-engineer
well, FLASH is now 40%, + OTA upgrade so it is getting a little tight. RAM is bigger problem, because now the Async web server is noticeably slower..I'll do some more testing, however the reason I updated SDK was facing memory leaks after every request the server had to handle - is anyone using Igor's Async too? Even if I only send a few bytes of text, there is memory leak 500-700 bytes. I do not use any String / malloc and the heap is getting smaller with every request until it crashes
Me No Dev
@me-no-dev
@matasondrak first it’s my Async :D and then it does not leak ;) if it leaks, the issue would be in your code. I am open to be proven wrong though (on the leak)
oh and Igor is actually Ivan :P
dragon-engineer
@dragon-engineer
@me-no-dev thanks for the reply :smile: and for the info
I'll test only with one handler in the entire sketch
Me No Dev
@me-no-dev
async runs pretty low in lwip, so if an SDK update broke or introduced a change that could lead to leak, that is one possibility, but then that leak will be visible in the regular client/servers as well
dragon-engineer
@dragon-engineer
alright, I'm at work and I forgot the nodemcu module home so I'll test later.. but the fact that sdk update increased dramatically size of the sketch is a bit disturbing
Clemens Kirchgatterer
@everslick
@matasondrak the leaks you are seeing are probably sockets held in FIN_WAIT state. they get cleaned up after some time (minutes). the newer SDK limits the number of sockets in FIN_WAIT to something like 5 so the effect is less noticable.
dragon-engineer
@dragon-engineer

I found out what was the cause of the leaks.. it was this NotFound handler:

server.onNotFound({
AsyncWebServerResponse *response = request->beginResponse(SPIFFS, "/404.html");
response->setCode(404);

even if it was not written correctly, this code shouldn't normally run until I request a file that is not found on the server, right? I found it strange that with this code the sketch has memory leaks, even though I only refresh page /test.html

Me No Dev
@me-no-dev
you refresh /test.html but your browser also requests the little image that can show up in the title bar and since you do not request->send(response); you leak
dragon-engineer
@dragon-engineer
yes the favicon!! I forgot it! good point
Me No Dev
@me-no-dev
in any way and in any handler you should always respond to each request in some way
dragon-engineer
@dragon-engineer
yes definitely, that NotFound handler was your suggestion btw :smile: I asked you how to serve a SPIFFS static file in a custom handler and you sent me this, it worked so I didn't try it for stability/memory leaks
Me No Dev
@me-no-dev
never my idea not to actually request->send(response) ;)
dragon-engineer
@dragon-engineer
that's not it