SIM900 module program problem

Hello.

I would like to test the GSM SIM900 module as part of my internship project.

Here is the tutorial I followed:

https://lastminuteengineers.com/two-channel-relay-module-arduino-tutorial/

To help me, my internship supervisor sent me the same module, as well as a free brand SIM card, and he told me that he had already activated it on the site.

I then placed it in the SIM card holder, then I turned the SIM900 up / down programmatically by making its connections with an Arduino UNO.

Then, I wanted to test the "Arduino Code - Testing AT Commands" program from the tutorial in question.

Here then is my current program.

#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM900
SoftwareSerial mySerial(7, 8); //SIM900 Tx & Rx is connected to Arduino #7 & #8

void setup()
{
  SIM900power();//activation de la carte SIM
  
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and SIM900
  mySerial.begin(9600);

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

  mySerial.println("AT"); //Handshaking with SIM900
  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
  }
}

void SIM900power()// permet d'activer la carte SIM insérée à l'arrière du module.
{
  Serial.print("lolo");
  pinMode(9, OUTPUT); 
  digitalWrite(9,LOW);
  delay(1000);
  digitalWrite(9,HIGH);
  delay(2000);
  digitalWrite(9,LOW);
  delay(3000);
}

Normally, this is what the serial monitor should show me when uploading the program to my Arduino board.

image

So, I test the program in question with the module LED D6 blinking.

However, when I open the serial monitor, I only get the word "Initializating ..." and nothing more.

I think the problem should come from the SoftwareSerial library, but it is possible that I have incorrectly activated the SIM card with its default PIN code.

I would then like to know if the problem is related to the program or to the activation of my SIM card.

Could someone help me please ?! It's urgent...

Thank you in advance.

Are you sure that the baud rate for the SIM900 module is right? Usually you would use 19200 and not 9600..

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