okay I set it buffering 500 bytes or 50ms, whichever comes first, and set it going again, its working so far :) ifit doesn't break in 10 minutes then I'll close the issue as that was obivously it :)
thanks @Links2004, legend :)
spoke too soon :(
updated the code in the issue
the SoftwareSerial lib only has a single char read so I have to buffer it myself but the end result is the same
Markus
@Links2004
you code looking good, does the same happen when you us "Serial" instead of the sw Serail?
Chris Elsworth
@celsworth
no, I think its some sort of interaction between the interrupts that SoftwareSerial uses, and espconn_sent() in the sdk
Markus
@Links2004
how many data do you send at 9600 to the ESP?
Chris Elsworth
@celsworth
about 200 bytes every 5 seconds - not a lot
Markus
@Links2004
each char will block all interrupts for 1ms at 9600.
around 200ms blocking all interrupts can be very problematic.
Chris Elsworth
@celsworth
well, the interrupts should get turned on between each char, but I see your point
maybe I need a UART-to-SPI chip for this.. I don't want to tie up the real RX with it, thats for debugging the esp :/
Markus
@Links2004
yes but if you send 200 char in the row there will not many space between them.
for debugging out you can use Serial1
Chris Elsworth
@celsworth
yes true, and then programming is OTA anyway :D
okay jsut going to double-check it doesn't happen on real Serial and I may just go with that
a pity, I wonder what use software serial classes on the esp are then.. there's a couple of them, I don't know if others have gotten them to work well
its jsut very critical timing for a relatively long time, the one thing the esp is not very good at :)
Markus
@Links2004
on higher baudrate the problem is less critical per char, if you put the max data in result will always be the same --> interrupts blocked to long, the implementation has some basic concept problems. blocking interrupts less is possible but then get unstable on high baudrates.
_
Chris Elsworth
@celsworth
real Serial has been working fine for 5 minutes now, no problem
longer than the software serial ever did
Stavros Korokithakis
@skorokithakis
so does ESP.deepsleep() basically turn off the ESP until the RST line is pulsed?
Chris Elsworth
@celsworth
or until the timer fires, if you use 0 then yes, forever
Stavros Korokithakis
@skorokithakis
doesn't the timer pulse the RST line?
Chris Elsworth
@celsworth
yes, via GPIO16 :)
Stavros Korokithakis
@skorokithakis
basically i want to make a dash button, so it sounds like I need a button hooked up to the RST line and deepsleep(0)