OpenAT App on UART1 Port - AT commands not accepted


#1

I complied and uploaded the example given below on WMP100.

This program causing WMP100 to go through restarts. This program opens a flow using FCM to UART1 and tries to switch to Data mode.

WMP100 now does seem to accept any AT command (at+wopen=0; at+wdwl etc) hence I am not able to download another program.

Question: How can we download a new application when the WMP is not accepting AT commands.

===============
#include “adl_global.h”

/***********************************************************************/
/
Mandatory variables /
/
-------------------------------------------------------------------------
/
/
wm_apmCustomStack /
/
wm_apmCustomStackSize /
/
-------------------------------------------------------------------------
/
/***************************************************************************/
#if OAT_API_VERSION >= 400
const u16 wm_apmCustomStackSize = 4096;
#else
u32 wm_apmCustomStack[1024];
const u16 wm_apmCustomStackSize = sizeof(wm_apmCustomStack);
#endif

/**************************************************************************/
/
Local variables /
/
**************************************************************************/
s8 UART1_Handle;
ascii msg_test[20];
u16 msg_length;

/**************************************************************************/
/
Local functions /
/
**************************************************************************/
bool hnd_fcmData_U1 ( u16 DataSize, u8 * Data );
bool hnd_fcmCtrl_U1 ( adl_fcmEvent_e Event );
void UART1_Enable(void);
void hnd_tmrMessage_U1 ( u8 ID );

bool hnd_fcmData_U1 ( u16 DataSize, u8 * Data )
{
adl_atSendResponse ( ADL_AT_UNS, “\r\n>> hnd_fcmData_U1\r\n”);

return TRUE;
}

bool hnd_fcmCtrl_U1 ( adl_fcmEvent_e Event )
{
adl_atSendResponse ( ADL_AT_UNS, “\r\n>> hnd_fcmCtrl_U1:”);

switch (Event)
{
case ADL_FCM_EVENT_FLOW_OPENNED :
//adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_FLOW_OPENNED\r\n");
TRACE((1, " ADL_FCM_EVENT_FLOW_OPENNED\r\n"));
adl_fcmSwitchV24State(UART1_Handle, ADL_FCM_V24_STATE_DATA);
break;
case ADL_FCM_EVENT_FLOW_CLOSED :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_FLOW_CLOSED\r\n");
break;
case ADL_FCM_EVENT_V24_DATA_MODE :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_DATA_MODE\r\n");
adl_tmrSubscribe ( TRUE, 10, ADL_TMR_TYPE_100MS, hnd_tmrMessage_U1 );
break;
case ADL_FCM_EVENT_V24_DATA_MODE_EXT :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_DATA_MODE_EXT\r\n");
break;
case ADL_FCM_EVENT_V24_AT_MODE :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_AT_MODE\r\n");
adl_fcmSendData(UART1_Handle, “AT Mode\r\n”, 9);
break;
case ADL_FCM_EVENT_V24_AT_MODE_EXT :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_AT_MODE_EXT\r\n");
break;
case ADL_FCM_EVENT_RESUME :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_RESUME\r\n");
break;
case ADL_FCM_EVENT_MEM_RELEASE :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_MEM_RELEASE\r\n");
break;
case ADL_FCM_EVENT_V24_DATA_MODE_FROM_CALL :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_DATA_MODE_FROM_CALL\r\n");
break;
case ADL_FCM_EVENT_V24_AT_MODE_FROM_CALL :
adl_atSendResponse ( ADL_AT_UNS, " ADL_FCM_EVENT_V24_AT_MODE_FROM_CALL\r\n");
break;
}
return TRUE;
}

void UART1_Enable(void)
{
adl_atSendResponse ( ADL_AT_UNS, “\r\n>> UART1_Enable\r\n”);

UART1_Handle = adl_fcmSubscribe ( ADL_FCM_FLOW_V24_UART1, hnd_fcmCtrl_U1, hnd_fcmData_U1);
}

void hnd_tmrMessage_U1 ( u8 ID )
{
wm_sprintf(msg_test, “\r\nTest Message on UART 1\r\n”);
msg_length = wm_strlen(msg_test);

adl_fcmSendData(UART1_Handle, msg_test, msg_length);

adl_atSendResponse ( ADL_AT_UNS, "\r\n>> hnd_tmrMessage_U1 \r\n" ); 

}

/*******************************************************************/
/
Function : adl_main /
/
-------------------------------------------------------------------------
/
/
Object : Customer application initialisation /
/
/
/
-------------------------------------------------------------------------
/
/
Variable Name |IN |OUT|GLB| Utilisation /
/
--------------------±–±--±–±---------------------------------------
/
/
InitType | | | | Application start mode reason /
/
--------------------±–±--±–±---------------------------------------
/
/***************************************************************************/
void adl_main ( adl_InitType_e InitType )
{
//adl_atSendResponse ( ADL_AT_UNS, “\r\n>> Start Rev1.0.1 \r\n” );
TRACE((1, " ADL_FCM_EVENT_FLOW_OPENNED\r\n"));

// TO DO : Add your initialization code here 

UART1_Enable();
}

Output on UART1

hnd_fcmCtrl_U1: ADL_FCM_EVENT_FLOW_OPENNED

+WIND: 13

Start Rev1.0.1

UART1_Enable

hnd_fcmCtrl_U1: ADL_FCM_EVENT_FLOW_OPENNED

+WIND: 13

Start Rev1.0.1

UART1_Enable

hnd_fcmCtrl_U1: ADL_FCM_EVENT_FLOW_OPENNED

+WIND: 13

Start Rev1.0.1

UART1_Enable


#2

I don’t know if there is a newer trick for the WMP 100 but on older modules you would need to flash the core firmware by using the boot pin and DWLWin Tool. This should still work with the WMP 100. I think you should contact your distributor to get the appropriate version of the tool and the core firmware files required.

Best Regards,
Jan


#3

hi

I find the same probs of not responding of AT commands.
but this arrieved after downloading “Hello_Word” sample.
It work for 2-3 times after that modem stop giving responding any AT command.

mr. jan
Can I get this DWLWin Tool from anywhere.
I am working on Q2406B module

Thanks in advance


#4

I got the same prob with every application.

after debuging the rte version of the OpenAT software, the modem (Q2686) only print out some wind: messages and refuses to accept any at commands. even after a reset or a powercycle. seems to be a problem of the debugger.

the solution for me: start dwlwin (you can download it when you have a login on the wavecom site under product->download->tools) and just mark the piont “erase OpenAT Application”. start the modem with the on/off pin set to bootmode. after this powercycle and the modem is ready from the scratch.

but i think its a bad way to use the tools. the debugger should release the modem in its empty state after debugging …

cheers claudio


#5

On devkits, if you hold down the two keyboard switches closest to the board’s edge while booting, your Open AT application won’t start. You can then enter “AT+WOPEN=0” to disable any application causing reboot loops.


#6

hi

thanks fro the response.
i could evalute the problem but not solve it:

if i burn down the firmware, everithing works fine. the target Monitoring Tool is able to connect to the board, i can type in some at-commands in the terminal emulation. after setup the uart2 and start debugging (RTE), everithing works fine.

now its getting strange:

after finishing debugging, the Q2686 starts to write WIND: 13, WIND:0 (no sim card) and WIND:7. after this the Q2686 is invisible to the target monitor tool, and does not accept any at commands on uart1. but it accepts at commands on uart2.

is there any at-command to reset the Q2686 in a way that it is like bevor the first time debugging (RTE)

cheers claudio

ps: i use the newest version of firmware and dev-tools R71