Hi to everyone, I am new to Open AT. I am using GL6100 RS323 device.
I wanted to test the serial communication using the example code on FCM from Open AT Tutorial where the following code stucked me in the Data mode.
I could not find solution here on the forum.
How can I erase the program or stop it before it boots?
Once the program runs, I can not access the AT commands in order to stop the application. The application is halted anyway.
Any solution?
#include "adl_global.h"
const u16 wm_apmCustomStackSize = 4096;
/* Global variable */
u8 Handle; //FCM handle
bool fcmCtrlH (adl_fcmEvent_e event );
bool fcmDataH (u16 DataLen, u8 * Data);
void adl_main (adl_InitType_e InitType )
{
Handle=adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART1,fcmCtrlH, fcmDataH);
TRACE (( 1, "Embedded Application: Main" ));
}
bool fcmCtrlH ( adl_fcmEvent_e event )
{
TRACE ((1, "Control event received --> %d", event));
switch(event)
{
case ADL_FCM_EVENT_FLOW_OPENNED:
TRACE (( 1, "Flow Opened" ));
/* Switching V24 state from AT to Data. */
adl_fcmSwitchV24State(Handle, ADL_FCM_V24_STATE_DATA);
break;
case ADL_FCM_EVENT_V24_DATA_MODE:
TRACE (( 1, "Flow in Data Mode" ));
/* sending data to the external application via V24 serial link */
adl_fcmSendData(Handle, "This is a test case", 20);
break;
}
return TRUE;
}