I'm trying to test AT commands (I am working with an Arduino Uno and a GSM/GPRS SIM900 shield; my system is ubuntu 14.10) . Yesterday when I was testing , all ran well.. For example after typing AT+SAPBR=3,1,"APN","ooredoo" in the serial monitor it showed me OK.. but But now it shows me strange characters.
this is mys GSM/GPRS SIM900
This is my code
#include <SoftwareSerial.h>
SoftwareSerial GPRS(2,3);
void setup() {
// put your setup code here, to run once:
GPRS.begin(9600);
Serial.begin(9600);
Serial.write("start");
}
void loop() {
// put your main code here, to run repeatedly:
while(GPRS.available())
Serial.write(GPRS.read());
while(Serial.available())
GPRS.write(Serial.read());
}
And this it is the result of AT+SAPBR=3,1,"APN","ooredoo" typed in the serial monitor(see below :attachment)
try changing the software serial setup to the following in your code:
Given that "Yesterday when I was testing , all ran well.", it seem highly unlikely that changing the pins is somehow magically going to help.
OP: I suspect that you changed the baud rate that the device is communicating at, and have not changed the code to reflect the new baud rate. "Yesterday when I was testing..." tells us nothing about what you did.
thank to reply... i understand what you are saying...the led of NET always blink after 3 seconds normally...i don't change the connection pin on the Shield or code source...the only thing i did is to reset Arduino Uno board While it was connected to the Shield . the baud on serial monitor has always been 9600 ...i supect that the communication between ARDUINO UNO and my GSM/GPSR Shield Does not go well...if i change SoftwareSerial GPRS(2, 3); nothing will work..