AT commands not showing in serial monitor

#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and SIM800L
  mySerial.begin(9600);

  Serial.println("Initializing..."); 
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();
  
  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  updateSerial();
  mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}

ı use arduino nano and sim 800l
serial monitor just
"" Initializing... ""

Help, Thanks.

Your post was MOVED to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

A line like above does not send data to Serial; if you want to see it on the Serial Monitor as well, you need to add a Serial.print / Serial.println() after it.

1 Like

I'm trying here. working code but serial monitor is not the same for me. I'm not getting any messages.

That is a good tutorial to be using.

Are you certain that you have cross connected module Tx to Arduino soft serial Rx and module Rx to Arduino soft serial Tx and are using the voltage divider on the Arduino Tx to module Rx?

The software serial constructor is referenced to the Arduino pins. What module pin is connected to Arduino pin3 and what module pin is connected to Arduino pin 2?

//SoftwareSerial mySerial (rxPin, txPin);
SoftwareSerial mySerial(3, 2); //Arduino Rx, Arduino Tx
1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.