欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

OTA升级

程序员文章站 2022-04-30 09:59:47
...

OTA升级

前言

本文介绍ota升级的流程

烧录初始固件

在components\joylink_adapter\example\joylink_extern.h文件,确保初始固件号为0

#define JLP_VERSION  0

烧录固件
chip erase 可以清除芯片的数据文件,清除后,softAP联网需要重新连接了
OTA升级

ap配网

运行芯片,扫描二维码配网

OTA升级

编译新版固件

在components\joylink_adapter\example\joylink_extern.h文件,修改固件号,最小是1起步,具体与自增的云端固件ID保存一致

#define JLP_VERSION  5

添加固件

OTA升级
此处确保固件ID和(刚刚编译的)要添加的固件的ID一致
OTA升级

手机检查更新升级固件

先确认设备是否在线

OTA升级

点击我的-检查更新

OTA升级

立即更新

OTA升级

开始升级

OTA升级
OTA升级
OTA升级
以下是执行joylink_extern_ota.c终端的log

[DEBUG][114093][joylink_extern_ota.c][joylink_ota_get_data][595]
download_len 680496
[INFO][114147][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 1
[INFO][114196][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 2
[INFO][114211][joylink_dev_server.c][joylink_proc_server][1076]
Server org ctrl type:8:
[INFO][114214][joylink_dev_server.c][joylink_proc_server_ota_upload][874]
OTA UPLOAD ACK code 0 msg success

[INFO][114234][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 3
[INFO][114294][joylink_dev_server.c][joylink_proc_server][1076]
Server org ctrl type:12:
[INFO][114294][joylink_dev_server.c][joylink_proc_server_upload][657]
UPLOAD OK timestamp 1600936970 code 0

[INFO][114302][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 4
[INFO][114348][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 5
[INFO][114402][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 6
[INFO][114461][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 7
[INFO][114508][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 8
[INFO][114557][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 9
[INFO][114603][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 10
[INFO][114632][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 11
[INFO][114672][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 12
[INFO][114711][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 13
[INFO][114751][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 14
[INFO][114800][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 15
[INFO][114840][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 16
[INFO][114889][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 17
[INFO][114935][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 18
[INFO][114982][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 19
[INFO][115023][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 20
[INFO][115069][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 21
[INFO][115109][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 22
[INFO][115161][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 23
[INFO][115204][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 24
[INFO][115265][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 25
[INFO][115319][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 26
[INFO][115357][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 27
[INFO][115398][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 28
[INFO][115442][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 29
[INFO][115476][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 30
[INFO][115521][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 31
[INFO][115565][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 32
[INFO][115616][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 33
[INFO][115663][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 34
[INFO][115709][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 35
[INFO][115752][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 36
[INFO][115806][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 37
[INFO][115856][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 38
[INFO][115916][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 39
[INFO][115953][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 40
[INFO][115994][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 41
[INFO][116033][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 42
[INFO][116084][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 43
[INFO][116141][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 44
[INFO][116191][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 45
[INFO][116239][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 46
[INFO][116290][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 47
[INFO][116333][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 48
[INFO][116370][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 49
[INFO][116427][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 50
[INFO][116462][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 51
[INFO][116513][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 52
[INFO][116560][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 53
[INFO][116605][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 54
[INFO][116641][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 55
[INFO][116687][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 56
[INFO][116735][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 57
[INFO][116779][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 58
[INFO][116825][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 59
[INFO][116879][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 60
[INFO][116935][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 61
[INFO][116971][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 62
[INFO][117019][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 63
[INFO][117052][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 64
[INFO][117090][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 65
[INFO][117128][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 66
[INFO][117392][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 67
[INFO][117434][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 68
[INFO][117485][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 69
[INFO][117526][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 70
[INFO][117567][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 71
[INFO][117613][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 72
[INFO][117653][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 73
[INFO][117688][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 74
[INFO][117770][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 75
[INFO][117861][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 76
[INFO][117908][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 77
[INFO][117969][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 78
[INFO][118022][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 79
[INFO][118093][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 80
[INFO][118127][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 81
[INFO][118159][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 82
[INFO][118197][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 83
[INFO][118230][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 84
[INFO][118266][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 85
[INFO][118306][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 86
[INFO][118354][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 87
[INFO][118399][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 88
[INFO][118435][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 89
[INFO][118465][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 90
[INFO][118498][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 91
[INFO][118540][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 92
[INFO][118568][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 93
[INFO][118599][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 94
[INFO][118629][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 95
[INFO][118694][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 96
[INFO][118762][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 97
[INFO][118800][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 98
[INFO][118891][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 99
[INFO][118996][joylink_extern_ota.c][joylink_ota_get_data][690]
OTA download percent: 100
[INFO][118996][joylink_extern_ota.c][joylink_ota_get_data][703]
OTA last_time: 114030, OTA_TIME_OUT: 300000
[INFO][118997][joylink_extern_ota.c][joylink_ota_report_status][771]
status: 0, version: 5

[DEBUG][118998][joylink_packets.c][joylink_package_ota_upload_req][339]
new ota upload rsp data:{"cmd":"otastat","data":{"feedid":"942841600767705238","                                                                                                                               productuuid":"FBE25E","status":0,"status_desc":"ota download","progress":100}}
[INFO][119000][joylink_dev_server.c][joylink_server_ota_status_upload_req][803]
send to server len:160:ret:160

[INFO][119001][joylink_extern_ota.c][joylink_ota_get_data][719]
[OTA] Check CRC OK

[OTA] Update partition, partition len is 679984
[INFO][119039][joylink_extern_ota.c][joylink_ota_report_status][771]
status: 2, version: 5

[DEBUG][119040][joylink_packets.c][joylink_package_ota_upload_req][339]
new ota upload rsp data:{"cmd":"otastat","data":{"feedid":"942841600767705238","                                                                                                                               productuuid":"FBE25E","status":2,"status_desc":"ota is ok","progress":100}}
[INFO][119041][joylink_dev_server.c][joylink_server_ota_status_upload_req][803]
send to server len:160:ret:160

[INFO][119042][joylink_extern_ota.c][joylink_ota_task][826]
Joylink ota is ok!

[WARN][119043][joylink_extern_ota.c][joylink_ota_task][827]
Rebooting

相关标签: SDK