Adl_fcm_event_mem_release

Hi all,

Here i have pasted FCM code, while i am running this code i am getting the “ADL_FCM_EVENT_MEM_RELEASE” event. I am not able to collect the i/p data from COM . please give the solution for this. What is the wrong with this

void FCM_Function()
{

TRACE( ( 4, "FLOW CONTROL MANAGEMER" ) );
s8_FCMHandler = adl_fcmSubscribe( ADL_PORT_UART1, 					
								(adl_fcmCtrlHdlr_f) fcmCtrlHandler, 
								(adl_fcmDataHdlr_f) fcmDataHandler );
															 /* Subscribing FCM with UART1*/

}

/**************************************************************************************************
Function : fcmCtrlHandler() *
Description : FCM control events handles described here *
Inputs : s8_FCMHandler *
*
Output : Returns value is not relevant, except for ADL_FCM_EVENT_V24_AT_MODE_EXT. *
Note : *
*
**************************************************************************************************/

bool fcmCtrlHandler( adl_fcmEvent_e Event ) /*Function for com port events */
{
TRACE( ( 4, “FCM CONTROL HANDLER” ) );

if( Event ==  ADL_FCM_EVENT_FLOW_OPENNED )					/*If Event is opened switch to data mode*/		
{
	TRACE( (4,"ADL_FCM_EVENT_FLOW_OPENNED") );

	adl_fcmSwitchV24State( s8_FCMHandler, ADL_FCM_V24_STATE_DATA );	/*Switch to DATA mode */
}

if( Event ==  ADL_FCM_EVENT_V24_DATA_MODE )					/* Event flow is opened enters in to data mode */
{
	TRACE((4,"ADL_FCM_EVENT_V24_DATA_MODE"));
}

if(Event == ADL_FCM_EVENT_FLOW_CLOSED)	/* */
{
	TRACE((4,"ADL_FCM_EVENT_FLOW_CLOSED"));
}

if(Event == ADL_FCM_EVENT_V24_DATA_MODE_EXT)/* */
{
TRACE((4,"ADL_FCM_EVENT_FLOW_CLOSED"));
}

if(Event == ADL_FCM_EVENT_V24_DATA_MODE_EXT)/* */
{
TRACE((4,"ADL_FCM_EVENT_V24_DATA_MODE_EXT"));
}

if(Event == ADL_FCM_EVENT_V24_AT_MODE)/* */
{
TRACE((4,"ADL_FCM_EVENT_V24_AT_MODE"));
}

if(Event == ADL_FCM_EVENT_RESUME)/* */
{
TRACE((4,"ADL_FCM_EVENT_RESUME"));
}

if(Event == ADL_FCM_EVENT_MEM_RELEASE)/* */
{
TRACE((4,"ADL_FCM_EVENT_MEM_RELEASE"));
}


return FALSE;

}

/**************************************************************************************************
Function : fcmDataHandler *
Description : FCM data events handler *
Inputs : DataLen, Data *
*
Output : returns a positive or null handle on success *
Note : Data handler subscribed are notified with a data event, and the credir will be *
released only handler returns TRUE *
*
**************************************************************************************************/

bool fcmDataHandler( u16 DataLen, u8 * Data ) /Function to perform the read and write via COM port/
{
int icnt, j=0;
TRACE( (1,“DataLen %d”,DataLen) );

for ( icnt = 0 ; icnt < DataLen ; icnt++ )			/* for continuos receiving */
{
    if ( Data[ icnt ] == '~' )						/* if received data is ~ change into AT mode */   
    {   
		adl_fcmSwitchV24State(s8_FCMHandler, ADL_FCM_V24_STATE_AT );
													/*Switching into AT mode*/
		adl_atSendResponse(ADL_AT_UNS, "ADL_FCM_V24_STATE_AT" );
													/* Send response to TE */
	}
	else
	{
		TRACE((4," Copy i/p data in Char_Fcm_Buf"));
		Char_Fcm_Buf[j++] = Data[icnt];			/*received data willl be stored into  Char_Fcm_Buf */
	}
	TRACE( (1,Char_Gprsbuf) );
													/* Clear the Data buffer */
}

TRACE( (1,Char_Gprsbuf) );

Int_Size = wm_strlen(Char_Fcm_Buf);
wm_memset(Char_Fcm_Buf,'\0',wm_strlen(Char_Fcm_Buf) );

	wm_strcpy (Char_Gprsbuf, Char_Fcm_Buf);
wm_memset(Char_Gprsbuf,'\0',wm_strlen(Char_Gprsbuf) );
	TRACE( (1,Char_Gprsbuf) );

adl_fcmSendData(  s8_FCMHandler,  Data,  DataLen );
adl_atSendResponse( ADL_AT_UNS, Char_Fcm_Buf );		/*Send the received data to TE */

Signal_Strnth_Function();

return TRUE;										/* returns  TRUE on successful transmission or reception */

}

/**************************************************************************************************/

TRACES:

Trace 1 Embedded Application : Main
Trace 1 SIM Subscribe:
Trace 1 PIN code OK
Trace 1 SIM Event:5
Trace 1 SIM Fully Initialsed
Trace 2 APN_Function
Trace 2 APN
Trace 1 PIN code OK
Trace 1 SIM Event:3
Trace 2 40445
Trace 2 IMEI_Function
Trace 2 IMEI
Trace 3 ARISE
Trace 3 355211010016776
Trace 3 TCPIP_Function
Trace 3 TCP-IP Starts here
Trace 1 [GPRS]: initialized.
Trace 1 [GSM]: initialized.
Trace 1 [UART1]: initialized.
Trace 1 [UART2]: initialized.
Trace 1 []: initialized.
Trace 3 wip_bearerOpen Function
Trace 1 [GPRS]: open: -> DISCONNECTED
Trace 2 Set_Apn Function
Trace 3 40445
Trace 2 APN: AIRTEL
Trace 1 APN is set to GPRS
Trace 1 [GPRS]: start: -> CONNECTING
Trace 1 [GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
Trace 1 [GPRS]: GPRS EVENT: 27 (cid=1)
Trace 1 Unable to find the string of the remote trace in the file (ID = 528)
Trace 1 [GPRS]: GPRS EVENT ACTIVATE OK (cid=1): FCM open
Trace 1 [GPRS]: FCM subscribe: 0
Trace 1 [GPRS]: FCM EVENT FLOW OPENNED: -> CONNECTED
Trace 1 WIP_BEV_IP_CONNECTED
Trace 3 IP address: -2127208075
Trace 3 wip_TCPClientCreate
Trace 3 WIP_CEV_OPEN
Trace 3 WIP_CEV_WRITE
Trace 3 Send your Data:
Trace 4 FCM_Function
Trace 4 FLOW CONTROL MANAGEMER
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_FLOW_OPENNED
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_V24_DATA_MODE
Trace 3 WIP_CEV_READ
Trace 3 Bytes receved: 17
Trace 4
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1 H
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 H
Trace 1 H
Trace 1 e
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 e
Trace 1 e
Trace 1 l
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 l
Trace 1 l
Trace 1 l
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 l
Trace 1 l
Trace 1 o
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 o
Trace 1 o
Trace 1 f
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 f
Trace 1 f
Trace 1 e
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1 e
Trace 1 e
Trace 1 r
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 Unable to find the string of the remote trace in the file (ID = 4867)
Trace 1 [GPRS]: GPRS EVENT: 27 (cid=1)
Trace 1 Unable to find the string of the remote trace in the file (ID = 14820)
Trace 1 Unable to find the string of the remote trace in the file (ID = 528)
Trace 1 Unable to find the string of the remote trace in the file (ID = 8842)
Trace 1 Unable to find the string of the remote trace in the file (ID = 4867)
Trace 1 Unable to find the string of the remote trace in the file (ID = 8842)
Trace 1 Unable to find the string of the remote trace in the file (ID = 4867)
Trace 1 Unable to find the string of the remote trace in the file (ID = 12654)
Trace 1 Unable to find the string of the remote trace in the file (ID = 12654)
Trace 1 Unable to find the string of the remote trace in the file (ID = 12654)
Trace 1 Unable to find the string of the remote trace in the file (ID = 12654)
Trace 1 Unable to find the string of the remote trace in the file (ID = 12654)
Trace 1 Embedded Application : Main
Trace 1 SIM Subscribe:
Trace 1 PIN code OK
Trace 1 SIM Event:5
Trace 1 SIM Fully Initialsed
Trace 2 APN_Function
Trace 2 APN
Trace 1 PIN code OK
Trace 1 SIM Event:3
Trace 2 40445
Trace 2 IMEI_Function
Trace 2 IMEI
Trace 3 ARISE
Trace 3 355211010016776
Trace 3 TCPIP_Function
Trace 3 TCP-IP Starts here
Trace 1 [GPRS]: initialized.
Trace 1 [GSM]: initialized.
Trace 1 [UART1]: initialized.
Trace 1 [UART2]: initialized.
Trace 1 []: initialized.
Trace 3 wip_bearerOpen Function
Trace 1 [GPRS]: open: -> DISCONNECTED
Trace 2 Set_Apn Function
Trace 3 40445
Trace 2 APN: AIRTEL
Trace 1 APN is set to GPRS
Trace 1 [GPRS]: start: -> CONNECTING
Trace 1 [GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
Trace 1 [GPRS]: GPRS EVENT: 27 (cid=1)
Trace 1 Unable to find the string of the remote trace in the file (ID = 528)
Trace 1 [GPRS]: GPRS EVENT ACTIVATE OK (cid=1): FCM open
Trace 1 [GPRS]: FCM subscribe: 0
Trace 1 [GPRS]: FCM EVENT FLOW OPENNED: -> CONNECTED
Trace 1 WIP_BEV_IP_CONNECTED
Trace 3 IP address: 252797301
Trace 3 wip_TCPClientCreate
Trace 1 Unable to find the string of the remote trace in the file (ID = 528)
Trace 3 WIP_CEV_OPEN
Trace 3 WIP_CEV_WRITE
Trace 3 Send your Data:
Trace 4 FCM_Function
Trace 4 FLOW CONTROL MANAGEMER
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_FLOW_OPENNED
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_V24_DATA_MODE
Trace 3 WIP_CEV_READ
Trace 3 Bytes receved: 17
Trace 4
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 1 DataLen 1
Trace 4 Copy i/p data in Char_Fcm_Buf
Trace 1
Trace 1
Trace 1
Trace 4 FCM CONTROL HANDLER
Trace 4 ADL_FCM_EVENT_MEM_RELEASE
Trace 1 [GPRS]: GPRS EVENT: 27 (cid=1)
Trace 1 Unable to find the string of the remote trace in the file (ID = 4867)
Trace 1 [GPRS]: GPRS EVENT: 27 (cid=1)

I am not sure how are you trying to get IP (i/p) data over COM? Did you manage to find a solution?

since you have subscribed to FCM over UART1, the data handler will be called when some data is received over UART1 ( and not over GPRS if that is what you intend to do). Also, the ADL_FCM_EVENT_MEM_RELEASE is not related to receiving data in the data handler. Rather it is related to sending of data using the adl_fcmSendData () function. You can refer the ADL user guide for more information on this.

I hope this helps.