New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow control DTR/RTS when using esptool via Arduino board serial interface #82
Comments
FYI, I'm not the only person who encountered this: |
I agree this should be able to work. Does it change anything if you replace the two while statements in the relay code with if statements? |
No. It doesn't matter. It also doesn't matter if I switch their position (i.e., trying to read from Serial first). |
I also have this issue. If I manually run a python interpreter and write/read from serial, I can read back the response from the esp. However, when using esptool, we get "Invalid head of packet" exception from receive_response function. (The exception is caught and ultimately manifests as the "failed to connect" error.) What is odd is, the self._port.read(1) call in receive_response is returning immediately, rather than waiting for the timeout of 300ms. So it appears to be a serial configuration issue. |
This worked for me: Comment-out the "issue reset-to-bootloader" commands in esptool.py. Apparently this puts the serial port in a bad state:
|
Works! It might be a good idea to add this as a flag that can be controlled from the command line arguments (or add this to the documentation somewhere). |
Good suggestion, we should have a flag controlling the desired reset behaviour. |
…as per projectgus's comment in issue espressif#82
esptool.py v2.0 (current master branch) has a Please reopen this issue if you find this isn't the case. |
Hi,
I'm having trouble flashing the 8266 via serial relay.
Here is the scenario:
esptool works great if I use FTDI. However, In my application, I need to flash it using a Mega32U4.
I hooked up the Mega32U4 => ESP like this:
3.3V => VCC
GND => GND
TX => RX
RX => TX
I then upload to the mega32U4 a serial relay program:
`void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
while(Serial1.available())
Serial.write((uint8_t)Serial1.read());
while(Serial.available())
Serial1.write((uint8_t)Serial.read());
}
`
Then, I try to upload (all 8266 pins are set correctly, just like it worked with the FTDI), but I keep getting this error:
`Connecting...
A fatal error occurred: Failed to connect to ESP8266
`
Any idea why this is happening? I tried lower baud rate (9600) without any success.
This should work in theory....right?
The text was updated successfully, but these errors were encountered: