These are chat archives for esp8266/Arduino

5th
Dec 2015
Alexandro Todeschini
@asetyde
Dec 05 2015 00:18
Hi , someone has some problem with dht22 ? My devices sometime block, usually after 2h or 7h .. I can not see serial for many time and I think it's difficult to see something if it blocks
I use MySQL library with a catalex photo resistor and also dht22 on pin SD3. After some time no data on database and no reply but router see device connected .. I can't Have a Device that it can block .
Without sensor , device work correctly
Thanks who help
Steve Nelson
@zenmanenergy
Dec 05 2015 00:30
Is there some new delay happening on the first request from a web server? I’m consistenty getting a 30 second delay for the very first web server request. after that, all requests are normal again.
torntrousers
@torntrousers
Dec 05 2015 00:35
@Links2004 thanks for the initVariant example, that worked
Steve Nelson
@zenmanenergy
Dec 05 2015 00:39
it’s not even just the first web server request. Now it looks like there is a 30 second delay for the first web request AFTER I connect to the device’s wifi. it’s happening 100% of the time and almost dead on 30 seconds.
beikeland
@beikeland
Dec 05 2015 01:12

ESP.getChipId() "collision" or fakes? I have three ESP modules online atm. But only they have different OUIs
ESP-d6d279 18:fe:34:d6:d2:79 Espressif Inc.
ESP-02215c 5c:cf:7f:02:21:5c ?
ESP-01eefe 5c:cf:7f:01:ee:fe ?

the hostname is made up of "ESP-"+ESP.getChipId() which match the three last bytes of the mac address. Couldn't this lead to an very unlikely event where two devices would have the same ESP.getChipId() but unique OUIs?

@Links2004 @igrr
:)
ah, nevermind, something is missing there
Angus Gratton
@projectgus
Dec 05 2015 03:34
does WiFiClientSecure support tls client certificates?
beikeland
@beikeland
Dec 05 2015 04:37
@projectgus was some talk about client certs earlier; does this answer you question? https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/WiFiClientSecure.h#L51-L65
Angus Gratton
@projectgus
Dec 05 2015 04:54
oh, wow. I think I last synced my local repo yesterday. Thanks beikeland !
beikeland
@beikeland
Dec 05 2015 04:59
yeah the speed at which these guys fix things is almost outrageous.. credit is due igrr, who actually wrote the code
Angus Gratton
@projectgus
Dec 05 2015 06:02
beikeland: yes, good point. thanks igrr :)
Hassanbenlebsir
@Hassanbenlebsir
Dec 05 2015 10:06
@Links2004 when i try this page https://github.com/Links2004/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiClientMin/WiFiClientMin.ino it tells me page not found did you maybe copied it wrong or is it deleted?
Alexandro Todeschini
@asetyde
Dec 05 2015 10:07
I put big visual studio code analysis report on ISSUE section , some are not real but there many black hole i think
beikeland
@beikeland
Dec 05 2015 12:25
can the arduino ide make cloud ota compatbile images like user1.bin and user2.bin?
Markus
@Links2004
Dec 05 2015 12:25
no
we have a other flash concept
torntrousers
@torntrousers
Dec 05 2015 12:26
Hi there. Can anyone help a newbie with using esptool.py? I've not used esptool.py before and trying to collect the debug data for issue 1147, so do python esptool.py --port COM6 read_flash 0 4194304 flash.bin. But the command just seems to hang doing nothing. I think i've set the jumpers correctly - this page https://github.com/themadinventor/esptool says GPIO0 and GPIO15 is pulled down and GPIO2 is pulled high. So i do that and then run esptool and it just says Connecting...Please wait...
beikeland
@beikeland
Dec 05 2015 12:26
figured as much, but had a small hope. I guess i'll need to mod and flash my esp-05 modules then. thanks for the prompt response though!
Markus
@Links2004
Dec 05 2015 12:27
@beikeland the IDE has OTA support, you also can download new bin files via http / https
but you need at least one a serial connection for the first upload
beikeland
@beikeland
Dec 05 2015 12:28
yeah, love it. but my esp-05 modules have AT firmware, and doesn't break out gpio00, so was hoping to avoid cutting traces and stuff
i'll keep playing with the esp-12 modules till i find a moment to play doctor with the 05's :)
Markus
@Links2004
Dec 05 2015 12:31
based on this is near to impossible.
the second right on the bottom is GPIO0
beikeland
@beikeland
Dec 05 2015 12:33
i know... :/ but i have a usb microscope and a cnc, so i think'll get it cut ok. not sure if i can get it pulled low. but it'll be fun trying :)
Markus
@Links2004
Dec 05 2015 12:33
yes, its a challenge :)
beikeland
@beikeland
Dec 05 2015 12:36
i guess i was more concerned about the form factor than the features ... but i'm just a man :D
Markus
@Links2004
Dec 05 2015 12:37
if you have a SPI flash tool you can flash directly one time.
beikeland
@beikeland
Dec 05 2015 12:37
i'll try the buspirate on the 2nd victim, first one goes under the knife for the hell of it.
Markus
@Links2004
Dec 05 2015 12:39
i have some cheap ch341a flash programmer, it work well in sircut
simply putting the clip on the chip and ready to go.
torntrousers
@torntrousers
Dec 05 2015 12:50
@Links2004 so thats what a NodeMCU board is by default right? So just plug it in with a USB cable and run the python command?
torntrousers
@torntrousers
Dec 05 2015 12:55
Oh, it does, i guess i just didn't wait long enough before. Thanks!
Hassanbenlebsir
@Hassanbenlebsir
Dec 05 2015 13:02
@Links2004 i managed to send a request to the my desktop app with my esp
beikeland
@beikeland
Dec 05 2015 13:15
@Links2004 i found the soic clip and ch341a programmer for $6, so i guess it can wait two weeks. Using the same binary from the arduino IDE or any special preparations needed?
Markus
@Links2004
Dec 05 2015 13:15
same bin and it will work :)
beikeland
@beikeland
Dec 05 2015 13:16
cool, thanks for the tip!
Also, regarding OTA firmwares, I'm not seeing my arduinos in my IDE. And searched high and low to find out that i think dns-sd -B _arduino._tcp is the command to verify bonjour is workin. Maybe add it the the OTA readme?
Ivan Grokhotkov
@igrr
Dec 05 2015 13:31
@Links2004 could you please look at #1111?
it seems to work for me, but i may be missing something
Markus
@Links2004
Dec 05 2015 13:33
the httpUpdate use the Updater class and not deal with any addresses itself.
Markus
@Links2004
Dec 05 2015 13:40
@igrr i have checked the Update class and there the data will be stored aligned to the flash sectores, i see no problem.
Image-1.jpg
even smaller than nodemcu
beikeland
@beikeland
Dec 05 2015 17:13
:point_up_2: have ordered a few a about a week ago; primary reason being it allegedly fit on a breadboard with room for one row of wires. Looking forward to receiving them!
Endre Karlson
@ekarlso
Dec 05 2015 18:04
is there security on the OTA functionality of the arduino stuff ?
but the connection itself is not encrypted,
if you need ssl you shut download form a https server and pin the certificate
Tony
@toxuin
Dec 05 2015 18:49
So about the ESPhttpUpdate. Is it possible to upload merged binary (sketch + SPIFFS)?
Markus
@Links2004
Dec 05 2015 18:51
since the bin need to match in the space between the old sketch and the spiff,
there will be to less space.
Tony
@toxuin
Dec 05 2015 18:52
Sketch uses 271,060 bytes (25%) of program storage space. Maximum is 1,044,464 bytes. Am I good with that?..
Markus
@Links2004
Dec 05 2015 18:52
but a separated update will be possible, but not implemented yet.
but the different is basically one line, between bin and spiffs.
but the new binary to upload will need 1MB wenn you merge the sketch + spiffs
Tony
@toxuin
Dec 05 2015 18:54
You mean the flash size? Minimum flash size should be 1MB or it should be like 2MB minimum?..
Markus
@Links2004
Dec 05 2015 18:55
the flash size does not make a differes its a more basic problem when you merged
Tony
@toxuin
Dec 05 2015 18:57
oh. I see. That's kinda sad that this is not implemented yet. Would be a neat feature, I suppose. Full firmware updates and such ^_^
Markus
@Links2004
Dec 05 2015 18:57
when you merge you need to add a "dummy" space between bin and spiff.
and by adding this you will allays the hit the size.
in too steps ist possible
without reboot
but 2 http requests
beikeland
@beikeland
Dec 05 2015 18:58
without reboot? when using espota.py or only when using a webserver to download?
Tony
@toxuin
Dec 05 2015 18:59
I'm doing it like this: esptool.py make_image -f SKETCHNAME.cpp.bin -a 0x000000 -f SKETCHNAME.spiffs.bin -a 0x30000 output_file_name.bin
Markus
@Links2004
Dec 05 2015 18:59
no espota, ESPhttpUpdate will download all files from a webserver, no IDE involved.
Tony
@toxuin
Dec 05 2015 19:00
that's just to create the image it is going to download.
Markus
@Links2004
Dec 05 2015 19:01
the image will create by mkspiffs.
espota and esptool are for upload
beikeland
@beikeland
Dec 05 2015 19:02
i've been executing espota twice, once with -f sketch.bin and once with -s -f spiffs.bin as i've not yet finished the webserver to fetch code from. but it works for now
Markus
@Links2004
Dec 05 2015 19:02
yes espota need 2 calls
Tony
@toxuin
Dec 05 2015 19:02
sure. That's the same file that is getting generated by clicking "Sketch data upload" in the IDE.
beikeland
@beikeland
Dec 05 2015 19:03
Would it be possible to allow some grace period between the calls to avoid the code to start up before the 2nd download?
Tony
@toxuin
Dec 05 2015 19:06
there's 'wait' command on linux. You can specify number of seconds it should wait in the first parameter.
for windows shell scripts the command is 'timeout'
Does my "esptool make_image ..." command mentioned above offsets the sketch space as @Links2004 were mentioning before? What's the proper way of doing that offset?..
Markus
@Links2004
Dec 05 2015 19:11
the offset depends on the flash size
its coming from here: https://github.com/esp8266/Arduino/blob/master/tools/sdk/ld/eagle.flash.4m1m.ld#L15
subtract 0x40200000 from it an you have the address
both the same information
Tony
@toxuin
Dec 05 2015 19:13
yep, that's where I got it from :smile:
I guess I should just try it and see. Thanks!
Markus
@Links2004
Dec 05 2015 19:14
you can create a image like this but no way to upload it via http will never fit between the old sketch and the old spiff
will change the http Upload a bit to support spiff update.
Tony
@toxuin
Dec 05 2015 19:14
Thanks! ^_^
beikeland
@beikeland
Dec 05 2015 19:24
but its okay to download a combined image once, and still have the free space in the middle for a non-combined ota update later?
Markus
@Links2004
Dec 05 2015 19:24
yes but the upload is only possible by Serial bootloader ;)
beikeland
@beikeland
Dec 05 2015 19:24
gotcha. thanx
Tony
@toxuin
Dec 05 2015 19:36
NEAT!
I'll test it out once I get home. I'll let you know for sure!
alon24
@alon24
Dec 05 2015 19:42
hi, I just tried using gpio9 for blink example, on my nodemcudevkit 1.0, and it does not wotk (does not work, in lua, in sming and also here)
has anyone here managed to get gpio9 working for him?
Markus
@Links2004
Dec 05 2015 19:48
do you use D9 or 9 ?
alon24
@alon24
Dec 05 2015 19:49
9
Markus
@Links2004
Dec 05 2015 19:49
thats the problem :)
alon24
@alon24
Dec 05 2015 19:50
so gpio9 is D9?
Markus
@Links2004
Dec 05 2015 19:51
the marking of the board does not match the gpio naming of the processor.
alon24
@alon24
Dec 05 2015 19:51
its actualluu sd2
actually
Markus
@Links2004
Dec 05 2015 19:52
if you want to use the pin marked as D9 on the board write D9 in code and not 9
in gpio meaning D9 is in real gpio3
no i want GPIO9 which Should be available, when using DIO mode
GPIO9==SD2 in nodemcu devkit 1.o
Markus
@Links2004
Dec 05 2015 19:53
k never tested, i only own ESP12 modules.
there is no access to gpio9
alon24
@alon24
Dec 05 2015 19:54
no esp12e??
Markus
@Links2004
Dec 05 2015 19:54
i ordert 20 ESP12 at a time where no esp12e exists :)
alon24
@alon24
Dec 05 2015 19:54
:(
esp12e gives u atleast 1 more (gpio10) gpio
its worth the 4.6$ for nodemcu devkit
(IMHO)
Tony
@toxuin
Dec 05 2015 19:56
I just don't see why I need USB on the ESP8266. I want module to be as cheap and as compact as possible. I use bare-bones modules and solder resistors/caps like spaghetti on top of it ^_^
alon24
@alon24
Dec 05 2015 19:56
for dev work
its so much better to have usb on board, no soldering, just work!!!
for production,u r correct
(well, if u r hobbiest, I would still like my usb port)
Markus
@Links2004
Dec 05 2015 19:58
i made a simple pcb with all needed resistors and caps and a small connector for upload and debugging
Tony
@toxuin
Dec 05 2015 19:59
I made an adapter to FTDI thingy. Works flawlessly, costs $0. Bunch of wires and a female pin strip.
alon24
@alon24
Dec 05 2015 20:02
I do not argue, I just state my opinion, I am happy u r happy, I just said my opinion, I am (was) novice at this
Tony
@toxuin
Dec 05 2015 20:02
:-D
brutzler
@brutzler
Dec 05 2015 21:42
Hi, does anybody know at which WLAN-standard the ESP is working?
802.11g, 802.11n or 802.11b ?
based on what your router can handle
brutzler
@brutzler
Dec 05 2015 21:45
My router is setup as 802.11n+g+b. Which one does the ESP take in that case?
Markus
@Links2004
Dec 05 2015 21:47
n if the signal is good enough to transport it.
brutzler
@brutzler
Dec 05 2015 21:49
can this change during online, or is this handled out on connecting and then as long as online?
BTW: n is best of theese three or?
Markus
@Links2004
Dec 05 2015 21:50
yes WiFi devices change mode and data rate based on signal
yes n with one antenna supports up to 150Mbit
also they mode can be changes dynamically to save power
brutzler
@brutzler
Dec 05 2015 23:07
but the ESP can only work at 2,4GHz?
Chris Elsworth
@celsworth
Dec 05 2015 23:12
yes, no 5GHz