Hello everyone!
I´m using 2406 and 2501 modules and I´m trying to read strings from an external GPS. This external GPS works with 4800bps.
I´ll need the UART1 to enter AT commands and Read status messages with Hyperterminal.
But still then I couldn´t read it…
Can anybody help me?
Here´s my code:
adl_atCmdCreate("AT+WGPSCONF=0,0",FALSE,(adl_atRspHandler_t)NULL,NULL);
adl_atCmdCreate("AT+WMFM=0,1,2",FALSE,(adl_atRspHandler_t)NULL,NULL);
adl_atCmdCreate( "AT+IPR=4800", ADL_AT_PORT_TYPE( ADL_AT_UART2, FALSE ), Res_IPR_Handler, "*", NULL );
bool SerialControl(adl_fcmEvent_e event)
{
switch(event)
{
case ADL_FCM_EVENT_FLOW_OPENNED:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_FLOW_CLOSED:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_V24_DATA_MODE:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_V24_DATA_MODE_EXT:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_V24_AT_MODE:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_V24_AT_MODE_EXT:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_RESUME:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
case ADL_FCM_EVENT_MEM_RELEASE:
adl_atSendResponse(ADL_AT_RSP, "\r\nADL_FCM_EVENT_FLOW_OPENNED\r\n");
break;
}
}
bool SerialData(u16 DataLen, u8 * Data)
{
adl_atSendResponse(ADL_AT_RSP, "\r\nReceived Data\r\n");
return FALSE;
}
bool Res_IPR_Handler( adl_atResponse_t *paras )
{
adl_atSendResponse(ADL_AT_RSP, "\r\nRs_IPR_Handler\r\n");
adl_fcmSubscribe( ADL_FCM_FLOW_V24_UART2, SerialControl, SerialData );
return TRUE;
}
The first thing I´m trying to do Is get any “Received Data” message.
Any ideas?
Thanks,
Henrique
rickonvb@yahoo.com.br
[/code]