Ameba Arduino: [RTL8195AM] [RTL8710AF] Cloud OTA
Preparation
Example
- Ameba x 1
- Apache Web Server
The example illustrates how to use AMEBA to download firmware from Web Server to do remote OTA function. This project is contributed by Maker Rododo.
http://www.rododo.farm/
Complete download and to unzip the file, copy directory Apache24 to C:\ root directory.
Open CMD with administrator and key in:
Test:
Open browser and input:
The page shows “It works!” if the Apache Web Server starts successfully.
Find ota.bin to use for OTA after the compilation and open the directory we install Arduino Ameba SDK. It should be the location shown below if the certain path had not been changed when installing Arduino IDE:
203df9 is the checking code generated from checksum. Add a check.txt in C:\Apache24\htdocs after transform the value to Decimal as shown below:
Compile and upload to Ameba. Start downloading OTA from Web Server after pushing Reset button. And open the terminal.
Run check.txt checking after connecting to the WiFi.
Start to download ota.bin
Check checksum after the download and start OTA. It restarts and prints ” Hello from Ameba!!!” if the process is successful.
Code Reference
- Install Web Server

C:\Apache24\bin\httpd -k install
Start Apache:
net start apache2.4

http://127.0.0.1/

- Generate OTA firmware

C:\Users\yourname\AppData\Local\Arduino15\packages\realtek\tools\ameba_tools\1.1.0
Copy ota.bin and put it to Apache Web Server htdocs directory (C:\Apache24\htdocs).
- Generate checksum files
Checksum.exe ota.bin


- Example





int checksum = OTA.gatherOTAinfo(REMOTE_ADDR,"/check.txt", REMOTE_PORT);
if( checksum != -1) Serial.println("info_ok");
In setup(), getting checksum information in check.txt from remote server via OTA.gatherOTAinfo. Remember to fill in web server address and port
Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. Terms of Use