awneil
July 27, 2011, 5:14pm
1
1. “Long” commands, or command sequences, are not (always) delivered correctly
eg,
AT+MYLONGCOMMAND parameter1,parameter2,parameter3,parameter4
On hitting , nothing happens - the command is not delivered to the application, and there is no response.
Hitting again doesn’t help.
Sending AT may get an OK response
This also seems to happen during sequences of commands; eg,
AT+CMD1
AT+CMD2 parameter
AT+CMD1parameter1,parameter2
Again, sending AT may get an OK resply, and commands will be accepted again.
2. Spurious Trace output appearing in the Console
This also used to happen in the old TE with TMT.
I think it happens less in DS - but it does still happen.
daav
August 3, 2011, 8:09am
2
–> 1.
Do you have a small Open AT application sample reproducing the issue? Did you make the test with TMT to be sure it’s related to DS and not to the target?
Another question: which baud rate are you using?
We’ve observed some AT commands handling issues when baud rate becomes particularly high (460800 and higher).
–> 2.
Clearly a target issue. DS and TMT both display in the console everything which is not correctly encoded in our protocol frames. Spurious characters which appear in the console clearly come from a bad encoding on target side. Will see with the concerned people if they have any clue on this pretty old legacy issue…
awneil
August 26, 2011, 7:28pm
3
I have just seen this problem occurring with the Sound_Demo sample provided with DS.
I am using the sample unaltered, apart from adding the following function to trace what is actually being delivered to the AT Command handlers:
void traceReceivedParas( adl_atCmdPreParser_t * paras )
{
TRACE(( SD_TRACE_LEVEL, paras->StrData ));
DUMP ( SD_TRACE_LEVEL, paras->StrData, paras->StrLength+1 );
}
example of use:
void sd_STOP_CmdHandler ( adl_atCmdPreParser_t * paras )
{
s32 sReturn = OK - 1;
traceReceivedParas( paras );
// Switch on CmdType
switch(paras->Type)
Example command sequence:
Note that the “OK” response appears immediately after the “at+tone=2000” command, but there is a blank line between the “at+tone=3000” command and its “OK” response: this was where the command was not recognised when I hit Enter, so I hit Enter again - and that did give a response.
The Trace is:
“11/08/26,19:44:25:671 - 001”;“ADL”;“10”;“at+gain?”
“11/08/26,19:44:25:687 - 001”;“ADL”;“10”;"61 74 2B 67 61 69 6E 3F 0D 00 0D "
“11/08/26,19:44:33:453 - 001”;“ADL”;“10”;“at+dest?”
“11/08/26,19:44:33:468 - 001”;“ADL”;“10”;"61 74 2B 64 65 73 74 3F 0D 00 0D "
“11/08/26,19:44:56:406 - 001”;“ADL”;“10”;“at+duration?”
“11/08/26,19:44:56:406 - 002”;“ADL”;“10”;"61 74 2B 64 75 72 61 74 69 6F 6E 3F 0D 00 4D "
“11/08/26,19:45:02:640 - 001”;“ADL”;“10”;“at+duration=0”
“11/08/26,19:45:02:656 - 001”;“ADL”;“10”;“61 74 2B 64 75 72 61 74 69 6F 6E 3D 30 0D 00 22 "
“11/08/26,19:45:02:656 - 002”;“ADL”;“10”;“New sd_Duration : 0”
“11/08/26,19:45:17:000 - 001”;“ADL”;“10”;“at+tone=2000”
“11/08/26,19:45:17:000 - 002”;“ADL”;“10”;“61 74 2B 74 6F 6E 65 3D 32 30 30 30 0D 00 00 "
“11/08/26,19:45:17:015 - 001”;“ADL”;“10”;”[TONE] Stop process : -3”
“11/08/26,19:45:17:015 - 002”;“ADL”;“10”;“adl_audioTonePlay ( 1, 2000, 0, 0, 0, 0 )”
“11/08/26,19:45:17:015 - 003”;“ADL”;“10”;“sReturn : 0”
“11/08/26,19:45:22:671 - 001”;“ADL”;“10”;“at+stop”
“11/08/26,19:45:22:671 - 002”;“ADL”;“10”;“61 74 2B 73 74 6F 70 0D 00 30 "
“11/08/26,19:45:22:687 - 001”;“ADL”;“10”;“adl_audioStop ( 1 ) : 0”
“11/08/26,19:45:22:687 - 002”;“ADL”;“10”;“adl_audioUnsubscribe ( 1 ) : 0”
“11/08/26,19:45:34:281 - 001”;“ADL”;“10”;“at+tone=3”
“11/08/26,19:45:34:281 - 002”;“ADL”;“10”;“61 74 2B 74 6F 6E 65 3D 33 0D 00 30 "
“11/08/26,19:45:34:296 - 001”;“ADL”;“10”;”[TONE] Stop process : -3”
“11/08/26,19:45:34:312 - 001”;“ADL”;“10”;“adl_audioTonePlay ( 1, 3, 0, 0, 0, 0 )”
“11/08/26,19:45:34:328 - 001”;“ADL”;“10”;“sReturn : 0”
“11/08/26,19:45:58:531 - 001”;“ADL”;“10”;“at+stop”
“11/08/26,19:45:58:531 - 002”;“ADL”;“10”;"61 74 2B 73 74 6F 70 0D 00 0D "
“11/08/26,19:45:58:531 - 003”;“ADL”;“10”;“adl_audioStop ( 1 ) : 0”
“11/08/26,19:45:58:546 - 001”;“ADL”;“10”;“adl_audioUnsubscribe ( 1 ) : 0”
Note that the “at+tone=3000” command was delivered to the handler as “at+tone=3”
Not yet
The above was at 115200
awneil
August 26, 2011, 8:03pm
4
Another example
at+stop
OK
at+tone=3000
ERROR
at+tone=3000
OK
at+stop
OK
Here, I typed “at+tone=3000” and got no response, so I hit Enter again - and got the ERROR response.
The Trace is:
“11/08/26,20:53:36:406 - 001”;“ADL”;“10”;“at+stop”
“11/08/26,20:53:36:406 - 002”;“ADL”;“10”;"61 74 2B 73 74 6F 70 0D 00 30 "
“11/08/26,20:53:36:421 - 001”;“ADL”;“10”;“adl_audioStop ( 1 ) : 0”
“11/08/26,20:53:36:421 - 002”;“ADL”;“10”;“adl_audioUnsubscribe ( 1 ) : 0”
“11/08/26,20:53:42:812 - 001”;“ATI”;“1”;“at+to”
“11/08/26,20:53:42:812 - 002”;“ATI”;“1”;“Storing AT Command”
“11/08/26,20:53:42:812 - 003”;“ATI”;“1”;"41 54 2b 54 4f 1a "
“11/08/26,20:53:42:812 - 004”;“ATI”;“1”;“ati_Rsp RspType = 0 CmdClass = 2”
“11/08/26,20:53:42:812 - 005”;“ATI”;“1”;“ati_Rsp() : FlowID= 1”
“11/08/26,20:53:42:812 - 006”;“ATI”;“1”;“context->ati_V24PortId = 0x1”
“11/08/26,20:53:42:828 - 001”;“ATI”;“1”;“ati_SendRsp: Len=9 PortId = 1”
“11/08/26,20:53:42:828 - 002”;“ATI”;“1”;“ERROR”
“11/08/26,20:53:42:828 - 003”;“ATI”;“1”;“0d 0a 45 52 52 4f 52 0d 0a "
“11/08/26,20:53:42:828 - 004”;“ATI”;“1”;“Begin: ati_ResetAutomata(): AutoNb: 64, CmdClass:2”
“11/08/26,20:53:42:828 - 005”;“ATI”;“1”;“End: ati_ResetAutomata()”
“11/08/26,20:53:49:843 - 001”;“ADL”;“10”;“at+tone=3000”
“11/08/26,20:53:49:843 - 002”;“ADL”;“10”;“61 74 2B 74 6F 6E 65 3D 33 30 30 30 0D 00 00 "
“11/08/26,20:53:49:859 - 001”;“ADL”;“10”;”[TONE] Stop process : -3”
“11/08/26,20:53:49:859 - 002”;“ADL”;“10”;“adl_audioTonePlay ( 1, 3000, 0, 0, 0, 0 )”
“11/08/26,20:53:49:859 - 003”;“ADL”;“10”;“sReturn : 0”
“11/08/26,20:53:54:812 - 001”;“ADL”;“10”;“at+stop”
“11/08/26,20:53:54:828 - 001”;“ADL”;“10”;"61 74 2B 73 74 6F 70 0D 00 30 "
“11/08/26,20:53:54:828 - 002”;“ADL”;“10”;“adl_audioStop ( 1 ) : 0”
Here, you can see that the command was delivered as just “at+sto” - so it didn’t even reach the handler!
daav
August 29, 2011, 7:06am
5
Thanks for the clues for reproducing. Last questions:
what are your FW/Open AT OS/DS versions?
Is it a coincidence that the issue occurs only on AT+TONE=3000 command in your given examples?
Is it easy to reproduce? (i.e. do we have to send 10 or 1000 commands to expect reproduce it? )
Thanks.
awneil
August 29, 2011, 7:51am
6
daav:
what are your FW/Open AT OS/DS versions?
ATI9 response is:
“DWL”,“V08b0j”,“”,“Wavecom”,54744,“022410 18:01”,“e9be6255”,“00010000”
“FW”,“FW_SRC_743_6.WMP100H”,“R7.43.0.201003261552.WMP100”,“Wavecom”,2139952,“032610 15:52”,“4aec2bbf”,“00020000”
“OAT”,“”,“”,“”,80156,“082611 21:05”,“bbc3a540”,“00260000”
-“Developer Studio”,“2.0.0.201103101643-R6604”
-“Open AT Embedded Software Suite package”,“2.33.0.201009161739”
-“Open AT OS Package”,“6.32.0.03”
-“Firmware Package”,“7.43.0.201009151513”
daav:
Is it a coincidence that the issue occurs only on AT+TONE=3000 command in your given examples?
Yes, I think it’s a coincidence.
It seems that the bug occurs after a certain number of commands have been issued (or, possibly, after a certain number of characters), and it just happens that I’ve used the same sequence - so the bug manifests at the same point.
Is it easy to reproduce? (i.e. do we have to send 10 or 1000 commands to expect reproduce it? )
The quoted sequence is sufficient after starting the application in DS.
daav
August 30, 2011, 6:54am
7
Ok, thanks; we’ll have a look to find the root cause of the issue.