Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need Urgent help in Sending SMS from PC to Hp

Status
Not open for further replies.

like

Newbie level 5
Newbie level 5
Joined
Jun 13, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,417
Hi, I need to send SMS from PC to Handphone using iTegno GPRS Modem. The microcontroller that i am using is MSP430F22x4.I am new to
micro controller and not good in programming. I have tried sending SMS using hyperterminal, its working well but not sure how to code in my
micro controller MSP430F22x4. Now i need a code that can send SMS from PC to Hp using iTegno GPRS Modem and MSP430F22x4. I am using C/C++ programming.Thanks in advance!
 

Using your USART in your MSP430, you can send the commands the modem and receive the response to process further.
 
Can i have a sample code on sending SMS from PC to Hp using iTegno(3832) GPRS Modem and MSP430F22x4 micro controller. I am using IAR Embedded Software which uses C programming. Now I am not sure on how to start the program to Send SMS as I have mention above.
So kindly provide me with a sample code that i can take reference for my project. Thanks.
 

I have tried to use the code that the link shows but it does not works because mine is mot PIC. I am using MSP430 and specified MCU is MSP430F22x4. So can u kindly provide me with a sample code that is similar to my MCU that i am using. Because when i take reference from other MCU its not useful to my project since i cannot refer to it. Thanks.
 

I did coding on sending SMS but it seems like not working because when i compile it has some warnings.
The warnings are : Warning[Pe223]: function "UART_init" declared implicitly

Warning[Pe223]: function "UART_Write" declared implicitly

Warning[Pe223]: function "Delay_ms" declared implicitly


So I not sure how to slove this , so someone pls help me. Thanks.
 

I did coding on sending SMS but it seems like not working because when i compile it has some warnings.
The warnings are : Warning[Pe223]: function "UART_init" declared implicitly

Warning[Pe223]: function "UART_Write" declared implicitly

Warning[Pe223]: function "Delay_ms" declared implicitly


So I not sure how to slove this , so someone pls help me. Thanks.
If you are using different compiler and microcontroller, just take out the idea how to initialize, setup gsm module, sending AT command and delay. Then you need to write in your software. Refer to your compiler manual.
 

sorry i don't understand. Below is my code that i typed in IAR Embedded Workbench (IDE) . While i compile it shows the ERRORS that i mention in #7.
How to solve the ERRORS?

Code:
void UART_Init (void)
{
        
}

 
unsigned char Command_CMGF[]="AT+CMGF=1\r"; 
// AT+CMGF for selecting Text Mode
unsigned char CtrlZ=0x1A;                   
// CTRL+Z for sedning SMS after the message has been entered
unsigned char Command_CMGS[]="AT+CMGS =+6584528977\r"; 
// recepient mobile number
unsigned char Command_AT[]="AT\r";


unsigned char msg01[]="EMERGENCY! This is a test message\from UART\n\r\n\r"; 
                 
                                         // This is Test Message for 
                                         // Virtual Serial Terminal which
                                        //  is not transmitted by Modem 


unsigned char msg02[]="Hello!";


unsigned int i=0,j=0;


void serial_send()

{  

 volatile unsigned int PORTD;
 volatile unsigned int TRISD;
     PORTD = 0;
     TRISD = 0;           // PORTD is output


    UART_init( 115200 ); 
     // initialize UART module - ( 8 bit, 115200 baud rate, no parity bit... )

     for(j=0;j<sizeof(msg01);j++)
     UART_Write(msg01[j]);


     Delay_ms(100);  // 100 msecond delay


    //*************************************
    for(i=0;i<sizeof(Command_AT);i++)
    UART_Write(Command_AT[i]);  // send data via USART
    //*************************************


     Delay_ms(100);  // 100 msecond delay


     //*************************************
     for(i=0;i<sizeof(Command_CMGF);i++)
     UART_Write(Command_CMGF[i]);    // send data via USART


     Delay_ms(100);  // 100 msecond delay


     for(i=0;i<sizeof(Command_CMGS);i++)
     UART_Write(Command_CMGS[i]);     // send data via USART


     for( i=0;i<sizeof(msg02);i++ )
     {
          UART_Write( msg02[i] );                 // send data via USART
          Delay_ms(100);


     }
  Delay_ms( 1000 );  // 100 msecond delay


  UART_Write( 0x1A );   // send data via USART - ctrl+z
/*********************************************/


  while (1)
  {//Start of endless while loop


         PORTD^=0x0F;
         Delay_ms(100);  // 100 msecond delay


  }//End of endless while loop


}
 

Hi, can anyone pls help me on how to send SMS from MSP430RF2274 to Handphone? If possible pls provide me with a sample C code to send SMS from MSP430RF2274 to Handphone using iTegno 3832 GPRS Modem. Thanks.
 

Hello!

There are many sources published by TI and explaining how to do basically anything.
As the 2274 device is about 5 years old, I guess the source code is very reliable.
As for your code, is it the whole code?
In this case, no surprise that you have errors. Let's suppose I am the compiler (or a bit more):

- Your UART_init function is empty
- Serial send defines PORTD without any link with the hardware.
You define PORTD as an unsigned int, so it will behave as you defined it, as a variable,
not as a port. For your info, the F5X series have 16-bytes ports called PA ~ PE.
For each of these ports, you have a PNDIR, PNSEL, PNSEL, PNREN (N being either of {A..E}),
not PORTD. But you can of course #define PORTD PDOUT if you want
But I don't think these 16-bit ports exist on F2X devices. Please verify. Most likely the port
names are PXDIR, PXSEL, PXOUT and PXIN, x being either of {1..10 depending on the model}
- You define a TRISD variable which is set but never used.
- You call an undefined UART_Write function
- You call an undefined Delay_ms function

So I would recommend that you take some TI reference code, and learn how to send one byte
using one of the UARTs. Then plug your device and try to send a byte to it just to verify that
your PC or cell phone can handle it. Once this works, you can start fiddling with more tricky
tasks.

Dora.

PS: By the way, you are asking for free help. In this case, NEVER say it is urgent!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top