Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By krzychb
#34543 Thanks to @brutzler uncovering how customize Arduino IDE and after learning how to update ESP using a web browser, I decided to combine this knowledge and add cURL upload option to Arduino IDE menu.
Upload Using cURL Menu Option.png

This is to provide another convenient tool to upload ESP thanks to variety of OTA options developed by esp82666/Arduino team - thank you guys!

Why upload with cURL out of Arduion IDE may be useful? Well, there couple of reasons:
• It is about 3x quicker than serial upload
• It is far quicker and convenient than OTA with web browser
• It is fully interchangeable with web browser’s upload
• Serial Monitor is still available for debug

Here is how to do it in five steps:

1. If not done already, go through all the steps to have OTA with web browser work for you

2. Update configuration of Arduino IDE as below:
a. boards.txt
Code: Select allgeneric.menu.UploadTool.curl=cURL
generic.menu.UploadTool.curl.upload.tool=curl

update of boards file.PNG

b. platform.txt
Code: Select alltools.curl.cmd=curl
tools.curl.cmd.windows=curl.exe

tools.curl.upload.protocol=curl
tools.curl.upload.params.verbose=-v
tools.curl.upload.params.quiet=-s
tools.curl.upload.pattern= "{cmd}" {upload.verbose} -F "image=@{build.path}/{build.project_name}.bin" esp8266-webupdate.local/update

update of platform file.PNG

c. restart Arduino IDE

3. Install cURL:
a. Open http://curl.haxx.se/download.html
b. Scroll down, contemplate the freaking awesome number of platforms cURL is available for :shock: :shock: and say “Oh, my God” or “Holy crap” depending on if you are a woman or a man ;)
c. Pick file for your O/S, upload and install cURL

4. Upload your ESP with sketch WebUpdater.ino covered in step 1 using serial.

5. Once module restarts and is ready for OTA upload, change “Upload Using:” to cURL and now you should be able to upload module with cURL.
cURL update successful.png

Note: in case of issue with upload go to File > Preferences and for “Show verbose output during:” check out “upload”. You will be able to see details on cURL execution and upload progress.

Above configuration has been validated for:
• Arduino IDE 1.6.5
• 2.0.0-rc1 (of Nov 17, 2015) version of ESP8266 platform package
• Windows 7
• cURL for Win64 – Generic curl-7.33.0-win64-ssl-sspi.zip

Have quick and reliable uploads :D

Krzysztof
You do not have the required permissions to view the files attached to this post.
User avatar
By reaper7
#34614 nice but what's happen when You have few active modules and all have the same name?
my proposal:
inside sketch add MDNS.enableArduino(8266);
Code: Select all  MDNS.begin(somehostname);
  MDNS.enableArduino(8266);
  MDNS.addService("http", "tcp", 80);

then all esp's will be visible inside IDE->Network Ports

and upload pattern (inside platform.txt) change to:
Code: Select alltools.curl.upload.pattern="{cmd}" -F "image=@{build.path}/{build.project_name}.bin" "http://{serial.port}/update"


imgzz.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
By krzychb
#34670 @reaper7 - very nice and creative extension 8-)

To have it available in official Arduino IDE release we need to have this this pull request # 4107 merged

To everybody who likes and needs OTA!
Do not wait - support it on github :D

Keep Calm and Mege PR 4107.png
You do not have the required permissions to view the files attached to this post.
User avatar
By reaper7
#34676 it would be cool especially for everyone who regullary get update from github and after update manually improves files :)