Arduino IDE serial Monitor shows incomprehensible square characters

Hi

I connected a sim800L module to Arduino Uno

When I enter the serial monitor section in Arduino IDE, I see incomprehensible square characters like the picture below

I have Windows 11

The Arduino IDE is also the latest version and all drivers are installed

Please help me solve the problem

Welcome! Please take the time to thoroughly read:

and then fix your first post - the code needs to be in code tags; do not ever post images/screen caps of code, they’re often unintelligible, cannot be copied over to the IDE for code inspection/renovation, etc.

My suspicion is, you don’t have

Serial.begin(9600); 


in setup anywhere, though I can’t tell from the image as it’s incomplete.

Either that or the actual baud rate doesn't match the baud rate in setup.

Edited– I zoomed in on the picture. It does look like there might be a

Serial.begin (9600)

in setup. If there is a setup. And it looks like the serial monitor matches.

Often but not every time, for the very first read, I get those 4 squares on the first line and then it starts reading correctly. But yours is on the 2nd line. For what it’s worth my serial monitor is set on “New Line”, not “Both NL & CR”. I am not sure what the difference is.

What happens if you close the serial monitor, run the program, and while it is running you open the serial monitor?

This is my code :

#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+CSQ");    //Signal quality test, value range is 0-31 , 31 is the best
  updateSerial();
  mySerial.println("AT+CCID");   //Read SIM information to confirm whether the SIM is plugged
  updateSerial();
  mySerial.println("AT+CREG?");  //Check whether it has registered in the network
  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
  }
}

when I close it and open serial monitor while its running , same problem happened
even when write AT commands of Sim800L , the output in serial monitor give me "â–ˇ" character.

Try doing a Serial.print instead of a Serial.write

It seems that your Sim800 modem uses a different than 9600 baud rate.

I type "print" insted of "write"
but nothing cnhanges

even use different bandrate , and still have the same problem

I type "print" insted of "write"

Are you sure you have the correct sketch uploaded because I see characters being printed before "Initializing..." but your code does not print before that statement

@heydari_keyvan

At this point, I think it’s time you showed us how you have it wired. Something is wrong.

There is an explanation for that in the sim800_series_at_command_manual_v1.01.

SIM800 Note

heydari_keyvan, have you tried 115200 baud?

hi
yes
I almost tryed every baud rates exists it that list.
after every command I type in serial monitor, some square character will be added.

Could this problem be due to using the latest version of Windows 11?

It's unlikely that this will solve the problem, because the OP uses a SoftSerial that doesn't work at that speed

That does not explain how his code can print to the serial monitor without a print statement

This is why I asked about wiring - I strongly suspect they’ve crosswired Serial and myserial pins, or something similar

Or possibly the latest version of the IDE.

Are you using the code you show in post #4 or something different now?

Are you using an Arduino R3 Uno?

That code seems to come from lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/.
I find that their tutorials are generally very good.

I Exactly using that code and thats come from this Page :

In-Depth: Send Receive SMS & Call with SIM800L GSM Module & Arduino

I using the last version of IDE and Windows
wiring checked several times

I using simple voltage divider made of 2 resistors to safely reduces the 5V signal from the Arduino to about 3.3V for SIM800L module

This guy had the same problem a few months ago. It's clear from the pictures that he was using Windows 7:

Serial monitor shows squares - Projects / Networking, Protocols, and Devices - Arduino Forum

I have two SIM800L modules and both of them acts like that in serial monitor.
each command I type , one squre will be add to the line.

Try resetting the Sim800 via the RST pin before you start the Uno program.
Connect a wire to RST and just ground it for a second.