GSM CONNECTING TO PHONE USING AT COMMANDS IN C PROG

Seamus Maloney
Seamus Maloney used Ask the Experts™
on
I had this question after viewing Using AT commands with C.

I'm doing a project and want to connect my gsm "click" to my phone USING C PROGRAMMING, have it wired up ok just the program is letting me down..... [ I want the gsm to send a message to my phone ]
The GSM is connected to the UART serial port of my 8051f020 microcontroller, any help much appreciated my program is as follows:


      
 void send_it (void) interrupt 4 using 1   // This is the ISR 
	
	{  
		
		TI0 = 1; // TI must be cleared by software when writing directly  
	                       // to SBuf  as shown in the previous program – However,   
                   // the  Printf function requires TI to equal “1” on entering
		          // the function.
		printf ("Hello \n\n");  
   		printf ("This text was sent to the Uart using Printf \n\n"); 
		
    printf("AT+CMGF=1<CR>%c\n\n"); // configured the GSM module to SMS mode                                     
    printf("AT+CMGR=3<CR>\n\n");       

    ("AT+CMGS=\"08******\"HELLO"); // send mobile number to the GSM           
       
   
	}

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial