Isuru Senarath
Member level 2
HI
I am using AT89S52 to read a sms which attached to motorola C168. I need to transmit AT+CPMS="ME","ME","ME" to serial port as below, How can I do it?
When I am doing this in KEIL uVision3, there is an error called "error c141: syntax error near 'ME' ". How can I transmit to serial port without any trouble?
I am using AT89S52 to read a sms which attached to motorola C168. I need to transmit AT+CPMS="ME","ME","ME" to serial port as below, How can I do it?
Code:
void SMSString(char*text) ;
SMSString("AT\r"); // AT commands to initialize gsm modem
delay(50);
SMSString( "ATe0\r"); // turn off echo
delay(50);
SMSString( "AT+CPMS="ME","ME","ME"\r"); // select memory
delay(50);
SMSString( "AT&W\r"); // save settings
delay(50);
SMSString( "AT+CMGF=1\r"); // select text mode for sms
delay(50);
SMSString( "AT+CNMI=2,1,0,0,0\r"); // notification of new sms
When I am doing this in KEIL uVision3, there is an error called "error c141: syntax error near 'ME' ". How can I transmit to serial port without any trouble?