These are chat archives for esp8266/Arduino

14th
Aug 2015
Michael Miller
@Makuna
Aug 14 2015 07:06
@igrr @nkolban isnt the primary goal is to fit the Arduino model, so sketches/knowledge transfer between avr, sam, esp? While generics/lambda is available to us, they are not to the avr Arduino projects. Further, we could provide a async callback model (APC in Windows) that gets queued so they get called inline with the loop and thus avoid the issues you mention. I built such a beast for AVR for interrupt driven event that needed to more than you really should in an ISR.
Ivan Grokhotkov
@igrr
Aug 14 2015 09:21
@Makuna yes, the primary goal is to fit the Arduino model. But adding another network library (event-driven one) doesn't hurt this goal i think.
Me No Dev
@me-no-dev
Aug 14 2015 11:42
event driven lib could only help acheave more and better working services
like OTA for example
Ivan Grokhotkov
@igrr
Aug 14 2015 12:01
btw, regarding ota
I have resolved the rare cases when i had lmac.c errors by doing less aggressive interrupt locking
not sure it will help others, but fixed the issue for me
Me No Dev
@me-no-dev
Aug 14 2015 12:03
have you tried uploading a file to SPIFFS through the web server?
any lmac.c there?
Ivan Grokhotkov
@igrr
Aug 14 2015 12:03
haven't tried yet
Michael Miller
@Makuna
Aug 14 2015 14:52
@igrr what do you mean by less aggressive interrupt locking? For my NeoPixel library I have people who hit this similar exception when they have networking turned on.
Michael Miller
@Makuna
Aug 14 2015 16:07
Btw, APC = asynchronous procedure call.
Is there a way we can work with core Arduino then to design and create the next generation api, as I also agree a lot the current apis seem like antique models.
Russ Mathis
@RussMathis
Aug 14 2015 21:40
@igrr, getting error:ctx: cont
sp: 3ffea510 end: 3ffeab20 offset: 01b0, when trying to close a SPIFF file after issueing a: f.println(sInfo);
This seems to happen sporadically... but usually after 2 or three tries. The string.length() is about 350 characters.
Russ Mathis
@RussMathis
Aug 14 2015 21:51
Also, when this error happens the file does not exist after rebooting from WDT
Ivan Grokhotkov
@igrr
Aug 14 2015 21:53
ok, no idea what this means, but thanks for info :)
Russ Mathis
@RussMathis
Aug 14 2015 21:53
Are there limits to how much can be written to a SPIFF file at one time?
Or something you have to wait for before closing?
Ivan Grokhotkov
@igrr
Aug 14 2015 21:54
i made a few SPIFFS related changes today to fix some wrong behavior, might be related.
no, shouldn't be
Russ Mathis
@RussMathis
Aug 14 2015 21:54
ok, thx I'll keep trying...
Ivan Grokhotkov
@igrr
Aug 14 2015 21:55
I was running a test, writing and reading files up to 128k
before I fixed a few things, it only worked for 16k files, now 128k is also okay.
Russ Mathis
@RussMathis
Aug 14 2015 21:55
Ok, how about special characters? I'm formatting the strings with lots of "\n\t"
Ivan Grokhotkov
@igrr
Aug 14 2015 21:56
shouldn't make any difference
Russ Mathis
@RussMathis
Aug 14 2015 21:56
OK,thx.
Ivan Grokhotkov
@igrr
Aug 14 2015 21:56
it's written as a binary file
Russ Mathis
@RussMathis
Aug 14 2015 21:57
I'm not opening the file with "b" only "r" or "a+"
Ivan Grokhotkov
@igrr
Aug 14 2015 21:57
there's no "b" and "t" in mode string, it's all "b" by default
Russ Mathis
@RussMathis
Aug 14 2015 21:58
ahh, ok read somewhere that mode strings were the save as fopen. :)
sic. same
Ivan Grokhotkov
@igrr
Aug 14 2015 21:59
@Makuna I found that disabling interrupts up to level 5 is enough for flash reads/writes
Russ Mathis
@RussMathis
Aug 14 2015 22:00
Don't know how to disable intterupts or even what level I'm using. I'm just doing basic Arduino style stuff here... :)
sticilface
@sticilface
Aug 14 2015 22:42
@Makuna u reckon we can try that with neopixel bus... just see if it makes a difference?
Michael Miller
@Makuna
Aug 14 2015 22:48
@sticilface that's the thought, but any interruption will cause problems with the bit banging.
sticilface
@sticilface
Aug 14 2015 22:56
i've been testing this a lot, hence me being quite quiet at the moment, and i've come up with not too much. I just keep getting either lmac.c 662 or a stack dump which points to this ack timeout thing... the reboot time is generally proportional to the amount of refreshes to the animations... no animations ESP stable for well over 17hrs..., animate with update to animator+ show() every 30ms and i get a reboot every hr, sometimes 2........ change that to 5ms, and it only lasts a few min...