Post topics, source code that relate to the Arduino Platform

User avatar
By littleoz2
#70314 Hello, I am trying to upload a sketch to the ESP8266 using the HC-05 bluetooth module.
I am using the NodeMCU ESP-12E dev board.
I am able to upload via a usb to serial cable plugged into the TX and RX lines on the board by manually holding down the flash button during upload.
I have tried this exact method using the HC-05 but it's not working, below is the output from the upload in the Arduino IDE:
Code: Select allesptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
   setting board to nodemcu
   setting baudrate from 115200 to 115200
   setting port from COM1 to COM9
   setting address from 0x00000000 to 0x00000000
   espcomm_upload_file
   espcomm_upload_mem
   setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
resetting board
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
resetting board
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
trying to connect
   flush start
   setting serial port timeouts to 1 ms
   setting serial port timeouts to 1000 ms
   flush complete
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
User avatar
By QuickFix
#70331 A NodeMCU uses the DTR and RTS-lines of an RS232 interface to reset the ESP and put it into flash mode.
Does the HC-05 actually (transparently) forward these lines?

Image

Maybe you might want to consider OTA programming instead?
User avatar
By littleoz2
#70351 The HC-05 doesn't have DTR or RST lines but I am manually holding down the RST and FLASH buttons on the NodeMCU and then releasing the RST button and keep the FLASH button held down for the whole upload process.

I have tested this using a USB to Serial adapter without a DTR line and only had the RX, TX and GND pins connected and this worked fine with me manually pressing the buttons, so thought the HC-05 would work in the same way.

Thank you for your help
Last edited by littleoz2 on Wed Sep 27, 2017 12:53 pm, edited 1 time in total.