Arduino UNO & SIM900 -AT communicaton problem

Hi there

Ive run into a problem with my GSM setup, im not able to communicate with the GSM SIM900 chip via AT commands..
i think it has to do with the pin assignment... mabe.. or (the software serial?)

I have the arduino UNO, and the GSM shield from EFCom
http://www.elecfreaks.com/wiki/index.php?title=EFCom_GPRS/GSM_Shield

All works out until i should try the communication via the serial port. Its just no respons..

I use arduino 1.0, upload the example code in the link above, turning the SIM900 on with the pushbutton, it has connection to the operator (indicated by the short flash every 3 second) and it seems fine.. im just not able to send AT commands, and it seems like im not getting anything back to the computer either...

I see that it is default 19200 8N1, i try to send commands in Serial monitor in Arduino 1.0, and SSCOM3.2 (linked from page above)..
what confuses me is what pins i should use and serial speed.

Here in the blockdiagram (in page liked above) it says 115200 and it says pin PD7 and PD0
http://www.elecfreaks.com/wiki/index.php?title=File:Wireless-EFCom-18.jpg

under Section '6', the say i should use PD2 and PD3

ATmega328P that would emulate a second serial port (UART) using software on the digital pins D2 and D3

In the programcode under Section '8' it says 19200 and pin 7 and 8, should be used.

SoftwareSerial mySerial(7, 8);
 
void setup()
{
  mySerial.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);                 // the GPRS baud rate   
}

And then you have the jumpers what you can play around with on top of the EFCom GSM shield, D0 - D3..
Where the jumpers are default on D2 and D3..

(and here is the schematics of the Shield v1.2, http://elecfreaks.com/store/download/datasheet/wireless/EFcom_v1.2.pdf )

im just a little bit lost and confused here, how to make it work?
have anybody managed this ?...

SOLVED:

wow i just soved it myself :wink: havent you noticed also that you could get stuck for long time, but just after you ask the question you find the answer yourself...

I just needed to change the pin in the program code for the arduino 1.0 to PIN2 and PIN3,
as showed under 8)

(now i need to try to do the next step, to send a complete sms from the arduino..)

hope this will help others who get into the same problem :slight_smile:

//Serial Relay - Arduino will patch a 
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART 
 
#include <SoftwareSerial.h>
 
SoftwareSerial mySerial(2, 3);
 
void setup()
{
  mySerial.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);                 // the GPRS baud rate   
}
 
void loop()
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());  
 
}

Hello! I have managed to make my working to on a Arduino UNO but when I tried the same code ( the one posted on 09, 2012, 12:28:25) on a Arduino Mega I get nothing. Could you please help? As you may notice I am new to Arduino. Thanks

but when I tried the same code ( the one posted on 09, 2012, 12:28:25) on a Arduino Mega I get nothing.

The code that uses SoftwareSerial on pins that it doesn't work on on a Mega? If that is the code you are referring to, why are you using SoftwareSerial on a board with 4 hardware serial ports?

Hi! What should I use? Thanks

Hello friends. My English is bad, I speak Spanish.
I have a arduino mega and shield efcom and v1.2, I can not make it work.
They know how to do?
thanks!!!

I have a arduino mega

We know what this is.

and shield efcom

We need a link to this.

and v1.2

Of what?

I can not make it work.

You need some code. If you have some, post it.

Hello!!
Thanks for the quick response.

I have this shield

http://www.elecfreaks.com/wiki/index.php?title=EFCom_GPRS/GSM_Shield

use this code in Arduino Mega

//Serial Relay - Arduino will patch a
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
}

void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());

}

and try to send AT commands, but the shield is not responding.

I do what the tutorial says, but nothing happens.

use this code in Arduino Mega

Why are you using SoftwareSerial on a device with 4 hardware serial ports?

Why are you trying to use SoftwareSerial on pins that do not support Pin Change Interrupts?

sorry my ignorance, I'm not very skilled at this, and should do to make it work?

sorry my ignorance, I'm not very skilled at this, and should do to make it work?

Get rid of SoftwareSerial. Connect the device to one of the hardware serial ports, and use SerialN (where N is 1, 2, or 3), instead of mySerial.

hi ,
i did like you said I think should it look like that ?
becouse it's not working ..
#include <SoftwareSerial.h>

Serial N (1, 2);

void setup()
{
mySerial.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
}

void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());

igor123, that doesn't even compile, and even if it did, using half the hardware serial hardware for your software serial is not sensible.

Get rid of SoftwareSerial.

You didn't.

Connect the device to one of the hardware serial ports

Which one did you connect the device to?

and use SerialN (where N is 1, 2, or 3), instead of mySerial.

Was this too hard to understand? Use Serial1, Serial2, or Serial3 (whichever one you connected the device to), instead of mySerial. Is that easier to understand?

Hi there

I do actually have a very similar problem, that I haven't found the solution yet.
I'm trying to control a SIM900 mounted on a Efcom Pro (http://www.elecfreaks.com/wiki/index.php?title=EFCom_Pro_GPRS/GSM_Module) with my UNO. I sticked to the tutorial on said wiki and ended up with the following code (arduino 1.0.3):

#include <SoftwareSerial.h>
 
SoftwareSerial mySerial(2, 3);
 
void setup()
{
  mySerial.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);                 // the GPRS baud rate   
}
 
void loop()
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());  
 
}

Than hooked up the serial connection from the Efcom Pro to pins 2 and 3 and started my serial monitor and turned on the Efcom Pro. As expected the chip sent out some data upon turning on, but it looked like this: Ý Ý Ý Ý Ý Ý .

Trying to communicate with it through AT commands did nothing at all, no reply. I see from the blinking on the Efcom Pro, that it has registered with the network, but it's not reachable through the serial connection.

Any suggestions?

Gallentro:
Hi there

I do actually have a very similar problem, that I haven't found the solution yet.
I'm trying to control a SIM900 mounted on a Efcom Pro (http://www.elecfreaks.com/wiki/index.php?title=EFCom_Pro_GPRS/GSM_Module) with my UNO. I sticked to the tutorial on said wiki and ended up with the following code (arduino 1.0.3):

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
  mySerial.begin(19200);               // the GPRS baud rate   
  Serial.begin(19200);                 // the GPRS baud rate   
}

void loop()
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());

}




Than hooked up the serial connection from the Efcom Pro to pins 2 and 3 and started my serial monitor and turned on the Efcom Pro. As expected the chip sent out some data upon turning on, but it looked like this: Ý Ý Ý Ý Ý Ý .

Trying to communicate with it through AT commands did nothing at all, no reply. I see from the blinking on the Efcom Pro, that it has registered with the network, but it's not reachable through the serial connection.

Any suggestions?

I would look at the speed serial monitor of arduino ide.
que tambien este en 19200.

Thanks, I checked that. It is set to 19200. The thing is, when I change the setting the strange characters change to other strange characters or disappear at all, but are never any readable text.

are never any readable text.

...usually implies either a speed mismatch, or a line inversion.

However

but it looked like this: Ý Ý Ý Ý Ý Ý .

looks more like the -1 that a serial read rturns if there is no data to read.

AWOL:

are never any readable text.

...usually implies either a speed mismatch, or a line inversion.

I checked these speeds and matched them to the speed of the Efcom Pro (what it says in the product description... is there any way to check it?):

  • serial port (in Windows hardware manager)
  • serial monitor

Do I need to check in other places as well?

looks more like the -1 that a serial read rturns if there is no data to read.

The thing is, it sends this only when the chip is powered on, then it stops. So I interpret it as the "hello, i'm ready signal" of the chip...

The problem persists, anyone got an idea?

I read somewhere else, that a inversion of the high and low might be a problem --> a pullup resistor might do the trick. I haven't had time so far to check this out, does anyone think, that this might do the trick?