Less Efficiency in DOTA


#1

In Q24 Plus

I am implemented DOTA in My application. I performing DOTA using FTP connection.

Everything goes fine upto adl_adFinalise() i receive Finalising Ok

After that adl_adinstall() exectuion after few seconds system restarts and i found the same(old) application will run again.

Success ratio is 2:10 and sometimes 1:10 in running new application after DOTA. After 5 to 10 retry i am succeeding in DOTA.

Sometimes i succeeded at first attempt but very very rare case.

What could be the reason?

My application size around 170K both running and downloading one.

Please help on this.


#2

Do you use adRecompact?
How do you check that your file is downloaded succesfully?


#3

Do you check the startup reason when the application re-starts?


#4

Please check the code below

S32Return=adl_adInstall(Cell_Handle);
	 switch(S32Return)
	 {
	 case OK: 
		  _AT_RSP_TRUE_1("\r\n Installation OK...\r\n");		  
		 break;
	 case ADL_RET_ERR_BAD_STATE:
		 _AT_RSP_TRUE_1("\r\n Installation ADL_RET_ERR_BAD_STATE\r\n");
								//if there is a not finalized cell     
                                //or if a recompact/format process is already running 
		 break;
	 case ADL_RET_ERR_UNKNOWN_HDL: //if the handle is unknown           
		 _AT_RSP_TRUE_1("\r\n Installation ADL_RET_ERR_UNKNOWN_HDL\r\n");
			  break;
	 case ADL_RET_ERR_NOT_SUBSCRIBED: //if the service is not subscribed
		 _AT_RSP_TRUE_1("\r\n Installation ADL_RET_ERR_NOT_SUBSCRIBED\r\n");
			  break;
	 case ADL_AD_RET_ERR_NOT_AVAILABLE:
		 _AT_RSP_TRUE_1("\r\n Installation ADL_AD_RET_ERR_NOT_AVAILABLE\r\n");
			  break;  //if A&D space is not available 
	 }
	 	
	_AT_RSP_TRUE_1("\r\n Installed NEW Application \r\n");

After this i receive installation OK but not the last line Installed New Application system restarts before that and the same old application flows.

Is Installation OK is enough to confirm that download is success or anything left out here to check download success.


#5

You didn’t answer the question:

ie, the adl_InitType_e value…


#6

You should check the file size to be sure that it is downloaded completely. I’ve got a numerous disconnections till the file is downloaded so it seems that you try to install partially downloaded file.

The return result of adInstall is not enough - it just means that it started installation sequence. You can check the flag on application startup which indicates if the new application is installed. Read more about adl_main arguments.


#7

Yes i checked adl_InitType_e result is ADL_INIT_DOWNLOAD_ERROR

how to check the file size that is downloaded downloaded?

Is it due to missing data in FTP transaction?


#8

How to check the file size downloaded?

When application starts after DOTA intit_type giving result ADL_INIT_DOWNLOAD_ERROR

Is it due to missing data during FTP transaction?

Which method will be better TCP,FTP or Data call for DOTA?


#9

DOTA success.

The problem was due to wrong sequence flow

My ftp connection get connected and reading the file before
Cell_Handle= adl_adSubscribe(1,ADL_AD_SIZE_UNDEF);
is done and trying to write adl_adwrite(Cell_Handle,len,buf) and the response is can’t write to cell so i missing writing to cell starting 5 to 6 transactions.

Now after adl_subscribe gives cell subscribe success then only i am connecting via FTP reading and writing to cell.

Now I got DOTA results 4 out of 4. And also startup init_type is giving ADL_INIT_DOWNLOAD_SUCCESS.


#10

Still I recommend you to read file size before downloading and compare it with real downloaded size before install.


#11

Definitely i will do file size check for DOTA before and after download.

is it mandatory to do adl_adFinalise(handle) even after file size mismatch or shall i just do wip_close() after mismatch?


#12

You will obviously have to “clean-up” the A&D space to get rid of the partial download before you can use it again…


#13

That means i must do adl_adFinalise(handle) even after failure or file size mismatch?.

Is it not required to do ad_adInstall() if size mismatch after download?


#14

You can proceed like this: Finalize cell, DeleteCell, Recompact, Open cell.
After the last step it is OK to restart the download procedure.


#15

My i know what is meant by Open Cell. Cause i did not found any function like this in the document


#16

Surely, that last step is actually the first step of the download procedure?


#17

My application is now checking for file size before download and no.of bytes received after download.

no bytes =173335 in both the case.

Hence continuing for adl_adInstall() else the steps adl_addelete() adl_Recompact() and continue normal application.


#18

With Open cell I meant adSubscribe.
Well it is not necessary to start download procedure after the last step. This cell may stay prepared but not used…


#19

That can be risky.

If the unit restarts for any reason - with this cell still “open” - the A&D storage can be corrupted…


#20

Then what is the next corrective action should i follow after ad_addelete() and adl_adrecompact()