Page 1 of 1

How to properly use OTA web dashboard to upload OTA firmware

Posted: Sun Jun 25, 2023 11:34 am
by ric287
Hello Everyone,
Please ignore this foolish question, I am very new to rainmaker.

I have gone through https://blog.espressif.com/ota-firmware ... bf48e80288 and https://rainmaker.espressif.com/docs/ota.html

But, I am unable to understand what is process to upload the ota file. Or even basic how to make the Ota package.
There are no videos, or demos that helps me clear my doubt. Also, kindly consider the fact, that since i could not that what is mentioned in the above urls is only why i am posting here. Thing which maybe very simple for you is very difficult for me.


Do i have to run the cli or do i have to click to upload or both i am confused.

Please let me know what is the right steps in complete manner. Please note, i am only familiar with Arduino IDE not anything else for now.


Regards,
Shariq

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Mon Jun 26, 2023 12:45 pm
by ESP_Piyush
Hi Shariq,

You can ignore the blog post because it was meant for the earlier days, when we had not opened up the dashboard for public use and CLI was the only option. However, now, dashboard based upgrades are recommended.

For using dashboard for OTA firmware upgrades, you need to enable OTA using Topics as mentioned in the docs here. Note that this is enabled by default in all RainMaker examples (using esp_rmaker_ota_enable_default()0 and so, no special code is required.

Once your node is provisioned and connected over MQTT, it should start showing up as online on the RainMaker dashboard. The node is now ready for OTA firmware upgrades.

To create a binary for OTA firmware upgrades, you need to follow the steps here. Simply speaking, you just need to change the version in the CMakeLists.txt file of your project and recompile. A binary named <project_name>.bin will get created in the build/ folder of the project.

You can then use this binary to create an OTA job as described here.

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Mon Jun 26, 2023 1:27 pm
by ric287
Hey ,thank you for the response.

I am still confused, how to compile the binary file? Or where do i write the project name and where do i find the cmake file?

Is it like if speaking in arduino terms..export the binary files after compilation, what after that?
Sorry again this is not clear to me.

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Mon Jun 26, 2023 1:28 pm
by ric287
Hello ,
I am still not clear how to compile the file or where do i find the cmakelist file ?

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Tue Jun 27, 2023 8:00 am
by ESP_Piyush
The instructions I mentioned are for esp-idf based RainMaker builds. Are you using Arduino?

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Tue Jun 27, 2023 8:06 am
by ric287
Yes..i havent used idf yet.. only arduino ide

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Tue Jun 27, 2023 9:39 am
by sanketwadekar
For Arduino, you have to first build and flash your sketch onto the device. Once you provision your device, it will be visible in the Rainmaker app and dashboard. Then, you can make changes to your sketch and recompile it.
After you've finished compiling the new sketch, a ".bin" file will get generated. You have to upload this binary image on your Rainmaker dashboard. To start an OTA job, select the firmware image and node ID.

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Tue Jun 27, 2023 9:47 am
by ric287
Ok..i understood the process.but i remember dashboard page asking me for winzip package only. Can i drop the .bin file just after compiling from arduino ide? Will that work? Then whats the process for cmake and all?

Re: How to properly use OTA web dashboard to upload OTA firmware

Posted: Tue Jun 27, 2023 5:33 pm
by sanketwadekar
The .bin file generated after compiling should work. You don't need cmake for Arduino.