# Less Efficiency in DOTA

**URL:** <https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482>\
**Category:** Open AT\
**Created:** [July 23, 2009, 7:15am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482 "2009-07-23T07:15:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 23, 2009, 7:15am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/1 "2009-07-23T07:15:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![blackyblack](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@blackyblack](https://forum.sierrawireless.com/u/blackyblack)\
**Post date:** [July 23, 2009, 8:36am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/2 "2009-07-23T08:36:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 23, 2009, 8:47am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/3 "2009-07-23T08:47:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 23, 2009, 9:43am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/4 "2009-07-23T09:43:56Z")

</div>

> [@blackyblack](#):
>
> > [@](#):
> >
> > Do you use adRecompact?
> 
> Yes i am using adl\_adFormat(Cell\_Handle); after few seconds using adl\_adRecompact ( Cell\_Handle ); both giving positive response.
> 
> > [@](#):
> >
> > How do you check that your file is downloaded successfully?

Please check the code below

```auto
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.

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 23, 2009, 10:08am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/5 "2009-07-23T10:08:27Z")

</div>

You didn’t answer the question:

> [@awneil](#):
>
> Do you check the startup reason when the application re-starts?

ie, the adl\_InitType\_e value…

---

<div class="post-metadata">

**Author:** ![blackyblack](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@blackyblack](https://forum.sierrawireless.com/u/blackyblack)\
**Post date:** [July 23, 2009, 10:14am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/6 "2009-07-23T10:14:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 23, 2009, 10:30am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/7 "2009-07-23T10:30:11Z")

</div>

> [@awneil](#):
>
> You didn’t answer the question:
> 
> > [@awneil](#):
> >
> > Do you check the startup reason when the application re-starts?
> 
> ie, the adl\_InitType\_e value…

> [@](#):
>
> Do you check the startup reason when the application re-starts?

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?

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 23, 2009, 10:40am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/8 "2009-07-23T10:40:24Z")

</div>

> [@](#):
>
> > [@blackyblack](#):
> >
> > 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.

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?

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 23, 2009, 12:15pm UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/9 "2009-07-23T12:15:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![blackyblack](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@blackyblack](https://forum.sierrawireless.com/u/blackyblack)\
**Post date:** [July 23, 2009, 5:42pm UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/10 "2009-07-23T17:42:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 24, 2009, 6:39am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/11 "2009-07-24T06:39:19Z")

</div>

> [@blackyblack](#):
>
> Still I recommend you to read file size before downloading and compare it with real downloaded size before install.

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?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 24, 2009, 6:46am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/12 "2009-07-24T06:46:51Z")

</div>

> [@chiduprakash](#):
>
> is it mandatory to do adl\_adFinalise(handle) even after file size mismatch

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 24, 2009, 7:27am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/13 "2009-07-24T07:27:14Z")

</div>

> [@](#):
>
> You will obviously have to “clean-up” the A&D space to get rid of the partial download before you can use it again…

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?

---

<div class="post-metadata">

**Author:** ![blackyblack](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@blackyblack](https://forum.sierrawireless.com/u/blackyblack)\
**Post date:** [July 24, 2009, 8:03am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/14 "2009-07-24T08:03:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 24, 2009, 8:40am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/15 "2009-07-24T08:40:05Z")

</div>

> [@blackyblack](#):
>
> You can proceed like this: Finalize cell, DeleteCell, Recompact, Open cell.  
> After the last step it is OK to restart the download procedure.

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

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 24, 2009, 8:46am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/16 "2009-07-24T08:46:44Z")

</div>

> [@blackyblack](#):
>
> You can proceed like this: Finalize cell, DeleteCell, Recompact, Open cell.  
> After the last step it is OK to restart the download procedure.

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 24, 2009, 11:08am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/17 "2009-07-24T11:08:19Z")

</div>

> [@chiduprakash](#):
>
> > [@blackyblack](#):
> >
> > Still I recommend you to read file size before downloading and compare it with real downloaded size before install.

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.

---

<div class="post-metadata">

**Author:** ![blackyblack](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@blackyblack](https://forum.sierrawireless.com/u/blackyblack)\
**Post date:** [July 24, 2009, 11:11am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/18 "2009-07-24T11:11:32Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 24, 2009, 11:51am UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/19 "2009-07-24T11:51:16Z")

</div>

> [@blackyblack](#):
>
> This cell may stay prepared but not used…

That can be risky.

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

---

<div class="post-metadata">

**Author:** ![chiduprakash](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@chiduprakash](https://forum.sierrawireless.com/u/chiduprakash)\
**Post date:** [July 24, 2009, 1:05pm UTC](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482/20 "2009-07-24T13:05:51Z")

</div>

> [@](#):
>
> > [@awneil](#):
> >
> > > [@blackyblack](#):
> > >
> > > This cell may stay prepared but not used…
> > 
> > That can be risky.
> > 
> > If the unit restarts for any reason - with this cell still “open” - the A&D storage can be corrupted…

Then what is the next corrective action should i follow after ad\_addelete() and adl\_adrecompact()

[Next page](https://forum.sierrawireless.com/t/less-efficiency-in-dota/3482.md?page=2)
