华为云IoT智慧物流案例10 | 广和通L610模组FOTA升级(服务端FileZilla Server客户端FileZilla)
FOTA升级作用:在官方更新新固件后,模组设备无需寄回给官方,而是通过远程FTP/HTTP进行OTA升级固件,以更新新固件版本,从而达到更新设备的功能/BUG修复。
本次我采用FPT的方式来升级L610的固件,FPT可以选择购买华为云弹性云服务器ECS或用自己的PC局域网搭建FPC服务器,因为我这里只是做测试使用,故选择用自己的PC搭建FPT服务器。
第一章 使用FileZilla Server搭建FTP服务器
- 服务端FileZilla Server:FileZilla Server下载
    - 配置服务端
(1)打开Filezilla Server Interface,“Host”默认“localhost”即设置本机为FTP服务器,“Port”为前面安装时的端口,默认“14147”,设置一个服务器端的“Password”,点击“Connect”   (2)手动修改服务器IP地址,依次点击“Edit”,“Settings”打开设置界面,选择“Passive mode settings”选项卡,勾选“Use the following IP:”并填写自己PC端的IP地址,之后点击“OK”保存。
   (3)添加X.509证书,点击“FTP over TLS settings”,勾选“Enable FTP over TLS support(FTPS)” 配置证书“Generate new certificate” 国家代码填86,设置路径将证书另存为在你想要保存证书的地方 
(4)设置用户名和密码,以及共享文件夹,具体过程如下:  设置用户密码
 设置共享文件夹
 设置相关权限 
第二章 通过FileZilla客户端访问FTP服务器
客户端FileZilla:FileZilla下载
- 点击左上角的“打开站点管理器”添加新的站点
 2.填写站点相关信息  - 点击“连接”,即可连接到FTP服务器
 - 也可以通过浏览器访问(浏览器地址栏输入FTP地址,输入用户名密码即可访问FTP目录)
ftp://IP地址 
第三章 L610进行FOTA升级固件
-
将固件文件上传到FTP服务器  -
开发板AT开关拨至左边“AT-PC” 打开串口工具发送AT指令: AT:测试AT ATI:查询版本 AT+CPIN?:查询卡状态 AT+CIMI?:查询IMSI AT+CSQ?:信号质量(0-29,数值越高信号越好) AT+CEREG?:是否驻网(1为驻网)  -
驻网拨号→FOTA升级文件 AT+MIPCALL=1:拨号 +MIPCALL: 10.104.48.68 //必须等收到+MIPCALL 或者 ERROR 或者超时再下面操作 FOTA升级: AT+GTOTA=1,“111.231.250105:21”,"/upgrade/L610-CN-00/06_05.bin",“user”,“password”   技术指导: 华为云社区与华为云学院:https://edu.huaweicloud.com/
|