Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Stavros Korokithakis
@skorokithakis
by the way, is there any information about the arduino way of putting the ESP in a deep sleep properly?
Markus
@Links2004
ESP.deepsleep(time) ?
Stavros Korokithakis
@skorokithakis
is it that easy?
wow
Markus
@Links2004
and connect GPIO16 to RST or CH_PD
Stavros Korokithakis
@skorokithakis
thanks
Chris Elsworth
@celsworth
would appreciate any thoughts on #1211, been butting my head against it for 2 days :/
Stavros Korokithakis
@skorokithakis
@celsworth, if you don't seem a wdt message, wouldn't that mean that serial has crashed?
Chris Elsworth
@celsworth
or its just locked up so hard it didn't get time to print one, I dunno
I'm struggling to get any useful info out of it after the crash, maybe gdb will help
it does reboot and then continue
and serial then resumes working, etc
Markus
@Links2004
@celsworth you overload the tcp when you send messages byte by byte, many overhead here.
Chris Elsworth
@celsworth
ok, I'll fix that and see if it goes away
buffer say 32 bytes then send that? the problem is its a serial bridge so it needs to be quick, maybe if I send every 50ms
Markus
@Links2004
group as many as possible for your needs.
this shut help
Chris Elsworth
@celsworth
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)
Chris Elsworth
@celsworth
but 0 = no timer set
Stavros Korokithakis
@skorokithakis
right right
by the way, maybe someone will find this useful: https://github.com/skorokithakis/esplights
Chris Elsworth
@celsworth
hey nice :) good range of technologies in there, I like the remote control integration :)
Stavros Korokithakis
@skorokithakis
thanks, it's handy because you can send whatever IR you want over mqtt