Go Down

Topic: Problem connecting Arduino Uno R3 to SIM900 GPRS/GSM shield and sending an SMS (Read 3710 times) previous topic - next topic

Far27

Thanks dannable for all your support and lucid explanations and illustrations. I have tried to use the  connection based on the image you posted, but it did not work for me. I did not get any response when I typed in AT into my Serial Monitor.

The IDE I am using is ARDUINO 1.8.4 from https://www.arduino.cc/en/Main/Software, and I got word from the shop where I bought the hardware at https://www.hub360.com.ng, here in Nigeria to use ARDUINO 1.6.5, and I uninstalled the 1.8.4 and installed 1.6.5, and when I tried I got an OK from my Serial Monitor.

I have resolved the problem I am having and I say "thank you so much dannable and lastchancename, you guys are a blessing to this forum and because of your speedy response I will like to stick around this community much longer than I thought, I love you guys".


lastchancename

Thanks for the 'thanks'...  Dannable did the hard work, i just pushed in one possible direction!
Your learning experience is very standard, so don't despair.
Break every project into its separate parts, otherwise you can rarely find issues hidden by other issues !
Keep us up to date on your progress.
Q: How many searches did you make before posting this question?      A: none
At the very least, take a guess at the solution, then we can help move forward from what you know already.

Far27

You guys are the best. I have edited the title line so other can know that it has been solved. I read through how to use this forum before I attempted making a post.

I am from Nigeria and now I believe in the true power of the open source community. You all are a blessing to our generation.

Thanks

dannable

In turn all I did was prove that it should work, meaning that the problem area had been narrowed down. Faulty connections, or in this case version of the IDE, all things that aren't immediately obvious.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Far27

Thanks for making your shoulder available for me to sit on so that I can see further into the Automation Land of Arduino.

In the diagram below, can I use female - female jumper wires to connect the 'SWserial' position on the SIM900 board in place of those connectors you have there? Because I have removed one of them and I cannot find it now. I have two SIM900 shields for now so I am using one of them and will like to use the other when I am through with the project I have in mind.

dannable

Yes, there's no problem with doing that, other than additional clutter!
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Far27

Please in your years of using SIM900 and other shields have you encountered any IDE related problem? What are the pros and cons of using New Release of an IDE vs Older Versions? Is there anywhere I can get information about IDE compatibility with shields and boards? 

dannable

I still use an ancient version of the IDE but it works. When it stops working I'll upgrade.

As for your question about differences in the different IDEs, I would ask that further up the board. Try Installation and Troubleshooting, if it's wrong a Moderator will move it.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

leonhardo

Hello
I hope I can help I was working with the SIM900 and the GPS Neo-6M I have already make calls send messages what I need is to transmit data to the web using the GPRS of which I intend to do is to obtain the coordinates with the GPS and by means of the SIM900 send the information obtained to the web.

I leave my code.

#include <TinyGPS.h>
#include <SoftwareSerial.h>

TinyGPS gps;
SoftwareSerial GPS(4, 3);
SoftwareSerial SIM(7, 8);

static void smartdelay(unsigned long ms);
static void print_float(float val, float invalid, int len, int prec);
const int conectar = 2;
const int led = 13;
int conectando = 0;

void setup() {
  Serial.begin(9600);
  SIM.begin(9600);
  GPS.begin(9600);
  pinMode(led, OUTPUT);
  pinMode(conectar, INPUT);
}


void loop() {
  float latitud, longitud;
  gps.f_get_position(&latitud, &longitud);
  Serial.println("Latitud    Longitud  ");
  print_float(latitud, TinyGPS::GPS_INVALID_F_ANGLE, 11, 6);
  print_float(longitud, TinyGPS::GPS_INVALID_F_ANGLE, 11, 6);
 conectando = digitalRead(conectar);
  if (conectando == 0) {
    digitalWrite(led, 0);
    delay(2000);
    SIM.print("AT+CGATT");
    SIM.print("AT+CGDCONT=1,\"IP\",\"internet.itelcel.com\"");// Establece parametros PDP
    SIM.print((char)13);
    delay(2000);
    SIM.print("AT+CSTT=\"internet.itelcel.com\",\"webgprs\",\"webgprs2003\""); //Seteo de APN usuario y password
    SIM.print((char)13);
    delay(2000);
    SIM.print("AT+CIICR");// Inicia la conexión
    SIM.print((char)13);
    delay(20000);
    SIM.print("AT+CIFSR");
    SIM.print((char)13);
    delay(2000);
    SIM.print("AT+CIPSTART=\"TCP\",\"ubicatek.hol\",\"80\"");// Inicia conexion TCP o UDP
    Serial.println("conexion realizada");
    SIM.print((char)13);
    SIM.print((char)10);
    delay(5000);
    SIM.print("AT+CIPSEND");// Envias Datos TCP o UDP
    SIM.print((char)13);
    SIM.print((char)10);
    Serial.println("conexion para enviar");
    delay(2000);
    SIM.print("GET /home.php HTTP/1.1");// //Archivo donde se enviara el dato y el parametro a enviar
    SIM.print("latitud=");
    SIM.print(latitud, TinyGPS::GPS_INVALID_F_ANGLE);
    SIM.print("&longitud=");
    SIM.print(longitud, TinyGPS::GPS_INVALID_F_ANGLE);
    Serial.println("Datos Enviados");
    SIM.print((char)13);
    SIM.print((char)10);
    SIM.print("Host: ubicatek.hol.es");//
    SIM.print((char)13);
    SIM.print((char)10);
    SIM.print((char)10);
    SIM.print((char)13);
    SIM.print((char)10);
    SIM.print((char)26);
    delay(10000);
    SIM.print("AT+CIPCLOSE");// Cierra la conexión TCP o UDP
    SIM.print((char)13);
    delay(2000);
    SIM.print("AT+CIPSHUT"); //Cierra el contesto PDP de GPRS
    SIM.print((char)13);
    delay(2000);
    smartdelay(10000);
  }

  digitalWrite(led, 1);

}

thank your support

Go Up