DOTA with OpenAT 4.11 and OS 6.61 ? Someone succeeded?

Hi everyone,

I rewrote dota library for wip support. I download new firmware from the server, store it in flash, finalize the cell, check the size and if the cell is well finalized, install it and I receive always ADL_INIT_DOWNLOAD_ERROR after reboot…

I test it with compressed dwl (± 47kb) or not (± 70kb), same behavior…

I check also the content sent to the wavecom with ethereal and it is the same as the file.
This file works well when I upload it manually with at+wdwl.

Here is the log :

dota_DataReceived : download 536 of 46896 bytes
dota_DataReceived : download 1072 of 46896 bytes
dota_DataReceived : download 1608 of 46896 bytes
dota_DataReceived : download 2144 of 46896 bytes
dota_DataReceived : download 2680 of 46896 bytes
dota_DataReceived : download 3216 of 46896 bytes
dota_DataReceived : download 3752 of 46896 bytes
dota_DataReceived : download 4288 of 46896 bytes
dota_DataReceived : download 4824 of 46896 bytes
dota_DataReceived : download 5360 of 46896 bytes
dota_DataReceived : download 5896 of 46896 bytes
dota_DataReceived : download 6432 of 46896 bytes
dota_DataReceived : download 6968 of 46896 bytes
dota_DataReceived : download 7504 of 46896 bytes
dota_DataReceived : download 8040 of 46896 bytes
dota_DataReceived : download 8576 of 46896 bytes
dota_DataReceived : download 9112 of 46896 bytes
dota_DataReceived : download 9648 of 46896 bytes
dota_DataReceived : download 10184 of 46896 bytes
dota_DataReceived : download 10720 of 46896 bytes
dota_DataReceived : download 11256 of 46896 bytes
dota_DataReceived : download 11792 of 46896 bytes
dota_DataReceived : download 12328 of 46896 bytes
dota_DataReceived : download 12864 of 46896 bytes
dota_DataReceived : download 13400 of 46896 bytes
dota_DataReceived : download 13936 of 46896 bytes
dota_DataReceived : download 14472 of 46896 bytes
dota_DataReceived : download 15008 of 46896 bytes
dota_DataReceived : download 15544 of 46896 bytes
dota_DataReceived : download 16080 of 46896 bytes
dota_DataReceived : download 16616 of 46896 bytes
dota_DataReceived : download 17152 of 46896 bytes
dota_DataReceived : download 17688 of 46896 bytes
dota_DataReceived : download 18224 of 46896 bytes
dota_DataReceived : download 18760 of 46896 bytes
dota_DataReceived : download 19296 of 46896 bytes
dota_DataReceived : download 19832 of 46896 bytes
dota_DataReceived : download 20368 of 46896 bytes
dota_DataReceived : download 20904 of 46896 bytes
dota_DataReceived : download 21440 of 46896 bytes
dota_DataReceived : download 21976 of 46896 bytes
dota_DataReceived : download 22512 of 46896 bytes
dota_DataReceived : download 23048 of 46896 bytes
dota_DataReceived : download 23584 of 46896 bytes
dota_DataReceived : download 24120 of 46896 bytes
dota_DataReceived : download 24656 of 46896 bytes
dota_DataReceived : download 25192 of 46896 bytes
dota_DataReceived : download 25728 of 46896 bytes
dota_DataReceived : download 26264 of 46896 bytes
dota_DataReceived : download 26800 of 46896 bytes
dota_DataReceived : download 27336 of 46896 bytes
dota_DataReceived : download 27872 of 46896 bytes
dota_DataReceived : download 28408 of 46896 bytes
dota_DataReceived : download 28944 of 46896 bytes
dota_DataReceived : download 29480 of 46896 bytes
dota_DataReceived : download 30016 of 46896 bytes
dota_DataReceived : download 30552 of 46896 bytes
dota_DataReceived : download 31088 of 46896 bytes
dota_DataReceived : download 31624 of 46896 bytes
dota_DataReceived : download 32160 of 46896 bytes
dota_DataReceived : download 32696 of 46896 bytes
dota_DataReceived : download 33232 of 46896 bytes
dota_DataReceived : download 33768 of 46896 bytes
dota_DataReceived : download 34304 of 46896 bytes
dota_DataReceived : download 34840 of 46896 bytes
dota_DataReceived : download 35376 of 46896 bytes
dota_DataReceived : download 35912 of 46896 bytes
dota_DataReceived : download 36448 of 46896 bytes
dota_DataReceived : download 36984 of 46896 bytes
dota_DataReceived : download 37520 of 46896 bytes
dota_DataReceived : download 38056 of 46896 bytes
dota_DataReceived : download 38592 of 46896 bytes
dota_DataReceived : download 39128 of 46896 bytes
dota_DataReceived : download 39664 of 46896 bytes
dota_DataReceived : download 40200 of 46896 bytes
dota_DataReceived : download 40736 of 46896 bytes
dota_DataReceived : download 41272 of 46896 bytes
dota_DataReceived : download 41808 of 46896 bytes
dota_DataReceived : download 42344 of 46896 bytes
dota_DataReceived : download 42880 of 46896 bytes
dota_DataReceived : download 43416 of 46896 bytes
dota_DataReceived : download 43952 of 46896 bytes
dota_DataReceived : download 44488 of 46896 bytes
dota_DataReceived : download 45024 of 46896 bytes
dota_DataReceived : download 45560 of 46896 bytes
dota_DataReceived : download 46096 of 46896 bytes
dota_DataReceived : download 46632 of 46896 bytes
dota_DataReceived : download finished
dota_DownloadFinished : adl_adFinalise : OK
dota_DownloadFinished : adl_adInfo : OK (size 46896 bytes)

adl_install : OK

+WIND: 13

+WIND: 12,0

+WIND: 12,1

+CREG: 0

+CGREG: 0

ADL_INIT_DOWNLOAD_ERROR

Any idea?

Thanks and Happy new year in advance

gdt

Hello gdt,

I am using OAT 4.10, i guess from the release note of OAT 4.11 that it has updated file generation tool. Have you tried to install an example program from the OAT 4.10 ( or from 4.11 )?

I have succeded with the update ( almost :slight_smile: ), but i couldn’t give much test because currently i am in short of FTP enabled q2686 CPU-s. I have a test device out in the “jungle”, i succeded to update it, but it seems to me that the module just hanged after ad_install(), (i couldn’t reach it in SMS ). But after repowering it on the field, the new program started. On one occasion the module restarted with the new program after 10 hours. Apart from this the program and the device looks stable, so it was not a simple power loss which helped to restart the module. Lucky for me that i forgot to activate the external watchdog timer of the module, which could solve the problem. :slight_smile:

If i discover what causes the hangup i will post it.

Best Regards and Happy New Year,

Tom

Thanks tom,

I coudn’t try to resolve problems this week, but I will make some tests next week. I will posts my conclusions. I have juste some details :

I have already tested firmware compiled with old openat (4.0) and newer (4.11) . Same problem…

Juste after the adl_adInstall, the firmware reboot. In the past, adl_Install was called and reboot never comes…I used a timer to reset the modem after 2 minutes.

I will check if I disable the watchdog if I solve the problem…

I don’t use anymore ftp for downloading firmware, too much problems to have ftp enabled version of the Q2686… with the edlib or wip :wink:

Best regards,

gdt

Interesting: I’ve had units that become unreachable by SMS after DOTA (I’m using Data Calls) - see:

wavecom.com/modules/movie/sc … =3514#3514

In fact, the units receive SMS OK, but cannot send - the adl_smsSend returns -8 = ADL_RET_ERR_BAD_STATE.

May be nothing to do with your case - just thought I’d mention it…

Very strange this DOTA…It’s difficult to have something reliable…

I will check your sms bug soon to know if I have the same bug.

Thanks for your reply

Best regards,

gdt

Hi everyone,

After some testing and implementing MD5 on the downloaded firmware, I found that text files are correctly transmitted over GPRS while binary files not … I don’t understand why there is such alteration…

I someone have an idea…

I could code the firmware in base64, decode it and write it in another cell id but this cost gprs (base64 is 33% greater than original file…)

Thanks in advance

Best regards,

gdt

If you are using FTP to get the file into the module, remember that with FTP there is TEXT mode transfer and BINARY mode transfer…

I use in house protocol to avoid problems with the wip library :wink:

Thanks for reply

Best regards,

gdt

I have found the bug. It was in my in house protocol…edlib and wip does not work in the same manner… adl_adInstall works quite well.

Thanks for all replyes

Best regards,

gdt

Hello folks,

I’ve discovered what causes the hangup after calling the adInstall() function in OS 6.61.

1.scenario
The module connected to the PC through UART1. DOTA works fine.

2.scenario with steps
The module disconnected from the PC

  1. The module reboots and receive the UPDATE command and reboots properly.
  2. The module starts only the needed routines to perform the update
  3. Download completed. adInstall() called

But after that the module CANNOT reboot just HANGS.

I’ve found the following solution to remedy this bug(?).

[i]1. I connect the module to the serial port and the module starts with the new program. :open_mouth:

  1. Repower the module ( new program starts again )
    [/i]
  2. Disable the hardware flow control of the UART1 before DOTA (AT+IFC=0,0)

It seems to me that the module is not able to reboot until the RTS line is high after adInstall() if the hardware flow control is enabled.

Have you experienced this?

tom

Hi everyone,

First, awneil, I have the same bug… I format the flash with adl_adFormat but It does not resolve the problem for me…

Second, after successfull dota, the modem reboot exactly every 2 minutes…I receive a ADL_INIT_POWER_ON event at the start…

I tried also to make an at&f followed by at&w and at+wopen=3 but it does not resolve the two problems above.

The only way I found to have the plateform working is to reupload the os 6.61, the firmware and I have no more 2 minutes reset.

Third, I had no time to test without pc today… I will try tomorrow.

Best regards,

Thanks in advance

gdt

Hi everyone,

The reboot every 2 minutes also occurred when the application is not running after dota :angry: Apparently, a simple at&f followed by at&w (I don’t know if required) will correct this bug.

UPDATE : only works if I upload the file dwl.dwl before at&f…I don’t know why… e2p config damaged by dota???

I tested twice the dota without connection to the pc and adl_adInstall not seems to work, when I reconnect the device to the pc, I see that no installation has been done but there is not crash of the module.

For the sms, I do that after dota :

void flh_AdFormat()
{
s8 sReturn = 0;	

	Log(LOG_LEVEL_INFO,"flh_AdFormat : in");

	flashEventHandle = adl_adEventSubscribe ( flh_FlashRescueHandler );

	switch(flashEventHandle)
	{
		case OK:
				Log(LOG_LEVEL_INFO,"flh_AdFormat : OK");
			break;
		case ADL_RET_ERR_UNKNOWN_HDL:
				Log(LOG_LEVEL_ERROR,"flh_AdFormat : ADL_RET_ERR_UNKNOWN_HDL");
			break;
		case ADL_RET_ERR_SERVICE_LOCKED:
				Log(LOG_LEVEL_ERROR,"flh_AdFormat : ADL_RET_ERR_SERVICE_LOCKED");
			break;
	}
	
	sReturn = adl_adFormat ( flashEventHandle );

	switch(sReturn)
	{
		case ADL_AD_EVENT_FORMAT_INIT:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_AD_EVENT_FORMAT_INIT");
			break;
		case ADL_AD_EVENT_FORMAT_PROGRESS:
				Log(LOG_LEVEL_INFO,"flh_AdFormat : ADL_AD_EVENT_FORMAT_PROGRESS");
			break;
		case ADL_AD_EVENT_FORMAT_DONE:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_AD_EVENT_FORMAT_DONE");
			break;
		case ADL_RET_ERR_BAD_STATE:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_RET_ERR_BAD_STATE");
			break;
		case ADL_RET_ERR_UNKNOWN_HDL:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_RET_ERR_UNKNOWN_HDL");
			break;
		case ADL_RET_ERR_NOT_SUBSCRIBED:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_RET_ERR_NOT_SUBSCRIBED");
			break;
		case ADL_AD_RET_ERR_NOT_AVAILABLE:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_AD_RET_ERR_NOT_AVAILABLE");
			break;
		case ADL_RET_ERR_SERVICE_LOCKED:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : ADL_RET_ERR_SERVICE_LOCKED");
			break;
		default:
				Log(LOG_LEVEL_WARNING,"flh_AdFormat : other : %d", sReturn);
			break;
	}

	Log(LOG_LEVEL_INFO,"flh_AdFormat : out");
}

Awneil, do you make something more to get sms working?

Thanks

Best regards,

gdt

This is information only. I have done DOTA with my own implementation of TFTP since June 2005. I have it working without problems on the Q2426 with 651 and 657 level firmware. It also works on the Q2686 and Q2687 with 6.61 firmware with out problems. This is used for downloading my 70k OpenAT application. I use no plugins with my code.

What version of OpenAT do you use to compile you firmware?

Thanks in advance

Best regards,

gdt

I use versions 3.02(v651), 3.10(v657), 3.13(v657), 4.11(v661) and 4.12(v661). Code is writen in BASIC. I have also written the downloader using Borland’s C++ Builder 6.0. Code also handles SMS null message wakeup and statistics retrieval.

Do you use the adl_adInstall function ? I check the md5 of the downloaded firmware before install it. So i’m pretty sure the problem is in the adl_adInstall.

After successfull dota :
I can’t send anymore sms
The openat os reboot every 2 minutes

I tried also to format tha ad space after successful dota but did not resolve the sms problem

Did you notice such behavior?

Thanks

Best regards,

gdt

Hi everyone,

With the OpenAT 4.12, I don’t have any reset every 2 minutes.
Seems to work now

Thanks all

Best regards,

gdt

That sounds like the same bug in adl_adInstall as described here:

So it’s not specifically the state of the RTS line as such that causes the problem - but the fact that stuff gets queued-up waiting for the UART to be abel to transmit…