New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with esp8266 OTA #417
Comments
@igorjan Can you try testing "ESPWebServer/HelloSever.ino" (inarduino ide examples) and see if you can access the mentioned IP-Address and also try to ping the ip-address and see if you get any response. if you cannot access the ip-address, then its problem with your machine. |
@itsjustvenky the HelloServer.ino works without a problem. I get "hello from esp8266!" in the web borwser. I can ping the IP, also I tested the UDP port 8266 on the ESP which is used for OTA and it seems to be open. |
@igorjan which version of platformio are you using ? and also can you try to upload the same code using arduino-ide and see if that works. |
@itsjustvenky platformio version 2.6.3 |
@igorjan try to specify IP as http://docs.platformio.org/en/latest/projectconf.html#upload-port . Don't pass it to console as argument. |
Here you can see 3 attempts with different definitions of upload-port. Attempt 1: [12/30/15 16:19:27] Processing nodemcu (platform: espressif, board: nodemcu, framework: arduino)BeforeUpload(["upload"], [".pioenvs\nodemcu\firmware.bin"]) Attempt 2: [12/30/15 16:19:47] Processing nodemcu (platform: espressif, board: nodemcu, framework: arduino)BeforeUpload(["upload"], [".pioenvs\nodemcu\firmware.bin"]) Atempt 3 [12/30/15 16:20:16] Processing nodemcu (platform: espressif, board: nodemcu, framework: arduino)BeforeUpload(["upload"], [".pioenvs\nodemcu\firmware.bin"]) error: Failed to open '192.168.1.40' |
Please read my comment above #417 (comment). Don't pass IP to terminal. See example http://docs.platformio.org/en/latest/platforms/espressif.html#over-the-air-ota-update Add this line to your
|
Isn't this a windows/click/esptool problem? If windows tokenizes periods as separate tokens, you need to quote it if you want to pass it in the command line. |
@ivankravets sorry I misunderstood you. I was doing it with platformio.ini file all along. |
@igorjan please wait for the new development version. I'll ask you to test it. 1-2mins |
@igorjan could you paste directly yo terminal this
Does it work? |
@ivankravets |
@igorjan STOP STOP 🙅 Did you upload OTA sketch before make OTA uploading? |
No here problems with IP. Looks like you didn't upload OTA sketch and din't configured it. |
damn... we totally forgot the basic question... |
@itsjustvenky :) 🍸 New Year... |
Yes I did have the OTA example uploaded via serial before trying OTA. I even changed some strings in the serial.print so I'm sure that the correct sketch is uploaded. |
@igorjan could you make SPIFFS OTA uploading using Arduino IDE? See https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#uploading-files-to-file-system |
@namoaton tried your project it is the same |
@ivankravets Will try arduino but have to install it first |
@igorjan https://github.com/esp8266/Arduino/blob/master/doc/ota_updates/ota_updates.md Try this arduino build : Arduino-PR-4107-BUILD-421 else you need to manually set the IP-Address in arduino preference files. |
OK tried the arduino and it works without a problem. The sketch is the same. |
@igorjan print here |
c:\Users\User.platformio\packages\tool-esptool>platformio --version |
the actual command is
|
@itsjustvenky for your command I get: 8.1.40, board: nodemcu, framework: arduino)(["upload"], [".pioenvs\nodemcu\firmware.bin"]) |
@ivankravets if I remove the double qutes. I get the error: 18:13:45 [CRITICAL]: Not enough arguments. The command python espota.py -i 192.168.1.40 -p8266 -f .pioenvs\nodemcu\firmware.bin |
Ok, now please revert |
@igorjan I think "ivankravets" just fixed something related this ip-address. Please install latest dev. version. |
I don't understand behaviour of your machine. Please revert back quotes. If it helps, I'll added them to code. |
@igorjan Could you try without TCP/IP port? |
@ivankravets notice that he's running esptool, not espota. Why would that work?
|
OK this works too: python espota.py -i 192.168.1.40 -f C:\Igor_i\ESP8266\Project1.pioenvs\nodemcu\firmware.bin |
Also in version dev13 I get error 18:18:56 [CRITICAL]: Not enough arguments. With or without qutes for upload port |
I've just pushed dev14. Please try it |
Dev 14 is the same 18:18:56 [CRITICAL]: Not enough arguments. If you guys want I can give you team viewer access to the computer so you can test yourself |
@igorjan Can you paste your platformio.ini here? |
[env:nodemcu] |
Yes, please mail me@ikravets.com with TeamViewer Id/pass. Thanks |
@igorjan can you post all the text from your console from the starting of platformio run... |
@igorjan You should surround your code with three tildes:
|
This seems to fix it (platformio/builder/scripts/espressif.py:233):
|
Guys, the problem was linked with launching I'll fix it and paste directly current Python interpreter |
@igorjan please try the latest |
:) This one works without problem Thank you guys for your help, really appreciate it. |
Thank you too that report it. I'm going to release 2.7.0 🎄 😊 |
@itsjustvenky, @skorokithakis and @namoaton - THANKS A LOT FOR THE HELP! 🍻 |
Thanks for a great project, @ivankravets! |
When I try the OTA example found here:
https://github.com/esp8266/Arduino/blob/master/libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino
I encounterd when uploading the OTA script didn’t seem to recognize my input IP. I was getting:
14:21:38 [CRITICAL]: Not enough arguments.
It seems on windows you must specify upload port in ” ” like this.
upload_port = “192.168.1.40”
When I set the IP in " " I get this output when I do an upload:
esptool v0.4.6 – (c) 2014 Ch. Klippel
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to 192.168.1.40
espcomm_upload_file
stat .pioenvs\nodemcu\firmware.bin success
error: Failed to open 192.168.1.40
error: espcomm_open failed
scons: *** [upload] Error -1
[ ERROR ]
Any Idea? I disabled the firewall and the IP is definitely OK. I tested the UDP port 8266 and it is open.
Also there is no activity on the serial monitor when I try OTA.
I think the problem is still in the IP address somehow it is not recognized properly.
The text was updated successfully, but these errors were encountered: