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.

receive sms on SIM300 using arduino uno.

Status
Not open for further replies.

project_quest

Newbie level 3
Newbie level 3
Joined
Aug 31, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
22
Hey Everyone,
I'm working on sending and receiving texts on SIM300 interfacing it with an arduino uno.The sending bit and the subsequent display on an LCD screen has been performed sucessfully.However,I'm facing issues with the receiving bit while communicating with the GSM modem using an arduino. Meaning,I'm able to read the received texts by typing in AT commands on the hyperTermminal window but not so on the serial monitor.On the serial monitor i see a meaningless display of numbers and symbols.
My code and screen shots of my serial monitor window for receiving sms onto the SIM300 are enclosed here.
Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9,10); 
char incomingByte=0; 
void setup() 
{
       Serial.begin(9600);  
      mySerial.begin(9600);   
      pinMode(13, OUTPUT); 
      mySerial.println("AT");
      delay(2000);
      mySerial.println("AT+CMGF=1");
      delay(2000);  
      mySerial.println("AT+CSMP=17,167,0,0");
      //mySerial.println("AT+CNMI=3,3,0,0"); 
      delay(2000);
     
     }

void loop()

{   
mySerial.write("AT+CMGL=");
mySerial.write(34);
mySerial.write("ALL");
mySerial.write(34);
mySerial.write(13);
mySerial.write(10);


        while (mySerial.available() > 0) 
        {       
               incomingByte = mySerial.read();
               if(incomingByte!='/n')
               {
               Serial.print(incomingByte);
               }
               
               if(incomingByte=='/n')
               {
                 Serial.println(incomingByte);
               }
         
      

        }
}

Screenshot (9).png


Please help! :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top