lingeshbarani / gsm-shield-arduino

Automatically exported from code.google.com/p/gsm-shield-arduino
0 stars 0 forks source link

Allow the sketch to define pins used to communicate with SoftwareSerial library #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Should allow the sketch to define pins used to communicate with SoftwareSerial 
library.

Must edit library to choose pins.

What version of the product are you using? On what operating system?
Arduino 1.0 on Win7 x32

Please provide any additional information below.
Proposal to change GSM.cpp from (not tested if works):
//#define _GSM_TXPIN_ 4
//#define _GSM_RXPIN_ 5

#define _GSM_TXPIN_ 2
#define _GSM_RXPIN_ 3   

to:
#ifndef _GSM_TXPIN_
  #define _GSM_TXPIN_ 2
#endif

#ifndef _GSM_RXPIN_
  #define _GSM_RXPIN_ 3
#endif

Should allow the sketch to use something like:
#define _GSM_TXPIN_ 7
#define _GSM_RXPIN_ 8
#include "SIM900.h"

Original issue reported on code.google.com by sjfaust...@gmail.com on 10 Dec 2011 at 1:06

GoogleCodeExporter commented 8 years ago
Thank you :) This can be very helpful. I'm going to add it.

Original comment by martines...@gmail.com on 27 Dec 2011 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by dmg...@gmail.com on 21 Jan 2012 at 4:49

GoogleCodeExporter commented 8 years ago

Original comment by dmg...@gmail.com on 21 Jan 2012 at 4:54

GoogleCodeExporter commented 8 years ago
I tried to use the sjfaustino's solution, but it doesn't work.

Original comment by martines...@gmail.com on 21 Jan 2012 at 5:03

GoogleCodeExporter commented 8 years ago
hey can u guys help me?
i have icomsat v1.0(sim900)..
and nothin seem to work for me.

can you please tell me where am i goin wrong?
i hv attachd my sketch.
i hv downloaded the same library from this site.

can you plz help me.

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 8:32

Attachments:

GoogleCodeExporter commented 8 years ago
and yes i have set my jumpers of the GSM as follows:

Tx - pin 4
Rx - pin 5

Just help me out with the library modification.
I am just banging my head against the wall ryt now.
Will be of great help...if noticed.

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 8:36

GoogleCodeExporter commented 8 years ago
I'm sorry but i don't know that kind of Shield, If the simple pin modifications 
doesn't work I don't know how to help you. The only think that I thinked is try 
simply to invert tx 5 and rx 4. Let me know if you solve the problem. I 
actually  suggest to you to think about to buy the open-electronics model, on 
which this library is based: 
http://store.open-electronics.org/Arduino_GSM_GPRS_shield

Original comment by martines...@gmail.com on 21 Jan 2012 at 9:06

GoogleCodeExporter commented 8 years ago
sim900 is same for any type of shield it uses. :)
So it should work for this shield too.
I am just facing the problem interfacing it with the pins allocation inside the 
library "GSM.cpp".
dont you think that we should set the rx tx pins on arduino to INPUT.
i mean e.g. pinMode(rx, INPUT)
what do u say???

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 9:40

GoogleCodeExporter commented 8 years ago
my shield is this :
http://arduinosolutions.com/download/SIM900/icomsat%20V1.0_DS.pdf

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 9:41

GoogleCodeExporter commented 8 years ago
The pin are set in the library. Try this:
Modify GSM.h de-comment #define DEBUG_ON, load the example sketch AT e post 
here the output ;)

Original comment by martines...@gmail.com on 21 Jan 2012 at 9:48

GoogleCodeExporter commented 8 years ago
hey bro...i tried searching "#define DEBUG_ON" but its not there in GSM.h
i downloaded the "GSM_Shield_GPRS_Ver_3_02_(IDE100)" version.

plz bear with me... :) u r of realy gr8 help..bro!

i ll send u the GSM.h with the attachment.
jus check it.

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 10:04

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Download 3.06 ver

Original comment by martines...@gmail.com on 21 Jan 2012 at 10:16

GoogleCodeExporter commented 8 years ago
hey i got this output:

GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE

so my tx rx pins are not set properly.
any ideas?

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 10:28

GoogleCodeExporter commented 8 years ago
Did you choose pin that support change interrupt? Maybe is that... Check on 
Arduino's page wihch are enabled to this function.

Original comment by martines...@gmail.com on 21 Jan 2012 at 10:39

GoogleCodeExporter commented 8 years ago
the pins are d2 or d3.
will that help??
hey listen..my shield came with a library which jus show errors on compilation.
it uses "NewSoftSerial.cpp" and "NewSoftSerial.h" classes.
not SoftwareSerial".

I will attach the library. See if you can get anything.
I guess I am Burdening you with much here....
itz ok..otherwise. :)

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 10:54

Attachments:

GoogleCodeExporter commented 8 years ago
heeeeeeeeeeeyyyyyyyyyyyyy
after few swaps of luck on d pins i got this:

status=READY

OK

RDY

+CFUN: 1

+CPIN: READY

bro..i guess i m gud to go..! :D
i told ryt..this will work on any sim900 :)

two steps:-
1. Goto GSM.cpp
   and uncomment: //#define _GSM_TXPIN_ 4
                  //#define _GSM_RXPIN_ 5
    and comment in: 
                    #define _GSM_TXPIN_ 2
                    #define _GSM_RXPIN_ 3
2.Set exact tx-rx pin as defined earlier on the shield jumpers.
  i.e. tx - pin 2
       rx - pin 3.

and you are done. :) 

Original comment by max.acti...@gmail.com on 21 Jan 2012 at 11:09

GoogleCodeExporter commented 8 years ago
;)

Original comment by martines...@gmail.com on 22 Jan 2012 at 11:34

GoogleCodeExporter commented 8 years ago
iconsat v1.0 with Arduino mega2560 only receive call and sms, but does not send 
sms.
What can be?
In my serial monitor:

AT

OK
AT

OK
AT

OK
AT

OK
AT

OK
ÿÿ
RDY

+CFUN: 1

+CPIN: READY
AT

OK

+PACSP: 1
AT

OK
AT

OK
AT

OK
AT

OK

Call Ready
AT

OK

RING

+CLIP: "02299664351",161,"",,"Raphael Barros",0
AT

OK
AT

OK
AT

OK
AT

OK

RING

+CLIP: "02299664351",161,"",,"Raphael Barros",0

NO CARRIER
AT

OK
AT

OK
AT

OK
AT

OK
AT

OK
AT+CMGS="2299664351"

> AT+CMGL="REC UNREAD",1

> AT+CMGL="REC UNREAD",1

> AT+CMGL="REC UNREAD",1

> AT+CMGL="REC UNREAD",1
.
.
.

Inconsat jummper D0 RX and D1 TX and only works if I use Serial1.begin (9600). 
If I use Serial.begin (9600) is just:

GSM Shield testing.
DB:NO RESP
DB:NO RESP
....

Can help me?

Original comment by rapha.ba...@gmail.com on 22 Mar 2012 at 4:05

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Raphael, next time open a new issue if it is not strictly linked to another 
one. However for the serial is strange what you're writing, check 
http://arduino.cc/en/Main/ArduinoBoardMega for arduino's pin.
In the example folder there is a sketch for sending SMS.
Marco

Original comment by martines...@gmail.com on 22 Mar 2012 at 5:07

GoogleCodeExporter commented 8 years ago
I'm sorry and thanks for your help!!!
I go open a new issue.

Original comment by rapha.ba...@gmail.com on 22 Mar 2012 at 5:51

GoogleCodeExporter commented 8 years ago
Hey max, which arduino board are you using? I'm having the same proble here 
with the mega2560, i made the pin replacement but still nothing...Greeting from 
Argentina.

Original comment by oincabo...@gmail.com on 29 Mar 2012 at 1:37

GoogleCodeExporter commented 8 years ago
Hi everybody..

I have the same kind of problem :

GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE
----

I tried to use the 2 and 3 pin for tx and rx AND the 4 and 5

but it still doesn't work.. (in my case the right pins seems to be the 4 and 5 
but ???)

I read many post and issues and I saw that many people wrote that this shield 
need an 
external power.. is it right ???
did you used an external power for this shield ???
if yes what kind of power did you used and how did you connect it to the shield 
???

my setup is a GSMSHIELD for futurashop.it and an arduino ethernet (but seems to 
be the same than arduino uno) and powered by the usb-to-serial arduino adapter..

when I turned it on the green led on the gsm shield is on but maybe this kind 
of power is not enough to run completely this shield ??

thanks for your answer

gerbem

Original comment by 93rb1n4...@gmail.com on 5 May 2012 at 4:18

GoogleCodeExporter commented 8 years ago
Yes it needs an'external power source 12V 1A connected to Arduino power input.

Original comment by martines...@gmail.com on 5 May 2012 at 7:21

GoogleCodeExporter commented 8 years ago
thanks.. now it work..

Original comment by 93rb1n4...@gmail.com on 6 May 2012 at 10:27

GoogleCodeExporter commented 8 years ago
hi im using 4 AA type batteries but still cant get signal...which kind of 12v 1 
A source are you talking about?

Original comment by oincabo...@gmail.com on 9 May 2012 at 9:26

GoogleCodeExporter commented 8 years ago
sorry but usually an AA battery is 1.5 right? So 4*1,5 = 6...
However the new shield implements the lithium battery support ;)

Original comment by martines...@gmail.com on 10 May 2012 at 9:52

GoogleCodeExporter commented 8 years ago
Thanks max.action07 for your guides.. After doing those two steps still I got 
DB NO RESP..

Then I just did a reset(pressing the button on the boards) on the SIM900 and 
Arduino, then it started working.. adding this note in case anybody else also 
pulling their hairs..

Original comment by baskar...@gmail.com on 11 May 2012 at 2:58

GoogleCodeExporter commented 8 years ago
oh i see...i'll get one of those then...thanks martines

Original comment by oincabo...@gmail.com on 11 May 2012 at 11:04

GoogleCodeExporter commented 8 years ago
I need help. I'm using the sample sketch GSM_GPRSLibrary_SMS. I've already 
changed the necessary pins for the software serial to pins 4 and 5. I can 
already receive but problem is I cannot send SMS.

Original comment by JRVillan...@gmail.com on 16 May 2012 at 7:37

GoogleCodeExporter commented 8 years ago
Hi, please start a new issue. Fill the information required and post the part 
of code that doesn't work. Marco

Original comment by martines...@gmail.com on 16 May 2012 at 7:42

GoogleCodeExporter commented 8 years ago
Sorry about that...I have already opened a new issue.

Original comment by JRVillan...@gmail.com on 16 May 2012 at 7:53

GoogleCodeExporter commented 8 years ago
HI
Anyone please help me!!!  
i m using Arduino uno and Seeed studio GPRS shield, but I am getting out put:

GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp
status=IDLE

I attached with power, jumpers D7(RX) and D8(TX) in Seeed studio GPRS shield

I used:

#include <SoftwareSerial.h>
#define _GSM_TXPIN_ 7
#define _GSM_RXPIN_ 8

#include "SIM900.h"

//If not used, is better to exclude the HTTP library,
//for RAM saving.
//If your sketch reboots itself proprably you have finished,
//your memory available.
//#include "inetGSM.h"

//If you want to use the Arduino functions to manage SMS, uncomment the lines 
below.
#include "sms.h"
SMSGSM sms;

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to send and receive SMS.

int numdata;
boolean started=false;
char smsbuffer[160];
char n[20];

void setup() 
{
  //Serial connection.
  Serial.begin(9600);
  Serial.println("GSM Shield testing.");
  //Start configuration of shield with baudrate.
  //For http uses is raccomanded to use 4800 2400or slower.
  if (gsm.begin(9600)){
    Serial.println("\nstatus=READY");
    started=true;  
  }
  else Serial.println("\nstatus=IDLE");

  if(started){
    //Enable this two lines if you want to send an SMS.
    if (sms.SendSMS("+971505393365", "Arduino SMS"))
      Serial.println("\nSMS sent OK");
  }

};

void loop() 
{
  if(started){
    //Read if there are messages on SIM card and print them.
    if(gsm.readSMS(smsbuffer, 160, n, 20))
    {
      Serial.println(n);
      Serial.println(smsbuffer);
    }
    delay(1000);
  }
};

What mistake i did?
Please anyone reply me, tks..

Original comment by t.mena...@gmail.com on 4 Jul 2012 at 11:12

GoogleCodeExporter commented 8 years ago
The problem at 99% is in the communication between Arduino and Seed Studio.
This issues' page is dedicated to problems directly linked at library 
developing and GSM GPRS Shield of Futura Shop / Open Electronics.
For other kind of requests I think that is better to ask on others Forum (e.g. 
arduino.cc for Arduino boards)
Marco

Original comment by martines...@gmail.com on 5 Jul 2012 at 6:30

GoogleCodeExporter commented 8 years ago
ADD !!! Please !!

#ifndef _GSM_TXPIN_
  #define _GSM_TXPIN_ 2
#endif

#ifndef _GSM_RXPIN_
  #define _GSM_RXPIN_ 3
#endif

Original comment by ricardo....@gmail.com on 1 Sep 2012 at 5:07

GoogleCodeExporter commented 8 years ago

Original comment by martines...@gmail.com on 11 Dec 2012 at 5:01

GoogleCodeExporter commented 8 years ago
This issue section is not longer supported.
Please check the support page www.gsmlib.org 

Original comment by martines...@gmail.com on 6 Jul 2013 at 11:27