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

Moderator: igrr

User avatar
By PaulRB
#27042 Thanks Martin,

To send you my file, I assumed it would be
/tmp/build235381338919422257.tmp/sketch_aug21a.cpp.bin
from the messages I posted above, but this does not seem to exist, so I assume it must get deleted after the upload process completes?

I attempted to upload your file. This was the result:
Code: Select allpaul@paulsPC:~$ /home/paul/.arduino15/packages/esp8266/tools/esptool/0.4.5/esptool -vv -cd ck -cb 115200 -cp /dev/ttyUSB0 -ca 0x00000 -cf /home/paul/serial_test.bin
esptool v0.4.5 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
   setting board to ck
   setting baudrate from 115200 to 115200
   setting port from /dev/ttyUSB0 to /dev/ttyUSB0
   setting address from 0x00000000 to 0x00000000
   espcomm_upload_file
   stat /home/paul/serial_test.bin success
opening port /dev/ttyUSB0 at 115200
   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 211456 bytes from /home/paul/serial_test.bin to flash at 0x00000000
   erasing flash
   size: 033a00 address: 000000
   first_sector_index: 0
   total_sector_count: 52
   head_sector_count: 16
   adjusted_sector_count: 36
   adjusted_size: 024000
   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
paul@paulsPC:~$


So that seemed to upload OK. But it does not run. Nothing on serial monitor except the usual garbage on reset/power on.
User avatar
By martinayotte
#27048 For you own compile, to provide me the latest *.bin, you need to look again to verbose output since, the /tmp folder is changing across ArduinoIDE sessions/sketches .

Fro my own *.bin previously sent, it seems that you got it uploaded without problem, but still not able to execute it ?
After 11 thread pages, I'm running out of ideas. Either you have bad angels nearby, or maybe we should go back to SquareOne !

You should check connections again.

Maybe we should start over again :

How do to manage your GPIO0 and GPIO2 at boot up ?
(When I mentioned HIGH below, I means REAL PullUp to VCC, not leaving pin floating like some other person did and promoted ...)
CH_PD should always be HIGH.
Upload mode : GPIO2=HIGH and GPIO0=LOW
Exec mode : GPIO2=HIGH and GPIO0=HIGH

Please, confirm not only by visual inspections, but maybe with some measurement with voltmeter, I guess.

Best luck !
Martin.
User avatar
By PaulRB
#27098 Hi Martin,

Attached is my .bin for you to test upload.

sketch_aug21a.cpp.zip


ESP pin voltages for flash upload:

CH_PD: 3.26V
GPIO0: 0.00V
GPIO2: 3.26V

ESP pin voltages for run mode:

CH_PD: 3.26V
GPIO0: 1.47V (Huh?!?)
GPIO2: 3.26V

1.47V? At last a clue of some kind? I have a 10K pullup attached to GPIO0 which I short to ground with a wire to get the esp into flash mode and disconnect for run mode. So at 1.47V, the 10K resistor is dropping (3.26-1.47)=1.79V, which means 1.79/10K=1.79mA is flowing. My multimeter shows this current to be 1.41mA. I don't have a scope, this could be the average of a signal.

I then remove my esp01 and try the esp01 from BarnabyBear in its place. (I have still not reflashed it since it arrived, good suggestion, BB). It immediately begins running the sketch. GPIO0 is at 3.25V

The last sketch I had running sucessfully on my ESP01 was using GPIO0 & GPIO2 as i2c bus. Could that sketch still be running?

*** UPDATE ***
Just put BarnabyBear's esp into flash mode. GPIO0 measures around 1.5V. When I put it back into run mode, GPIO0 goes back to 3.26V.

So both esp measure about 1.5V in flash mode. However, BB's esp measures 3.26V in run mode, but my esp remains at 1.5V in run mode (and I know it is in run mode not in flash mode because if I attempt a sketch upload it fails).




Thanks,

Paul
You do not have the required permissions to view the files attached to this post.
Last edited by PaulRB on Wed Aug 26, 2015 3:41 pm, edited 1 time in total.
User avatar
By martinayotte
#27109 Hi Paul,

You sketch binary works on my ESP, I'm seeing the "hellos". So, at least, your compile environment is working.

My module is also using GPIO2/GPIO0 for I2C Bus, and looking at the scope, I see I2C activities but never enough to bring GPIO0 to 1.47V. In fact with a voltmeter, the average giving me 2.95V.

So, maybe your problem is lying there, check the wiring again to see if there some short somewhere.