Content originally posted in LPCWare by yongchang05 on Wed Oct 10 11:05:31 MST 2012
Hi JJClyne,
you are using an AT Command to read from your GSM right? may i know how did u do it in the end? through polling or interrupt?
Quote: JJClyne
Hi Zero,
Thanks for the link.
Do you have a way to receive longer strings ?
+CMGR: "REC READ","+6591xxxxx","","12/06/06,16:10:45+32"
was received as
+CMGR: "REC RE
I need to receive the entire string to perform some function.
Would you mind giving me some advice on this ?
if (LPC_UART3->LSR & UART_LSR_RDR) //To modify, perhaps a better way.
{
do
{
UART_Receive(LPC_UART3, &data, 3, BLOCKING);
//Timer0_Wait(500);
if (data !=
'\r')
{
len++;
line[len-1] = data;
}
} while ((len<64) && (LPC_UART3->LSR & UART_LSR_RDR));
}
line[len]=0;
Zero,any ideas why i'm not receiving the full string
+CMGR: "REC READ","+65913xxxxx","","12/06/06,16:10:45+32" ?
and got
+CMGR: "REC RE instead ?