mlinaje/gsm-shield-arduino

ARDUINO MEGA 2560 WITH GMS SHIIELD EXACT PROCEDURE

Closed this issue · 15 comments

Hello,
I know there's already 2 issues for my problem but i'm not sure of the exact 
procedure.
Could you please write straightly how to use the gsm shield with arduino mega 
2560 ?
So i can see if i've missed something.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? 
GSM Shield testing.
DB:NO RESP
DB:ELSE
DB:ELSE
DB:CORRECT BR

What do you see instead?
GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP

What version of the product are you using? On what operating system?
Last one downloaded as of this week.

Please provide any additional information below.
For your information, i've got the shield connected to the arduino mega via 
pins 10/11 (which support interrupts needed for software serial) (i've tried 
with 18/19, 50/51, 52/53)
I have the alimentation too.
The switch on the board is on SW.
I've changed the pins correctly in GSM.CPP.
I've tried with another board + shield, it does exactly the same thing.

I attach the whole library including gsm.ccp and the example SMS server 
included that I'm using to test. 

Thanks for you help, i'm very sorry, i've tried all i've read in your forum.

Original issue reported on code.google.com by ggcDes...@gmail.com on 2 May 2012 at 10:10

Attachments:

[deleted comment]
The problem is that with the switch you can select only between 0-1 (HW) and 
4-5 (SW).
To be more free the new version of the shield on Futurashop or Open-Electronics 
allows to change the pin connection with a jumper.
I think if you want to use the Mega you should do that with some weldings.
However, I don't know why but the software serial doesn't work on Mega, so we 
are changing the library to allow the use of HardwareSerial.
For now, the library for Arduino Mega is in testing, so there there is no .zip 
in download, but there is a folder in branches where there is the library 
compatible with Mega.
I think the steps for you (with the old version) are:
1. download the folder SIM900IDE100MEGA in /branches (use svn client)
2. remove in some safety way the switch and make a link between the lines from 
SIM900 and the pins of Serial1 (18 and 19). If you prefer you can buy the new 
shield, that implements also this function.
3. You should be able to use the library with Mega.

Marco

Original comment by martines...@gmail.com on 3 May 2012 at 12:06

The change for this is done now.

Original comment by martines...@gmail.com on 3 May 2012 at 5:42

  • Changed state: Fixed
Hello,
Thanks for all your support.
We were able to talk with the module now, 
after bypassing the shield and connecting to pins 18/19 directly.
But we have this answer while using the GSM_GPRSLibrary_SMS example running : 
See below  (We had a SIM CARD inside the module
I don't know what is not working....
If you have any idea... i would gladly use any help ! Thanks again. 

GSM Shield testing.

ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: þ
DB:ELSE
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
DB:ELSE
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: þ
ATT:
OKRIC: ü
ATT:
OKRIC: ü
DB:ELSE
ATT:
OKRIC: þ
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
DB:DIFF RESP
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: ü
ATT:
OKRIC: þ
DB:NO BR
ATT:
OKRIC: ð
ATT:
OKRIC: ð
ATT:
OKRIC: ð
ATT:
OKRIC: ð
ATT:
OKRIC: ð
DB:NO BR
ATT:
OKRIC:
ATT:
OKRIC:
ATT:
OKRIC:
ATT:
OKRIC:
ATT:
OKRIC:
DB:NO BR
ATT:
OKRIC:      ÿ
ATT:
OKRIC: ))ÿ
ATT:
OKRIC:  )ÿ
ATT:
OKRIC:      ÿ
ATT:
OKRIC:  )ÿ
DB:NO BR
DB:NO BR
DB:NO BR
ATT:
OKRIC: à
ATT:
OKRIC:
ATT:
OKRIC:
ATT:
OKRIC:
ATT:
OKRIC:
DB:NO BR

status=IDLE

Original comment by ggcDes...@gmail.com on 4 May 2012 at 2:35

Sorry, I meant bypassing the SWITCH not shield.

Original comment by ggcDes...@gmail.com on 4 May 2012 at 2:36

Seems there is a problem with baudrate... It tries to find the baudrate but 
doesn't find it. I don't know why.  I should check the autobaudrate on HW 
Serial. 
If you restart again the sketch do you receive the same output?
If it easy for you, now that you bypassed the switch, try to change the 
baudrate (running a new sketch with gsm.begin(9600) on Arduino Uno and then 
retry with Arduino Mega. I'm sorry but it's a beta version and probably there 
are some bugs :)

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

Hello,
I've the same output every time i try.
We're gonna try on the uno, could you tell us on what pin we should connect on 
the uno to use HW ?
I'll tell you back what we have.
Thanks again for the help.

Original comment by ggcDes...@gmail.com on 7 May 2012 at 1:18

We've tried with uno :

There is an error at compilation with the new lib (the one for the mega ) :
Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In constructor 
'HWSerial::HWSerial()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:4: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'void HWSerial::end()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:13: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'virtual void HWSerial::begin(int)':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:25: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'int HWSerial::peek()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:29: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'virtual size_t HWSerial::write(uint8_t)':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:33: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'virtual int HWSerial::read()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:37: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'virtual int HWSerial::available()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:41: error: 
'Serial1' was not declared in this scope
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp: In member 
function 'virtual void HWSerial::flush()':
/Users/serec/Documents/Arduino/libraries/GSM_GPRS/HWSerial.cpp:45: error: 
'Serial1' was not declared in this scope

We've tried with the official lib for the uno, we've plugged on the pin 0 & 1 :
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

After having a look at the code of the lib, i suppose by default, only software 
serial works on uno. So it's normal the SIM900 did not answer as we have 
connected the sim900 to the hardware TX and RX.

What do you want me to test exactly ?

Thanks

Original comment by ggcDes...@gmail.com on 7 May 2012 at 8:11

Yes, normally only softwareserial...
The error is caused because Serial1 doesn't exist on Uno, if you want to use it 
with hardware serial, you have to search "Serial1" and reply with "Serial".

Original comment by martines...@gmail.com on 8 May 2012 at 7:03

Hello, we've got a load of errors trying the lib with arduino UNO. See attached 
file.
Could we come back to the beginning...
We have "DB: NO RESP" on the mega.
We try it on the UNO to be sure it works normally.

What source code branch am i supposed to download for the uno, and how am i 
supposed to connect the shield to the uno ?
Do i remove the strap we made to bypass the switch ?

Once we have it running on the UNO what good will it do for running it on the 
MEGA ?

I'm a bit disappointed, i bought this shield because it was supposed to work on 
the arduino, i didn't know it didn't work on the mega.
We've choosen this shield because the lib comming with it had a function for 
sending sms easily.
Before we tried the EASYGSM/GPRS TM2 from Mikroelektronika but we didn't have 
such functionnality.

I hope you can help us using your lib on the mega.
Thanks

Original comment by ggcDes...@gmail.com on 9 May 2012 at 4:16

Attachments:

We 've tried with a shield without the modification for the switch and the 
standard lib.
It works OK.
GSM Shield testing.
DB:ELSE
DB:ELSE
DB:ELSE
DB:DIFF RESP
DB:NO BR
DB:NO BR
DB:NO BR
DB:NO BR
DB:NO BR
DB:NO BR
DB:FOUND PREV BR
DB:OK BR

status=READY

So what should we do to make it work on the mega ?
Thanks again

Original comment by ggcDes...@gmail.com on 9 May 2012 at 5:29

Do you have any photo how to connect 18 and 17 pin with tx and rx?
Thak you for any informations.

Original comment by kamillo1...@gmail.com on 28 Dec 2012 at 1:11

Hi!
Check the photo.
the blu-white cable is the end of the green one.

Marco

Original comment by martines...@gmail.com on 29 Dec 2012 at 11:47

Hi guys, here is the complete procedure to use the OLD GSM shield with an 
Arduino Mega:
1) change the code to switch to Arduino Mega as explained in the 
Instructions.txt file that come with the GSM/GPRS Librery v304;
2) Hardware switch on SW using pins 4 and 5 for Rx and Tx (to be set in the 
GSM.cpp file);
3) connect with a jumper wire the pin D5 on the GSM shield to the pin 18 (Tx1) 
on the Mega board;
4) connect with a jumper wire the pin D4 on the GSM shield to the pin 19 (Rx1) 
on the Mega board.
N.B.: you don't have to isolate physically the pins on the shield 

Original comment by sebastia...@gmail.com on 1 Feb 2013 at 10:07

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