Re: A fatal error occurred: Failed to connect to ESP32: Invalid head of packet ('p')
Posted: Tue Oct 18, 2016 10:33 pm
Thanks hydrabus. That's interesting, your IO0 delay is closer to 2ms than the 4ms I was seeing. But same pattern.I have done some Sigrok (PulseView) capture of the signals (tested with Windows7)
Nice work rudi for figuring this one out. However, it's quite strange that this works - when both RTS & DTR are asserted on the Core board it should actually set EN & IO0 high not low. The reason for this is so that normal serial programs (which assert RTS & DTR by default) don't hold the board in reset - it should only pull EN or IO0 low if DTR or RTS is asserted, not when both are.That fix the problem on win7 (thanks to rudi post http://esp32.com/viewtopic.php?f=13&p=1512#p1512)Code: Select all
self._port.setDTR(False) # GPIO0 -> 1 self._port.setRTS(True ) # RST -> 0 self._port.setDTR(True ) # GPIO0 -> 0 time.sleep(0.05) self._port.setRTS(False ) # RST -> 1 time.sleep(0.1)