Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By PaulRB
#27113
martinayotte wrote:You sketch binary works on my ESP, I'm seeing the "hellos". So, at least, your compile environment is working.

Great, that's one more link in the chain we know is working. We must be narrowing down the problem.
martinayotte wrote:So, maybe your problem is lying there, check the wiring again to see if there some short somewhere.

I used my multimeter to measure the resistance between GPIO0 and ground, with no power applied to the circuit and the usb/ttl adaptor removed but the esp still in place. It measures around 55K. If I remove the esp from the breadboard adaptor, the multimeter displays "1 ." indicating infinite resistance. So there does not appear to be a short on my breadboard or wiring, it is the esp that is allowing current to flow from GPIO0 to ground. The same is true if I test BarnabyBear's esp module in the same way (around 56~57K).

So it seems that my esp goes into some other state instead of run mode, where it sinks a couple of mA through GPIO0, but will not accept a sketch upload.

Martin, what is the appearance of your esp 01 module(s)? My modules (the one I still have and the one I sent to BarnabyBear) have a blue pcb and no writing on either side of the pcb. BarnabyBear's esp 01 has a black pcb with the words "AI-cloud Inside" written on the front, just by the antenna squiggle.

Comparing the two, the only other differences I can see are the layout of a few components on either side of what I think must be the crystal, and the flash chip appears different.
User avatar
By Barnabybear
#27120 Hi, for what it's worth, I'm using the one you sent me as part of my development program (sounds more serious than it is), basicly means it sits in my programing board & get flashed 10 to 30 times a night (when I'm at home) mostly to work out how bits of code work. I must have flashed yours at least a 100 times without problem.
Last edited by Barnabybear on Thu Aug 27, 2015 2:13 am, edited 1 time in total.
User avatar
By martinayotte
#27125 Hi Paul,

My ESP-01 are the blue one, but in our investigation, it doesn't matter since I've tested your binary on my ESP-12, not ESP-01, but it doesn't matter.

Since you said that your setup work in the past, and that you currently able to to upload without error, and it is only that runtime is not behave as expected, but having switched from SDKs several times, I'm now suspecting that the Wifi configs stored in ESP is maybe not matching the SDK (I've seen that in the past when switching SDKs).

To erase those configs, you need to upload blank.bin to both 0x7C000 and 0x7E000 addresses, (or even better blank512k.bin at 0x00000).

Still the GPIO0 at 1.47V is strange to me, but you didn't find any shorts ... Let put that aside for now, but we need to keep in in mind for later.
User avatar
By PaulRB
#27187 I downloaded blank512k.bin from https://github.com/funshine/nodemcu-firmware and flashed it:
Code: Select all/home/paul/.arduino15/packages/esp8266/tools/esptool/0.4.5/esptool -vv -cd ck -cb 115200 -cp /dev/ttyUSB0 -ca 0x00000 -cf /home/paul/blank512k.bin


This failed several times with the message:
Code: Select allwarning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
closing bootloader


So I tried a lower baud of 57600 a few times but that was no more successful. But finally I got it to work at a higher baud on the first try (luck?):
Code: Select all/home/paul/.arduino15/packages/esp8266/tools/esptool/0.4.5/esptool -vv -cd ck -cb 230400 -cp /dev/ttyUSB0 -ca 0x00000 -cf /home/paul/blank512k.bin
esptool v0.4.5 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
   setting board to ck
   setting baudrate from 115200 to 230400
   setting port from /dev/ttyUSB0 to /dev/ttyUSB0
   setting address from 0x00000000 to 0x00000000
   espcomm_upload_file
   stat /home/paul/blank512k.bin success
opening port /dev/ttyUSB0 at 230400
   tcgetattr
   tcsetattr
   serial open
opening bootloader
resetting board
trying to connect
   setting character timeout 0
   done
   setting character timeout 1
   done
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
trying to connect
   setting character timeout 0
   done
   setting character timeout 1
   done
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_send_command: receiving 2 bytes of data
   espcomm_open
Uploading 1600946 bytes from /home/paul/blank512k.bin to flash at 0x00000000
   erasing flash
   size: 186db2 address: 000000
   first_sector_index: 0
   total_sector_count: 391
   head_sector_count: 16
   adjusted_sector_count: 375
   adjusted_size: 177000
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   setting timeout 10000
   setting character timeout 100
   done
   setting timeout 1
   setting character timeout 1
   done
   espcomm_send_command: receiving 2 bytes of data
   writing flash
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
starting app without reboot
   espcomm_send_command: sending command header
   espcomm_send_command: sending command payload
   espcomm_send_command: receiving 2 bytes of data
closing bootloader


Then I went back to flashing my simple "hello" shetch. Uploads fine. Does not run.

I tried uploading at 230400 baud just in case. Flashes OK and faster. Sketch still does not run.

Unplugged my esp01 and replaced with BarnabyBear's esp01, just to check its still ok, and yes that runs straight away.

I have ordered a different usb/ttl adaptor , a different power supply and another esp-01. They should arrive tomrrow or at the weekend. I am noticing that "for esp8266" is appearing in eBay item titles almost as often as "for Arduino" these days...