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/
Code Reference
- Install Web Server
C:\Apache24\bin\httpd -k install
Start Apache:
net start apache2.4
Test:
Open browser and input:
http://127.0.0.1/
The page shows “It works!” if the Apache Web Server starts successfully.
- 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
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:
- 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