Mangesh 0 Posted April 2, 2017 Share Posted April 2, 2017 I am using energia msp430 and gsm900a module. I want to send and receive sms & send sms from msp430 to and gsm900a to any mobile number is working fine but at time of receiving sms in serial monitor of energia is not showing any responses from to incoming msg . I am attaching my code also #include<msp430.h> void setup() { Serial.begin(9600); // Setting the baud rate of GSM Module // Serial.begin(4800); // Setting the baud rate of Serial Monitor (Arduino) delay(1000); } void loop() { if (Serial.available()>0) switch(Serial.read()) { case 's': sendsms(); break; case 'r': RecieveMessage(); break; } if (Serial.available()>0) Serial.write(Serial.read()); } void sendsms() { Serial.println("AT\r"); delay(1000); Serial.println("AT+CMGF = 1\r"); delay(1000); //Serial.println(" AT+CMGS =\"XXXXXXXXXX\"\r"); delay(1000); Serial.println("HELLO WORLD"); delay(1000); Serial.println((char)26); delay(100); } void RecieveMessage() { Serial.println("AT+CMGF = 1\r"); delay(1000); Serial.println("AT+CNMI=2,3,0,0,0\r"); // AT Command to receive a live SMS delay(1000); } Quote Link to post Share on other sites
B@tto 51 Posted April 3, 2017 Share Posted April 3, 2017 Hi, How do you know that the SIM900 send anything ? Apparently you are using the same port for SIM900 and debug so ... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.