- Sun Apr 17, 2016 3:07 pm
#45652
Hi @danbicks,
To provide complete answer I have verified OTA from Arduino IDE using the following:
• esp8266/Arduino core 2.1.0
• Arduino IDE 1.6.8 on Windows 7 x64 PC
• BasicOTA.ino sketch available in File > Examples > ArduinoOTA.
Default port is 8266, how can the IDE be set for lets say 1500 ?
1. In BasicOTA.ino sketch add the following line to redefine the default port:
2. Restart Arduino IDE. This is to reload platform.txt as IDE seems to store it in cache.
3. Enable “upload” option in File > Preferences under “Show verbose output during:”. This is to see what port is passed (after -p) by Arduino IDE to upload script.
4. When doing the upload to module with IP = 192.168.1.112 you should see output similar to the following:
Code: Select allpython.exe C:\Users\Krzysztof\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i 192.168.1.112 -p 1500 --auth= -f C:\Users\KRZYSZ~1\AppData\Local\Temp\buildc6c13c389f0ec080a85c51444b8b7ed6.tmp/BasicOTA.ino.bin Uploading...........................................................................................................................................................................
Has the password issue been fixed yet? I.E when setting a password the IDE does not seem to validate the correct password.
I remember a post reporting such issue. I believe IDE is storing platform.txt in cache and not reloading it if input parameters are changed. Restarting IDE (just once) if password is added or changed should resolve this issue.
To protect OTA upload with a password please check
this specific instruction. A summary is below.
1. In BasicOTA.ino sketch add the following line to enable password protection (I assume you will invent a better password later on
):
Code: Select allArduinoOTA.setPassword((const char *)"123");
2. Enable “upload” option in File > Preferences under “Show verbose output during:”. This is to see what password is passed by Arduino IDE to upload script.
3. Restart Arduino IDE. This is to reload platform.txt as IDE seems to store it in cache.
4. When doing the upload to module with example IP = 192.168.1.112 you should see output similar to the following:
Code: Select allpython.exe C:\Users\Krzysztof\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0/tools/espota.py -i 192.168.1.112 -p 1500 --auth=123 -f C:\Users\KRZYSZ~1\AppData\Local\Temp\buildc6c13c389f0ec080a85c51444b8b7ed6.tmp/BasicOTA.ino.bin
Authenticating...OK
Uploading...........................................................................................................................................................................
I have embedded a telnet server in my app, all working great with password authentication and command control etc. Is there a way to turn OTA on and OFF? this would be really useful.
This is cool and you are a step ahead from adding even more functionality. Module is listening to OTA uploads if function below is periodically called inside the loop():
To turn OTA on or off I would call this function conditionally – something like below:
Code: Select allvoid loop()
{
if (enableOTA == true)
{
ArduinoOTA.handle();
}
(…)
}
And lastly are there any major know issues with existing library's and OTA that you are aware of?
Nothing I am aware of. I am using OTA with Arduino IDE for several months now and it works very stable for me.
Got to say amazing work you have done with the guys on this mate, well done you.
Thank you on behalf of @igrr and the team! I do not know the whole history but briefly checking the GitHub I believe that @mangelajo and @me-no-dev did most of programming of
ArduinoOTA library including
modification of Arduino IDE.
I am loving this OTA incredible stuff.
Me too and hence such lengthy post
Krzysztof
Last edited by krzychb on Mon Apr 25, 2016 12:54 pm, edited 1 time in total.