Pages: [1]   Go Down
Author Topic: Communication problem with GSM/GPRS-shield  (Read 1158 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I am intending on creating an SMS LCD display, the components i have chosen are the Arduino Mega 2560, in conjunction with the Antrax GSM/GPRS shield (w/o GPS) the details and manual are shown below:

 http://www.antrax.de/site/Online-Shop/Home/Arduino-Components/GSM-GPRS-GPS-Shield::51.html

Through following the step by step procedure explained in the manual i set up the device and ran the example code with the relevant changes made (inputting SIM pin and destination-phone number in " ") .  (Example code below)

Code:
GSM gsm(7,9600);                                                                 // (power_pin, baudrate)
GPS gps(9600);                                                                   // (baudrate)

void setup()
{
  if(gps.initializeGPS())
    Serial.println("Initialization completed");
  else
    Serial.println("Initialization can't completed");
   
  Serial.begin(9600);
}

void loop()
{
  gps.getGPS();
  Serial.print(gps.coordinates);
 
  // GPS-LED
  if(gps.coordinates[0] == 'n')
  {
    delay(20);
    gps.setLED(1);
    delay(20); 
    gps.setLED(0);
    delay(20);
    gps.setLED(1);
    delay(20); 
    gps.setLED(0);
  }
  else
  {
    delay(300);
    gps.setLED(1);
    delay(500); 
    gps.setLED(0);
  }
 
  if(!gps.checkS1())                 
  {
    gsm.initializeGSM("1234");                                          // Enter your SIM-Pin if it's required (Example: "1234") --> the quote signs are important
    delay(200);
    gsm.makeCall("0176123456789");                                      // Enter the Destination-Phone-Number (Example: "0176123456789" or "+49176123456789") --> the quote signs are important
  }
  if(!gps.checkS2())                 
  {
    gsm.initializeGSM("1234");                                          // Enter your SIM-Pin if it's required (Example: "1234") --> the quote signs are important
    delay(200);
    gsm.sendSMS("0176123456789",gps.coordinates);                       // Enter the Destination-Phone-Number (Example: "0176123456789" or "+49176123456789") --> the quote signs are important
  }
}


The LED's didn't lite up nor did the device properly initialize. I then came to realize this example code is just for the GPS enabled version of the device which i do not have, and no such example code let alone start up instructions are available for mine. I then reworked the code to test the LED's to ensure the functionality of the device and initialize the GSM functionality ( uses Telit GE865);

Code:

GSM gsm(7,9600);                                                                 // (power_pin, baudrate)
GPS gps(9600);                                                                   // (baudrate)

void setup()
{

  if(gps.initializeGPS())
    Serial.println("Initialization completed");
  else
    Serial.println("Initialization can't completed");
   


}

void loop()
{
    Serial.println("test print...");
gps.setLED(1);
    delay(500);
    gps.setLED(0);
    delay(500);
   
  if(!gps.checkS2())                 
  {
    Serial.println("check 1 print...");
    gsm.initializeGSM("1210");
    delay(200);
           Serial.println("GSM initialized...");
    gsm.sendSMS("07535267131","123456");                       // Enter the Destination-Phone-Number (Example: "0176123456789" or "+49176123456789") --> the quote signs are important


  }

}

When running the code the LED's do turn on, but it never Initializes the GSM (gsm.initializeGSM("1210") line onward...). The more playing around i did i found i could not get any response whatsoever from the Telit GE865 in establishing a GSM network. I downloaded the GSM libraries from HW kitchen in attempt to make communication. I ran the AT commands test and that did not work either.

I just downloaded the GSM libraries from HW kitchen and i will play around with it some more and, as if you cant tell already, need to read more on the subject as i am not that experienced. Could someone please give me some insight on how to resolve this issue or share links/examples on initializing and communication through the GSM to a Telit GE865, and the subsequent SIM card attached.

Thanks a bunch for your attention, and would greatly appreciate any help or insight smiley

P.S. some smaller details that might weave out initial considerations, i have indeed connected it to a power supply to ensure that the device has enough power to communicate via GSM. The SIM card inserted to the shield has been activated, I have also used Termite software to input SELINT 2 AT commands which wont even show up after i hit enter in the compiler so not sure whats going on with that. (not sending to device at all?).


Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 636
Posts: 50276
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
in conjunction with the Antrax GSM/GPRS shield (w/o GPS)
So, why are you creating an instance of GPS? What IS GPS? What is GSM?

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im not intending to, the only example code provided by the manufacturer is meant for setting up the GPS. I tried to go in and attempt to alter the code for GSM initialization. So to put it broadly, i just want to get a response from the telit GE865 and initialize the shield to recieve texts.

I realize GSM and GPS are two different protocols, and i have no desire to obtain coordinates or other GPS related functions.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 636
Posts: 50276
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I realize GSM and GPS are two different protocols, and i have no desire to obtain coordinates or other GPS related functions.
Then get rid of the GPS library, the GPS instance, and everything that deals with the instance.
Logged

Offline Offline
Full Member
***
Karma: 4
Posts: 187
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
#include <GSM_GPS_Shield.h>

int switch_gsm;
int switch_gps;
int i;
int led_mode = 0;

GSM gsm(7,9600);                                                                // (power_pin, baudrate)
GPS gps(7,9600);                                                                // (power_pin, baudrate)

void setup()
{
  Serial.begin(9600);
 
  pinMode(54, INPUT);                                                           // GSM-Button
  pinMode(55, INPUT);                                                           // GPS-Button
  pinMode(9, OUTPUT);                                                           // LED-GPS

  digitalWrite(54, HIGH);
  digitalWrite(55, HIGH);
}

void loop()
{
  gps.getGPS();
 
  Serial.println(gps.coordinates);
 
  for(i = 0; i < 80; i++)                                                       // check GPS-Coordinates
  {
    if(gps.gps_data[i] == 'N')
    {
      led_mode = 1;
    }
  }
 
  if(led_mode == 1)
  {
    delay(300);
    digitalWrite(9, HIGH);
    delay(500);
    digitalWrite(9, LOW);
  }
  else
  {
    delay(20);
    digitalWrite(9, HIGH);
    delay(20);
    digitalWrite(9, LOW);
    delay(20);
    digitalWrite(9, HIGH);
    delay(20);
    digitalWrite(9, LOW);
  }

  switch_gsm = digitalRead(54);                                                 // Read status of the switch_gsm
  switch_gps = digitalRead(55);                                                 // Read status of the switch_gps

  if(switch_gsm == 0)                 
  {
    gsm.initializeGSM("1210");                                          // Enter your SIM-Pin if it's required
    delay(200);
    gsm.makeCall("07535267131");                             // Enter the Destination-Phone-Number
  }
  else               
  {
    gsm.initializeGSM("1210");                                          // Enter your SIM-Pin if it's required
    delay(200);
    gsm.sendSMS("07535267131","Hello");              // Enter the Destination-Phone-Number
  }
}

Use this code because i find some mistake in your code and please verify you pin connections according tohttp://www.antrax.de/downloads/arduino-gsm-gprs-gps-shield-mega2560-rework_en.pdf
Logged

From Idea To Invention

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

^^ Thanks for the upload il try it later, but i notice that still relates to GPS so not sure if it will work.

I understand i need to get rid of the GPS instance, but i dont have any examples that are strictly GSM related (with regards to this shield), I am also unsure that the GSM libraries i uploaded from HW kitchen are compatible with this specific shield as the AT command test/example did not seem to work, this is all conjecture at the moment since i haven't played around with it properly since i posted this topic.

Is there anybody that has experience with this specific shield? It doesn't seem to have much popularity and I am starting to regret the purchase, I am getting 0% feedback from the manufacturer and i must have sent 4 emails in the past couple of weeks....

Appreciate the feedback so far
Logged

Offline Offline
Full Member
***
Karma: 4
Posts: 187
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Follow reply#4
may solve your problem
Logged

From Idea To Invention

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, so have been corresponding with manufacturer and still no luck.

They recommended using an external antenna kept a set distance from the board to avoid interference, so i have done so. In addition they say the HW kitchen GSM libraries will not be compatible with the board. Urgh did not think it would be so bothersome to initialize the GSM.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quick update,

Managed to Initialize GSM, and shield can now send texts and make calls. Now I am onto making it receive text messages so i can start playing with my display, any advice or examples on the matter would be appreciated as always. Code below;

Code:
/*
Using_GSM_and_GPS.pde - Example for using the GSM Modul Rev.6 (without GPS)
Included Functions
Version:     1.3.3
Date:        20.11.2012
Company:     antrax Datentechnik GmbH
Uses with:   Arduino Mega 2560 (ATmega2560)
*/

#if defined(ARDUINO) && ARDUINO >= 100
  // Choose Arduino.h for IDE 1.0
  #include "Arduino.h"
#else
  // Choose WProgram.h if IDE is older than 1.0
  #include "WProgram.h"
#endif
#include <GSM_GPS_Shield_Mega.h>
#include <SPI.h>

GSM gsm(7,9600);                                                                 // (power_pin, baudrate)
GPS gps(9600);                                                                   // (baudrate)

void setup()
{
  if(gps.initializeGPS())
    Serial.println("Initialization completed");
  else
    Serial.println("Initialization can't completed");
}

void loop()
{
  delay(300);
  gps.setLED(1);
  delay(500); 
  gps.setLED(0);
 
  if(!gps.checkS1())                 
  {
    gsm.initializeGSM("xxxx");                                          // Enter your SIM-Pin if it's required (Example: "1234") --> the quote signs are important
    delay(200);
    gsm.makeCall("07xxxxxxxxx");                                      // Enter the Destination-Phone-Number (Example: "0176123456789" or "+49176123456789") --> the quote signs are important
  }
  if(!gps.checkS2())                 
  {
    gsm.initializeGSM("xxxx");                                          // Enter your SIM-Pin if it's required (Example: "1234") --> the quote signs are important
    delay(200);
    gsm.sendSMS("07xxxxxxxxx","\Hello World");                         // Enter the Destination-Phone-Number (Example: "0176123456789" or "+49176123456789") --> the quote signs are important
  }
}
Logged

Pages: [1]   Go Up
Jump to: