mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2025-02-11 06:45:19 +00:00
.. | ||
hal.mk | ||
ota_hal_beken.c | ||
ota_hal_esp32.c | ||
ota_hal_host.c | ||
ota_hal_mcu.c | ||
ota_hal_mcu.h | ||
ota_hal_module.c | ||
ota_hal_os.c | ||
ota_hal_os.h | ||
ota_hal_plat.c | ||
ota_hal_plat.h | ||
README.md |
Contents
hal
├── aos.mk
├── Config.in
├── ota_hal_host.c
├── ota_hal_module.c
├── ota_hal_os.c
├── ota_hal_os.h
├── ota_hal_plat.c
├── ota_hal_plat.h
└── README.md
Introduction
An over-the-air update is the wireless delivery of new software or data to smart devices, especially IoT devices. Wireless carriers and OEMs typically use over-the-air (OTA) updates to deploy the new operating systems and the software app to these devices.
Features
- Differential incremental upgrade;
- Dual banker:AB partition upgrade to support rollback to old version;
- Secure download channel;
- Firmware digital signature verification.
Dependencies
Linkkit MQTT channel Linkkit CoAP channel
API
User service APIs:
typedef struct {
unsigned char inited; /*If is inted*/
char pk[20+1];/*Product Key*/
char ps[64+1];/*Product secret*/
char dn[32+1];/*Device name*/
char ds[64+1];/*Device secret*/
OTA_PROTCOL_E trans_protcol; /*default:0--> MQTT 1-->COAP*/
OTA_PROTCOL_E dl_protcol; /*default:3--> HTTPS 1-->COAP 2-->HTTP*/
unsigned char sign_type; /*default:0--> sha256 1--> md5 2-->RSA*/
char ota_ver[OTA_MAX_VER_LEN]; /*OTA FW version*/
char sys_ver[OTA_MAX_VER_LEN]; /*OTA System version*/
ota_transport_t *h_tr; /*OTA tansport manager*/
ota_download_t *h_dl; /*OTA download manager*/
void* h_ch; /*OTA channel handle:mqtt,coap*/
} ota_service_t;
/*OTA export service APIs*/
int ota_service_init(ota_service_t* ctx);
int ota_service_deinit(ota_service_t* ctx);
for sample code please check otaapp.
RTOS build
cd ROOT DIR;
aos make otaapp@board;
run CLI CMDs
- connect network
netmgr connect ssid passwd
- run ota demo
OTA_APP pk dn ds ps