OpenAT实现DOTA

来源:互联网 发布:淘宝付款后钱在哪里 编辑:程序博客网 时间:2024/05/21 09:29

什么是DOTA?
DOTA是Download Over The Air的简称,其实现的功能是通过无线数据通道,将远程程序下载至本地,然后更新模块程序,包括:应用程序,Firmware,OS。
基于Q24Plus的远程更新实现步骤如下:
1.创建GPRS连接
2.在公网上创建一个FTP或者用TCP创建一个服务器,Ftp可以直接用标准的FTP协议进行数据传输,TCP需要自行编写一个通信协议
3.OpenAT应用程序下载远程数据至A&D存储,下载完成后,将此数据设为不可更改状态:adl_adFinalise
4.执行adl_adInstall,安装完成后,模块会自动重启。

<script type="text/javascript"><!--google_ad_client = "pub-0067159948827932";/* 468x60, 创建于 09-5-3 */google_ad_slot = "1810084137";google_ad_width = 468;google_ad_height = 60;// --></script>

在这里需要注意的是:当我们对串口进行了FCM后,模块不会自动,需要退出数据状态,解决方案如下:
(从Wavecom的论坛上找到的)
Just in case anyone is interested. It turns out there are several work-arounds to overcome this problem if the DOTA freezes because of data on the buffer of UART1. I implemented Option 3, which works fine for me:

Option 1. Design your hardware to pull the CTS line so the Wavecom processor things there is a serial cable connected.

Option 2: When the code is ready to apply the DOTA file, issue a "at+wrst" to be executed two minutes later. Issue the adl_install() command. The idea is that ff the adl_install does not reset the Wavecom modem, the the at+wrst will do so anyway two minutes later

Option 3: When the DOTA file is finished downloading, just set a non-volatile flag and reboot the WMP with a normal at+cfun=1 command. When it starts up it first checks the flag. If set, it disables all debug info and unsollicted responses to UART1. It then clears the flag and executes the adl_install() which works now because there is nothing on serial port.

Option 4: Make a call to adl_fcmReleaseCredits to release all "credits"

 

 

如果以上 4种方法你用起来觉得都不爽的话,可以试试做个while(1),保证可以重启.

 

 

OpenAT SPI操作

 

原创粉丝点击