0

I have been browsing the internet for about 3 hours now, it appears other people have had the same problem but I can't find a solution for it.

Basically yesterday I received my first GSM module and I was playing around with some AT commands in the serial monitor and it was working absolutely fine, today I'm getting nothing.

It's not related to the module though, even the basic SoftwareSerial example doesnt work now. All that's printed is "Goodnight moon!" and it never prints "Hello, world?". It's like it's not able start the serial communication or something.

Any help would be much appreciated!

 #include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Native USB only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
  • 3
    Where do you expect to see "Hello world"? It's being sent to your GSM module, so how can you possibly see it on serial? – Majenko Jan 1 at 17:42
  • @Majenko it was probably echoed back in command mode, buffered and sent back in the main loop. But the question isn't clear, user1796225 even though that didn't work did you try pressing enter a few times and typing "ATI" or a similar command to see if you get something back? – PeterJ Jan 4 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.