I am performing step by step DOTA I implementation in my source. I work with Q6.55 core software and V3.10 OpenAT library
The steps I use are the following :
Prepare AD cell of unknown size
Set all GPRS parameters
Get an IP address
Set FTP parameters for FTP GET function
Make a FTP GET
Wait for message ED_OK_FILE_TRANSFERRED
Finalise cell and collect return value
Call adl_adInstall function through a custom AT command
and then everything freezes. It is very difficult to get the module back to life. I succeeded by downgrading firmware to Q6.50 and then again to Q6.55.
If I don’t proceed so, the module doesn’t communicate anymore with serial link.
Please can anyone help me ?
Hi Pelimon,
Please check out the return values of adl_adWrite() and adl_adInstall () APIs.
I would like to reiterate the steps that you should perform:
Subscribe to a cell of undefined size and check out the value of the handle which is returned. If it is negative, it means that there is some problem in cell subscription itself.
Set all GPRS parameters
Get an IP address
Set FTP parameters for FTP GET function
Make a FTP GET.
Whenever data is received in the data handler function for FTP, write that data to the subscribed A&D storage cell. Also check out the return value of adl_adWrite () API. Please note that the return value should not be negative.
6.When ED_OK_FILE_TRANSFERRED event is received in the FTP control handler, finalize the cell and check out the return value of adl_adFinalise () API.
If finalising the cell is successful, call adl_adInstall (). Also check out the return value of this API.
Please provide some time to the module, so that it can erase the previous Open-AT application and then install the new Open-AT application. If the install is successful, the module will reboot and the new application will start.
If everything is OK and the module still freezes, then please check out if the file that you have sent over the FTP server has not become corrupt. It is advisable, if you send one more file on the FTP server and then try using the second file as it can be the case that the first file has become corrupt.
If you want to know that the file is intact or not, you can download the file using some FTP download utility (like CuteFTP) and then try to download the file normally (using AT+WDWL command). In case, this too fails, then you can be sure that the file became corrupt on the FTP server (probably some of the bits have become corrupt although the chances of this is very very rare).
thanks for your answer. I am going to check again all the points you suggest me.
Do you maybe know which traces level I could activate in TMT to monitor the install progress aside the usual CUS4 1 and 32 ?
My TMT application is configured to recognize all the Firmware traces.
Hi Pelimon,
The CUS4 level of traces are for Open-AT itself. It is enough if you enable these traces.
In case, you want to see which all IP packets are sent/recevied by the module (while getting the file using FTP), you can give AT+ADLDBG=50 command after staring your Open-AT application (i.e. after you give AT+WOPEN=1 command). The IP packets can be seen in CUS4 level 25 of traces.
Please note that in Open-AT version 3.0x, you have to give AT+ADLDBG=2 command to monitor all the IP packets sent and recevied.
I subscribed custom AT commands for resetting and properly formatting AD memory.
I started again and watched every return Code, after some fine tuning I discovered that in the adl_adWrite I used to specify the bad Datalength.
It was wrongly written to Datalength + 1.
Now everything is proper and DOTA works.
Hi Henrique,
The return value -2 from adl_adWrite () indicates that there is some error in the parameter that you are passing to adl_adWrite () function (i.e. ADL_RET_ERR_PARAM).
Please check out the validity of “Size” and “Data” parameters.
Please note that when you perform FTP, then the last call to the data handler might result in a datalength of 0 (as the server is trying to close the FTP when the whole of the file is transferred). In this case, if you are calling adl_adWrite (), then it might call adl_adWrite () with the size parameter set to 0.
This can be a cause of the problem.
Also check out if the “Data” that you are going to write in the A&D cell is not NULL (i.e. it is not a NULL pointer).
To check out the cause of the problem, you can put traces in your application when the last call to adl_adWrite () is made to print the values of “Size” and “Data” parameters. This will help you find the cause of the problem.
I started my adventure in DOTA I about one month ago.
Now my management of GPRS and FTP connection works with very good handling of return values. The same for the AD functions.
My current problem is the following :
when I call the ad_install function, as usual I have a TRACE message saying that install function has been called and as usual I wait.
The module is supposed to self reset, but it never happens.
I have to power off or hard reset the module by myself and then the result is correct, i.e. I have the updated OpenAT application as expected.
I specify that I am using Q6.55 core with OpenAT v3.10 lib.
Can anyone help me please to finish this DOTA process in the complete and elegant way?
Hi Stefan,
I have never experienced such kind of problem. Please make sure that you finalize the cell and after finalizing provide some time (using a timer). Inside the timer handler function, call adl_adInstall () API. Usually, this API takes some time to install the contents of an A&D cell as the contents have to be installed and the previous applicaiton needs to be erased.
One more thing what I want you to check is that, enable the RTK level 1 traces in your TMT and check if there is some exception occuring.
Also, try calling adl_adFinalize () API after providing some time (using a timer) from the ED_OK_FILE_TRANSFERED function.
I think there is some timing problem.
In case, there is some problem, it will be reflected in the RTK level 1 traces.
I noticed that ad_install don’t reset after installation when I test my application in debug mode. I had to test my app in wismo target mode to succeed.
I did the test on two modules Wismo Q2501 with the following data :
module1: core software Q651a datum 24.10.2005 OpenAT v3.03
module2: core software Q655 datum 18.11.2005 OpenAT v3.10
Results :
module1: DOTA I via FTP performs correctly, recompacts AD, installs, reboots
module2 : DOTA I via FTP OK, recompact AD, install, nothing happens further. Trace RTK level I gives nothing.
On module2 after manual reset, the new Open AT software is present and it works.
So I guess this is a Q655 firmware bug.
I have found a workaround (!) before typing command AT+INSTALL (I developed this for debug purposes) activate AT+WRST=1,“000:01” or AT+WRST=1,“000:02” reset timer and it will work.
So this is a custom made workaround to make full autonomous DOTA I on Q6.55 firmware. I am not sure about the succes rate, is it 100% ?
Has anyone had the same experiences or some more official statements ?
I have red that version lower the 3.10 don’t check correctly the file before install, so corrupted files could be installed. But in your case OAT 3.10 installs
the file, too.
I only experinced problems with DOTA when my UART was in AT mode with low speed (1200 bit/s), even if i compiled the program without traces. When i raised the speed to 115200 everything worked fine.
thanks for your answer. Actually I think that I am working with 115’200 UART speed on the TMT link.
My DOTA software isn’t 100% automatic, I still have to type custom AT commands, so if this is simply the UART which is connected to the PC, I think yes, it goes @115kbps.
I specify that I download my dwl file through FTP.
I cannot believe it, I am working again with firmware Q651 on DOTA and everytime I receive an exception.
Sometimes DOTA works, sometimes not, but no more automatic.
I specify that my dwl file size is 213kbytes and my dota space is 512kb
Same problem, I successfully downloading application using GSM channel, calling adl_adInstall( ) but module doesn’t rebooting (also it doesn,t respond on any At commands, only hardware reset helps).
I,ve found that adl_gpsSubscribe in initialization code of application caused this error this DOTA adl_adInstall( ) function. But using adl_gpsUnsubscribe function befor download process doesn’t help.
Please give some information about features of DOTA API.
My DOTA app. for customer app. has been working fine: Downloads, reboots and installs new FW automaticaly but recently I 've found some modules on wich the FW gets downloaded and calling adl_adInstall( ) makes the module go weird:
The module does not reboot automatixally, every AT command responds error except for AT+WDWL? wich responds:
+WDWL: QRY
and when I powercycle I can see it didn’t installed the new FW.
I check the return codes of adl_adWrite ( ) and is accepting the FTP data. My code is the exact same code that has been working on other modules…
I’ m using OpenAT v3.10 and Core Software v6.55 running on Q2406B. I’ve tried different “Oh, DOTA, please, work” techniques (thanks to xage for another one) but after calling adl_adInstall picture is always the same: module reset, $ sign in terminal and nothing more. Only DWLWIN helps to return module back to life. Appreciate any suggestions.