I use smshandler reseting Q2406B when fcmSubscribe with OPENAT.
How can prevent this state.
I wrote code samples.
#define ATRSP(X) adl_atSendResponse(ADL_AT_RSP, X);
void fcmCtrlH ( u8 event )
{
return;
}
void fcmDataH ( u16 DataLen, u8 * Data )
{
return;
}
bool Res_WMFM1_Handler ( void )
{
return TRUE;
}
bool Res_IPR_Handler ( void )
{
return TRUE;
}
void SMS_Control_Handler(u8 Event, u16 Nb)
{
return;
}
bool SMS_Handler (ascii * SmsTel, ascii* SmsTimeLength, ascii* SmsText)
{
ATRSP(SmsText);
adl_atCmdCreate("AT+CMGD=1,4",FALSE, (adl_atRspHandler_t)Res_IPR_Handler, "*",NULL);
*/
return TRUE;
}
void UART2_Enable ( void )
{
adl_atCmdCreate( “AT+WMFM=0,1,2”, FALSE, (adl_atRspHandler_t)Res_WMFM1_Handler, “*”, NULL );
adl_atCmdCreate( “AT+IPR=19200”, ADL_AT_PORT_TYPE( ADL_AT_UART2, FALSE ), (adl_atRspHandler_t)Res_IPR_Handler, “*”, NULL );
adl_fcmSubscribe( ADL_FCM_FLOW_V24_UART2, (adl_fcmCtrlHdlr_f)fcmCtrlH, (adl_fcmDataHdlr_f)fcmDataH );
SmsHandle=adl_smsSubscribe((adl_smsHdlr_f )SMS_Handler, (adl_smsCtrlHdlr_f) SMS_Control_Handler, ADL_SMS_MODE_TEXT);
return;
}
void adl_main ( adl_InitType_e InitType )
{
UART2_Enable();
}
if receive sms reseting Q2406B module. Open AT version 3.02
[/code]