TCP and adl_CmdSubscribe

Good day.
I am using adl_atCmdSubscribe.
If connect UART1 then my command is works properly.
But if connect to GPRS , use adl_atCmdCreate (UART1):
AT - return OK
AT+CSQ - return +CSQ: 20,99
AT+IPR? - return +IPR:115200
AT+TEST - return ERROR.
Why? Where did I go wrong?
If connect UART1:
AT+TEST - return +TEST OK.

-“Developer Studio”,“2.3.2.201310241753”
-“Open AT Application Framework package”,“2.52.0.201307100830”
-“Open AT OS Package”,“6.52.0.201306271400”
-“Firmware Package”,“7.52.0.201306260837”
-“Internet Library Package”,“5.56.0.201305170830”

Hi,

I did not understand your use case.
AT+TEST command is a customized command so you have to subscribe to this command using adl_atcmdsubscribe(). If you dont subscribe, it will definitely give an error.

can you share your code??

Code:
subscribe

void MainTask(void)
{ .............
......
adl_atCmdSubscribe("AT+TEST", (adl_atCmdHandler_t)command_handler,
				ADL_CMD_SUBSCRIPTION_ALL_PORTS|
							ADL_CMD_TYPE_TEST|ADL_CMD_TYPE_READ|
							ADL_CMD_TYPE_ACT|ADL_CMD_TYPE_PARA|0x0011);
............
.......
}

use adl_atCmdCreate in TCP session

...
case WIP_CEV_READ:
         while ((Read=wip_read(ev->channel,DataRead, sizeof(DataRead)))>0)//ev->content.read.readable);
			switch (Read)
			{
			case WIP_CERR_CSTATE:
				TRACE ((3,"WIP_CERR_CSTATE= %d",Read));
			break;
			case WIP_CERR_NOT_SUPPORTED:
				TRACE ((3,"WIP_CERR_NOT_SUPPORTED= %d",Read));
			break;
			default:
				TRACE ((3,"Read= %d",Read));
				TRACE((3,(ascii *)DataRead));
				DataRead[Read]='\0';
				TRACE((3,(ascii *)DataRead));
			break;
			};
			TRACE ((3,"AT-Command"));
			//wip_write(ev->channel,DataRead, sizeof(DataRead)); //echo
			TRACE ((3,"Befo adl_atCmdCreate"));
			editPortServer=ev->channel;
			TRACE ((3,"DataRead"));
			TRACE ((3,DataRead));
			CmdRet=adl_atCmdCreate( DataRead,ADL_AT_PORT_TYPE(ADL_PORT_UART1,FALSE),(adl_atRspHandler_t)CmdAnsver_Handler,"*",NULL);
			//adl_atCmdCreate( "AT+IPR?",ADL_AT_PORT_TYPE(ADL_PORT_UART1,FALSE),(adl_atRspHandler_t)CmdAnsver_Handler,"*",NULL);
			TRACE ((3,"Afte adl_atCmdCreate"));
			switch (CmdRet)
			{
				case OK:
					wip_write(ev->channel,"AT-Command OK", sizeof("AT-Command OK"));
					TRACE ((3,"AT-Command OK"));
				break;
				default:
					wip_write(ev->channel,"AT-Command ERROR", sizeof("AT-Command ERROR"));
					TRACE ((3,"AT-Command ERROR"));
				break;
			};
break;
...

CmdRet - return OK (“AT-Command OK” in TRACE)
The handler:

bool CmdAnsver_Handler (adl_atResponse_t *paras)
{
	bool ret=FALSE;
	TRACE((3,"paras->StrData"));
	TRACE((3,paras->StrData));
	TRACE((3,"editPortServer: %d", (int) editPortServer));
	wip_write(editPortServer,(ascii *)paras->StrData, wm_strlen(paras->StrData));
	return ret;
}

paras->StrData - return OK if i am request AT
paras->StrData - return +IPR:115200 if i am request AT+IPR?
paras->StrData - return +CSQ: 25,99 if i am request AT+csq
paras->StrData - return +CME ERROR: 3 if i am request AT+TEST?

But if i am connected UART1 (HiperTerminal COM4)
request AT+TEST? - return OK