DOTA freezes - please help


#1

Hello OpenAT community.

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 :

  1. Prepare AD cell of unknown size
  2. Set all GPRS parameters
  3. Get an IP address
  4. Set FTP parameters for FTP GET function
  5. Make a FTP GET
  6. Wait for message ED_OK_FILE_TRANSFERRED
  7. Finalise cell and collect return value
  8. 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 ?


#2

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:

  1. 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.
  2. Set all GPRS parameters
  3. Get an IP address
  4. Set FTP parameters for FTP GET function
  5. Make a FTP GET.
  6. 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.
  7. If finalising the cell is successful, call adl_adInstall (). Also check out the return value of this API.
  8. 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).

Best Regards,
Open AT Fan.


#3

Hello OpenAT_fan,

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.

Yours,

Stefan Pelimon


#4

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.

Best Regards,
Open AT Fan.


#5

Hello OpenAT_fan,

your advice was the right thing,

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.

Thanks.

Best Regards,

Stefan Pelimon


#6

After running through all the steps, when using Write function, every time it returns 0 except the last one who returns “-2”.

After that the application Finalises and try to install the application. That´s where DOTA freezes.

Finalise Function returns 0.

I tested the application through common FTP… and the Files is ok.

Any ideas?

Thanks!

Best Regards,

Henrique


#7

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.

Best Regards,
Open AT Fan.


#8

Hi everyone, Hi OpenAT_FAN

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?

Thanks in advance,

pelimon


#9

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.

Best Regards,
Open AT Fan.


#10

Hi everyone,

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 used OpenAT 4 with a Q2686H.

I hope that can help

Regards,

gdt


#11

Thank you for the answer OpenAT_FAN,

I will compare firmwares Q6.50a versus Q6.55 on my DOTA software, downgrade the modules and recompile the software.

I will post results later.

Hear you soon

Stefan


#12

Hello OpenAT_FAN, hello Gdt

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 ?

Thanks in advance,

Stefan


#13

Hello,

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.

Apart from that, my DOTA worked fine sofar.

Best Regards,

tom


#14

Hi Tomalex,

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.

Can you precise please ?

Stefan


#15

Hi everybody,

I have the same problem as Pelimon.

My DOTA software isn’t 100% automatic, I have to use AT+WRST command in my program to reset after installation.

Does anyone find the solution on OpenAT v3.10 ?

Thanks.


#16

Hi people,

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

6861.151 Trace RTK 1 Except RTK …133 1c 25

Does anyone have a precise answer on it ?

I am getting puzzled

Yours,

Pelimon


#17

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.

core software Q655 datum 18.11.2005 OpenAT v3.10


#18

Hi.
Using OAT 3.02, OS 6.51
wismo Q2426

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…

any idea ?

btw:
my code size: 150Kb


#19

The following help (at least for us):

  • Perform the DOTA (TCP or FTP).
  • At the end of the DOTA, set a a flag in the flash memory indicating that
    an application has been downloaded.
  • Reset the unit with AT+CFUN=1.
  • When the unit restarts, check the flag.
  • If this flag is set, then before continuing, call the function
    ad_install() and reset the flag.
  • The new application will be installed.
  • Now continue.

#20

Hi, all!

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.