by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:36
  • 01:33
    maktech opened #7522
  • Aug 12 22:25
    devyte milestoned #7521
  • Aug 12 22:25
    devyte labeled #7521
  • Aug 12 22:24
    devyte opened #7521
  • Aug 12 22:24

    devyte on devyte-serialdoc

    Fixes #7484 (compare)

  • Aug 12 19:42
    d-a-v review_requested #6518
  • Aug 12 18:49
  • Aug 12 18:14
    d-a-v synchronize #6518
  • Aug 12 18:06
    d-a-v synchronize #6518
  • Aug 12 18:02
    d-a-v synchronize #6518
  • Aug 12 17:52
    d-a-v labeled #7476
  • Aug 12 17:51
    d-a-v labeled #7476
  • Aug 12 17:14
    d-a-v closed #7335
  • Aug 12 15:28

    earlephilhower on master

    Fix spelling typos in files und… (compare)

  • Aug 12 15:28
    earlephilhower closed #7520
  • Aug 12 15:06
    earlephilhower synchronize #7520
  • Aug 12 14:35
    standby24x7 opened #7520
  • Aug 12 10:43
    d-a-v synchronize #6518
Luc
@luc-github

Hi about OTA procedure:

I use the content of BasicOTA.ino in my project and flashed my NodeMCU, serial terminal shows :
M117 Connecting...
M117 192.168.0.120
OTA server at: ESP8266-OTA-22e89:8266

so server look ready

I use the tool python ota_server.py to do OTA to flash a new version of my project

C:\Users\user\Desktop\ld5110>python ota_server.py 192.168.0.120 esp8266.cpp.bin

so terminal display this:

starting up on 0.0.0.0 port 48266
upload size: 437120
sending invitation
waiting for a connection
connection from ('192.168.0.120', 4097)
opening file esp8266.cpp.bin
sending 4096
sending 4096
....
sending 4096
sending 2944
done!

and serial terminal display this:
Update Start: ip:192.168.0.101, port:48266, size:437120
ERROR[0]: No Error

looks fine but atually ESP Fw is not modified even after a restart
do I missed something ?

Luc
@luc-github
Thanks
Dmitry Kireev
@kireevco
@kathir1951 hey, so looks like my environment and script works fine. tested 3 times
kathir1951
@kathir1951
@kireevco Thanks Nice
Dmitry Kireev
@kireevco
I will test more for linux and mac, and I hope we can have a nice cross-platform build script for toolchain
Ivan Grokhotkov
@igrr
@kireevco for OS X don't forget to add export MACOSX_DEPLOYMENT_TARGET=10.7 (or maybe even 10.6) to the build script.
Dmitry Kireev
@kireevco
@igrr what does it do? (where is it used)
@igrr thank you
Ivan Grokhotkov
@igrr
basically when someone builds an executable on OS X, by default compiler will target the same OS X version. the option i mentioned is to make sure the binary will run on older versions as well
it's used by clang/gcc
Dmitry Kireev
@kireevco
ah, that’s for gcc?
got it
thank you. mac specific.
Ivan Grokhotkov
@igrr
there's also an equivalent GCC/clang command line option, -mmacosx-version-min, but i find it easier to set MACOSX_DEPLOYMENT_TARGET once in the environment rather than making sure -mmacosx-version-min gets passed into each configure script correctly.
just my 2 cents, i remember people having issues when I built toolchain without this option
Dmitry Kireev
@kireevco
@igrr appreciate it!
I like esp-open-sdk because it’s open… but it doesnt’ work on windows yet :(
doesn’t build..
Ivan Grokhotkov
@igrr
yeah, i saw pfalcon is reluctant to fix that, despite the fact that windows has about 80% user share in the esp8266 community
Dmitry Kireev
@kireevco
yep :(
I’m trying to arrange build environment here https://github.com/kireevco/packages/tree/master/esp-open-sdk/windows
tried cygwin, mingw… there are issues… and testing cycle is pretty long .
(just complaining) :-D lol.
Ivan Grokhotkov
@igrr
yeah, i remember it took me a few nights to troubleshoot everything and build windows toolchain on my old laptop
last time i had to do this, i got myself a D4 instance from azure cloud
Dmitry Kireev
@kireevco
I got myself a host on hetzner, and built a proxmox host
you did a great job, thanks for your help too :)
Ivan Grokhotkov
@igrr
ok, actually windows is down to 67%
esptool-0.4.5-linux32.tar.gz: 1103 downloads
esptool-0.4.5-linux64.tar.gz: 5845 downloads
esptool-0.4.5-osx.tar.gz: 5592 downloads
esptool-0.4.5-win32.zip: 27600 downloads
Dmitry Kireev
@kireevco
nice data
still, lots of windows users
Ivan Grokhotkov
@igrr
@luc-github what does the serial log show after (and during) restart?
Luc
@luc-github
@igrr I use swap to avoid serial garbage when I send a retart command and I do not have serial enable few seconds after restart for same reason, so If there is no obvious mistake in procedure I describe to you - now I will dig using simple sample and report the output - thanks for your help
Luc
@luc-github
I used BasicOTA.ino just add an output at each loop and a delay(2000) and same output - upload ok - ERROR[0]: No Error but after sample continue and do not reset - here the output
OTA server at: ESP8266-OTA-22e89:8266
Ready
First version
First version
First version
Update Start: ip:192.168.0.101, port:48266, size:346816
ERROR[0]: No Error
First version
First version
First version
if I restart it is like no upload happened :
OTA server at: ESP8266-OTA-22e89:8266
Ready
First version
First version
First version
the uploaded is same code but with output "second version"
Luc
@luc-github
from another hand, if I use WebUpdater.ino, it works!
after upload the reset happen and new sketch is used - weird
Ivan Grokhotkov
@igrr
since this line doesn't run, apparently there is some error:
Serial.printf("Update Success\nRebooting...\n");
can you please uncomment this line in Updater.cpp and try again?
//#define DEBUG_UPDATER Serial
Updater.cpp is in cores/esp8266 directory
Luc
@luc-github
I have compared code and found difference between ESP8266HTTPUpdateServer.cpp and ArduinoOTA.cpp, first one use if(Update.end(true)) second use if(Update.end())
by changing if(Update.end(true)) in ArduinoOTA.cpp first time update succeed but go into dead loop second try it worked
ok will do #define DEBUG_UPDATER Serial
ok result is :
First version
Update Start: ip:192.168.0.101, port:48266, size:346928
premature end: res:0, pos:339968/346928
ERROR[0]: No Error
First version
First version
Luc
@luc-github
looks like some part is missing
missing 6960 = 4096 + 2864
sending 4096
sending 2864
done!
could be first and last packet ? or 2 last packets ?
Luc
@luc-github

the web update - works without problem:

Booting Sketch...
HTTPUpdateServer ready! Open http://esp8266-webupdate.local/update in your browser
Staged: address:0x00059000, size:0x00054B30

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42
@cp:0
ld
Booting
OTA server at: ESP8266-OTA-22e89:8266
Ready
Second version
Second version

could be a bug in ota_server.py ?
I tried espota.py but it is not working
Luc
@luc-github

somehow ota_server.py connection.close() is taken in account too fast - I have added a sleep and now the number of packet is correct

adding :

finally:
  time.sleep(2)
  connection.close()