We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, im trying to do an SMS project using AT Commands , i wanna display what the mobile sends on LCD , something like when i write the correct AT command using printf("AT\r"); it gives OK , i wanna display that OK on LCD , so i used scanf to capture the message from the mobile but it doesnt work, it freezes the display. here is my code so far
char array[20]; lcd_com(0XC0); lcd_puts("SMS Project"); DELAY_Second(); DELAY_Second(); DELAY_Second(); DELAY_Second(); DELAY_Second(); DELAY_Second(); lcd_com(0x01); while(1){ printf("AT\r"); scanf("%s",&array); PC_LINK_IO_Send_String(&array); lcd_puts(array); } void lcd_puts(char *aaa){ unsigned int i=0; for(;aaa[i]!=0;i++)lcd_data(aaa[i]); } }
No, that's not true.
The phone - and, in fact, any other modem - might be echoing your commands and will also be sending some additional "formatting" characters.
See my post of 22-May-2008 10:44 in the following thread, and follow the links:
http://www.keil.com/forum/docs/thread12482.asp