I am sorry for posting this question for the nth time but I am still not able to find a solution for this error.
I am trying to upload the WiFiScan(Arduino IDE example program)program code to ESP8266 using Arduino Mega 2560. I followed the procedure given here. And I tried uploading it with "Generic ESP8266 Module" and "Adafruit HUZZAH ESP8266" selected as the Board. But I am still getting the following error.
trying to connect
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
Edited to add: enter image description here
Connections-
ESP8266 - Arduino Mega2560
Tx - Tx1(Pin 18)
Rx - Rx1(Pin 19)
Gnd - Gnd
Vcc - 3.3V (Directly from Arduino's 3.3V pin)
CH_PD - 3.3V (Directly from Arduino's 3.3V pin)
GPIO0 - Push button K2 (refer photo)
RST - Push button K1
While pressing the K2 button(Flash button - GPIO0), I clicked the K1 button(Reset button - RST) and then released K2. According to the document, this should bring the ESP8266 to flash mode. Now when I upload the code, it throws the above error.
-
That tutorial doesn't have anything to do with an Arduino Mega and you didn't tell us how you wired it. We can only guess what is wrong.gre_gor– gre_gor2017年09月12日 15:47:07 +00:00Commented Sep 12, 2017 at 15:47
-
Add a photo clearly showing your devices and wiring and you might get a better response.Squats– Squats2017年09月12日 22:52:00 +00:00Commented Sep 12, 2017 at 22:52
-
As suggested, I've included the connection details in the question. @gre_gor, Squatsmac and mocha– mac and mocha2017年09月13日 06:34:49 +00:00Commented Sep 13, 2017 at 6:34
-
tx to tx and rx to rx ??? have you tried the obvious? tx to rx and rx to tx, seeing as that's how serial connections workJaromanda X– Jaromanda X2018年02月11日 01:02:35 +00:00Commented Feb 11, 2018 at 1:02
1 Answer 1
After googling for several hours, I was able to figure out the reason. Thanks to this link. Transferring data to ESP8266 with Arduino acting as USB to Serial converter did not work. Using a USB to TTL converter, and following this link you can easily transfer data to ESP8266.
-
My Arduino Mega worked as a USB to Serial converter just fine...Fusseldieb– Fusseldieb2017年09月13日 12:02:48 +00:00Commented Sep 13, 2017 at 12:02
-
@Fusseldieb could you please tell me how you uploaded data using Arduino Mega?mac and mocha– mac and mocha2017年09月13日 12:04:29 +00:00Commented Sep 13, 2017 at 12:04
-
I just plugged TX to TX, RX to RX, GND to GND and shorted RST to GND, causing the Arduino to loop continuously on reset. I also chosen "Tools" -> "Programmer" -> "Arduino as ISP". Then I uploaded the sketch just fine.Fusseldieb– Fusseldieb2017年09月13日 12:06:11 +00:00Commented Sep 13, 2017 at 12:06
-
I just plugged TX to TX, RX to RX
- no you didn'tJaromanda X– Jaromanda X2018年03月12日 22:40:56 +00:00Commented Mar 12, 2018 at 22:40 -
Why do I see so many people today with the same Tx-Tx Rx-Rx problem. It's like there was something in the weather today. Think of it this way, when you have a conversation with someone, do you talk into their mouth and listen to their ears?Delta_G– Delta_G2020年05月01日 03:18:32 +00:00Commented May 1, 2020 at 3:18
Explore related questions
See similar questions with these tags.