SIM800L : Not registering to network issue Solved

I've been working with SIM800L GSM module for quite a while now and all I faced was one problem after another.
So I googled and got help from several sites but there wasn't any organized information which would help beginners. That's I thought I would write about my findings and organize them in a single thread.

Here goes:

SIM800L Blinking LED Meaning:

  • **Blink every 1s:**The module is running but hasn’t made connection to the cellular network yet.
  • **Blink every 2s:**The GPRS data connection you requested is active.
  • **Blink every 3s:**The module has made contact with the cellular network & can send/receive voice and SMS.

This website here has a pretty good beginner friendly description to get you up and running: In-Depth: Send Receive SMS & Call with SIM800L GSM Module & Arduino

Also, be very careful about this:

You should be very careful to not to disconnect the GND before the VCC and always connect GND before VCC. Otherwise, the module can use the low voltage serial pins as ground and can get destroyed instantly.

Anyway, most of the problem you'll face will be due to insufficient current supply so make sure you provide power from a source that is capable of supplying 2A current when needed.
Also, keep the supply voltage under 4.1V.

Basic Connection:

SIM800L Arduino UNo
GND -----> GND
VCC -----> 5V(Arduino)
P.N - Use a capacitor between the GND and VCC pin of SIM800L and keep it as close as possible to the
module. I connected the capacitor first with GND and VCC then from there made a connection with the
source. Also, keep the wires short really short.

Tx -----> Rx
RST -----> 3.3v
Rx -----> Tx (Must use VD to drop the voltage. As we know, Arduino Uno gives 5V output whereas
the module works best with 2.8v not even 3.3v. So be sure to drop it to 2.8V)

Code Guide: I found this really helpful

#include <SoftwareSerial.h>

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

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+CFUN = 0");
  updateSerial();
  delay(5000);
  mySerial.println("AT+CFUN = 1");
  updateSerial();
  delay(1000);
  mySerial.println("AT+CREG?"); //Check whether it has registered in the network. (0,1) means registered
  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
  }
}