These are chat archives for esp8266/Arduino

31st
Jul 2015
tzapu
@tzapu
Jul 31 2015 13:34
hi guys, a non important question compared to what s being discussed here, but is there anyway in which i could send the esp to sleep from a ticker callback? i don t have control of the main loop as it s looping in a library and would very much like to have a failsafe, so if it stays too long in one place, it sends it to sleep
i get a crash and a restart so far when trying to call ESP.deepSleep(15 1000 1000); from the ticker.once callback
Markus
@Links2004
Jul 31 2015 14:36
ESP.deepSleep has only 2 Parameter?
  void deepSleep(uint32_t time_us, RFMode mode = RF_DEFAULT);
tzapu
@tzapu
Jul 31 2015 15:16
yes, sorry, that was gitter trying to be smart
it s just a multiplication
15 1000 1000
````1510001000
damn it
1510001000
i m sorry, i can t make it show multiply star
ESP.deepSleep(15 /*mins*/ * 60 * 1000 * 1000);
aha
sticilface
@sticilface
Jul 31 2015 15:19

anyone seen this error before / know how to resolve it?

[W]sec 3fe error

my esp-01 prints this indefinitely, tried different sketches, flash sizes, uploading blank.bin. Somewhere i saw it might be to be with write protected flash, by my IDE uploads fine, esptool.py on the other hand fails every time. I'm a bit stuck

The sketch booted after I loaded it, but this happened when i plugged it in to another device. Never had it before. Now it seems bricked..
Harrison Mclean
@h4rm0n1c
Jul 31 2015 15:58
I found this: anakod/Sming#78
@sticilface and this: nodemcu/nodemcu-firmware#523
In essence, it appears to be an issue with esptool.py
Markus
@Links2004
Jul 31 2015 16:02
esptool.py fixed version: https://github.com/Links2004/esptool
sticilface
@sticilface
Jul 31 2015 16:08
this is what i was thinking. except. esptool.py multiple version tried, including the nodemcu one just won't flash it at all. The esptool that comes with the arduino IDE, has no problems flashing. but it gives me this error, on boot. so I'm a bit stuck
sticilface
@sticilface
Jul 31 2015 16:18
Im wondering if i've bricked the flash with a voltage spike or something. weird as i've been plugging / unplugging them for months with no issues
Michael Miller
@Makuna
Jul 31 2015 16:59
@tzapu what library goes into a tight loop that is expected to be called in the main loop? I consider this very bad, as then it won't play well with other libraries.
tzapu
@tzapu
Jul 31 2015 18:02
@Makuna my lib https://github.com/tzapu/WiFiManager :P , it hijacks the loop until you are connected then it gets out of the way. if this is bad practice, i should rewrite it i guess, i was just thinking to have it as simple to drop in, and to not have to have it in the loop when it s not in use..
sticilface
@sticilface
Jul 31 2015 18:31
@Link2004 The error was flashing past so quickly that i missed the part where it does actually load my sketch... despite that it should be overwritten, so it seems to be a read only issue. Any ideas on how I can use ESPtool.py to clear it, or esptool? I can't get esptool.py to work. I get this response:
Connecting...
Erasing flash...
Writing at 0x00000000... (100 %)
Traceback (most recent call last):
  File "/Users/a/git/pyesptool/esptool.py", line 539, in <module>
    esp.flash_block(block, seq)
  File "/Users/a/git/pyesptool/esptool.py", line 199, in flash_block
    raise Exception('Failed to write to target Flash')
Exception: Failed to write to target Flash
Markus
@Links2004
Jul 31 2015 18:34
how big is you sketch and which flash is assembled?
erase only: esptool.py -p $(ESPPORT) -b $(ESPBAUD) erase_flash
if this fails too, may your flash is defective. Based on your soldering skills it can be released, good replacement is GD25Q32B (4MB).
Lukas Höppner
@Wuschli
Jul 31 2015 18:51
Hey guys, i am having a problem with an esp-12e on mac. The arduino IDE says that it's flashing successfully, but none of my code is executed. The esptool programmer is not listed. Do i have to burn a bootloader somehow?
Lukas Höppner
@Wuschli
Jul 31 2015 18:53
yep, DTR, RTS, RX, TX and GND are connected to the CP2102
Markus
@Links2004
Jul 31 2015 18:54
or do you have GPIO0 at GND, then its never starts the code
pulldown on GPIO15?
Lukas Höppner
@Wuschli
Jul 31 2015 18:54
GPIO0 is pulled up with 10k ohm and connected to DTR
Yes, GPIO15 is pulled down
Markus
@Links2004
Jul 31 2015 18:55
can you post the boot messages at 76800 Baud?
they shut look like this:
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)                                   

load 0x4010f000, len 1264, room 16                                              
tail 0                                                                          
chksum 0x42                                                                     
csum 0x42
Lukas Höppner
@Wuschli
Jul 31 2015 18:59
"0�n?�4�!�{�OAa�" This is everythin i get with "screen /dev/cu.SLAB_USBtoUART 76800"
Markus
@Links2004
Jul 31 2015 19:00
direct after reset?
Lukas Höppner
@Wuschli
Jul 31 2015 19:00
can i set the arduino serial monitor to 76800?
yes
Markus
@Links2004
Jul 31 2015 19:01
yes arduino serial monitor can handle it
ok its 74880 to be fully correct.
Lukas Höppner
@Wuschli
Jul 31 2015 19:02
but there's no option for that :(
Markus
@Links2004
Jul 31 2015 19:03
what is the version of the ide?
1.6.6 shut have the patch for it
arduino/Arduino@db75e67
Lukas Höppner
@Wuschli
Jul 31 2015 19:04
now i get ets Jan 8 2013,rst cause:2, boot mode:(1,4)
Markus
@Links2004
Jul 31 2015 19:05
and there we see the problem boot mode:(1,4) witch mean GPIO0 is low.
what terminal you use for testing, the arduino serial monitor has the problem to pull DTR down.
Lukas Höppner
@Wuschli
Jul 31 2015 19:08
I've diconnected it from the CP2102. Now i get
 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
~ld
Markus
@Links2004
Jul 31 2015 19:08
yes now your code shut be executed, set the baudrate based of you code :)
Lukas Höppner
@Wuschli
Jul 31 2015 19:09
wow, thx. That's much further than I#ve ever been :D
Markus
@Links2004
Jul 31 2015 19:10
have fun with your ESP
Lukas Höppner
@Wuschli
Jul 31 2015 19:11
thank you very much :)
sticilface
@sticilface
Jul 31 2015 19:25
@Links2004 well.... its an ESP-01 that i've already de-soldered and replaced the flash on with a 4MB model (and it +3 others have been working fine for 2 weeks until now)... I've got exams in a few weeks so i put everything in the loft to avoid procrastination. Needless to say... i just got them down and replaced the chip, and it all works. so flash was corrupted! Soldering on a chip for the second time is not as easy as the first!
Lukas Höppner
@Wuschli
Jul 31 2015 19:25
And can you tell me the difference between QIO AND DIO flash mode? :)
Markus
@Links2004
Jul 31 2015 20:35
@sticilface have you tried to read/write the chip with external hardware (i use a cheap ch341a programmer for SPI and I2C)
@Wuschli QIO (Quad SPI 4 Bit for 1 clock) use more pins the DIO (Dual SPI 2 Bit for 1 clock) and QIO is 2x faster then DIO.
This message was deleted
sticilface
@sticilface
Jul 31 2015 22:44
@Links2004 nope. I've not got one of those, so i can't really try it!