Im using an arduino uno and a sim 900, the simcard is setup and working as I can make a phone call to it and it rings.

The sim 900 is powered via the power jack and the uno is currently powered using USB.

I am trying to print out incoming text messages however with serial monitor open I only see "Initialising...".

    #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()
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)

  //Begin serial communication with Arduino and SIM900


  mySerial.println("AT"); //Handshaking with SIM900

  mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
  mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled

void loop()

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

enter image description here

I cant for the life of me figure out why its not printing anything else out? Can anyone give me any guidance or what to check?


1 Answer 1


The 'Initializing' printout happens because that is sent directly to the UNO's hardware serial port. The rest doesn't happen because it is directed to the SIM card via SoftwareSerial pins 7 & 8, and the SIM card apparently isn't responding.

Cut the problem in half: Connect pins 7 & 8 together, and run your program again. If you get "AT" and the rest, then you know the 'MySerial' port is active and working correctly, and the problem is in the SIM 'half'. Maybe you have an incorrect wire connection there, or maybe the SIM card's default serial rate isn't 9600, or something like that. YMMV ;-).

As a test, I ran your program on a UNO, with a jumper wire between pins 7 & 8. Unfortunately this did not work, but now I knew that the problem had nothing to do with the SIM shield. The result wasn't what I expected, but now I had 'cut the problem in half'.

Now that I had determined that the SIM card wasn't a factor (so far, anyway), I could concentrate on the 'UNO half'. After some web research I found that 'Software Serial' doesn't support 'loopback' (looping the transmit line back into the receive line) because it cannot simultaneously transmit and receive. Fortunately, the 'AltSoftSerial' library by Paul Stoffregen does support simultaneous transmit & receive, and so will support loopback.

So, I installed the library on my Arduino setup, and compiled and uploaded the example shown below.

#include <AltSoftSerial.h>

// AltSoftSerial always uses these pins:
// Board          Transmit  Receive   PWM Unusable
// -----          --------  -------   ------------
// Teensy 3.0 & 3.1  21        20         22
// Teensy 2.0         9        10       (none)
// Teensy++ 2.0      25         4       26, 27
// Arduino Uno        9         8         10
// Arduino Leonardo   5        13       (none)
// Arduino Mega      46        48       44, 45
// Wiring-S           5         6          4
// Sanguino          13        14         12

AltSoftSerial altSerial;

void setup() {
    //while (!Serial); // wait for Arduino Serial Monitor to open
    Serial.println("AltSoftSerial Test Begin");
    altSerial.println("Hello World");

void loop() {
    char c;

    if (Serial.available()) {
        c = Serial.read();
    if (altSerial.available()) {
        c = altSerial.read();

After uploading the code, I 'looped' pin 9 back to pin 8, and found that when I sent characters to the UNO via the hardware USB port, they showed up again 'echoed' to the serial output after having traversed the AltSoftSerial port 8/9.

So at this point I have solved the UNO 'half' of the problem; the rest is up to you! ;-)

  • or maybe they wired the SoftwareSerial to pins 6 and 7 on the shield and not to RX and TX
    – Juraj
    Jul 17, 2019 at 17:13
  • Or a thousand other possibilities. I'm not familiar with the SIM shield, so hard for me to say....
    – starship15
    Jul 17, 2019 at 23:10
  • then why did you write an answer?
    – Juraj
    Jul 18, 2019 at 4:56
  • Thanks for you answer, I did come across the software serial not being fully supported however I'm quite a newbie to arduinos. I've moved towards using a different shield for my project but I will try again using your very helpful answer.
    – nathans
    Jul 18, 2019 at 15:51
  • Glad to help, and I hope you continue to enjoy your adventures in Arduino-land. If you have the time, please mark my answer as 'Accepted', as (I think) that will improve my 'reputation' score and let me help others as well.
    – starship15
    Jul 18, 2019 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.