Arduino UNO + shield GSM 2 - impossible to use!

After a lot of unsucsessfulll tries I tried the "testModdem" program from Examples/GSM/Tools
I got this:
"Starting modem test...ERROR, no modem answer.
Checking IMEI...Modem's IMEI: 0
Resetting modem...Modem is functoning properly"

From the fact that the IEMI value is "0" the program "detucts" the modem is functioning properly.
Of course that is a wrong deduction!
But of course I can't deduct either from this bug that the modem IS NOT functioning.

I am wondering if the GSM library is up to date to be used with the version 2 of this (oficial) shield.
Has anyone be able to use this version? >:(

I have the same problem.
I can send and receive SMS, but can´t get the GPRS to work.
It would be nice if somebody could help.

I am attempting to use a GSM shield 2 and UNO to send an SMS and i cant get it to connect to any band i am receiving. Any tips on how to get it to connect.

What modem is on that shield?
For sure, there will be more specifics to help you.
I posted a lengthy thread a year ago - to connect an IP channel through a SIM5320

Hi,

I've just taken delivery of a UNO SMD R3, plus a GSM 2 R3 (integral antenna) shield (from RS Components). Before trying to develop anything I downloaded and installed the latest IDE for Windows 1.8.5.

I've put in a standard (working) O2 PAYG SIM with plenty of credit and no pin (checked in a real phone). UNO+GSM2 shield are primarily powered by a 12V 2A "mini brick" SMPS connected to the UNO's DC IN jack.

So far I can't get it to do ANYTHING using any of the example sketches.

The "BandManagement" example sketch from GSM - Tools, throws up a load of warnings:

In file included from C:\Program Files\Arduino\libraries\GSM\src/GSM.h:46:0,

from C:\Program Files\Arduino\libraries\GSM\examples\Tools\BandManagement\BandManagement.ino:26:

C:\Program Files\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration

typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp: In constructor 'GSM3MobileMockupProvider::GSM3MobileMockupProvider()':

C:\Program Files\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp:44:12: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

msgExample="Hello#World";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp: In member function 'int GSM3MobileMockupProvider::connectTCPServer(int, char*, int*)':

C:\Program Files\Arduino\libraries\GSM\src\GSM3MobileMockupProvider.cpp:183:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

strcpy("192.168.1.1", localIP);

^

In file included from C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:34:0:

C:\Program Files\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration

typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp: In constructor 'GSM3ShieldV1BandManagement::GSM3ShieldV1BandManagement(bool)':

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:38:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[UNDEFINED]="";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:39:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[EGSM_MODE]=""EGSM_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:40:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[DCS_MODE]=""DCS_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:41:26: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[PCS_MODE]=""PCS_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:42:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[EGSM_DCS_MODE]=""EGSM_DCS_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:43:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[GSM850_PCS_MODE]=""GSM850_PCS_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1BandManagement.cpp:44:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

quectelStrings[GSM850_EGSM_DCS_PCS_MODE]=""GSM850_EGSM_DCS_PCS_MODE"";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ModemCore.cpp:39:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

char* ok="OK";

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ModemVerification.cpp: In member function 'String GSM3ShieldV1ModemVerification::getIMEI()':

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ModemVerification.cpp:64:20: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]

String number(NULL);

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1SMSProvider.cpp: In member function 'void GSM3ShieldV1SMSProvider::beginSMSContinue()':

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1SMSProvider.cpp:68:57: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

if(theGSM3ShieldV1ModemCore.genericParse_rsp(resp, ">"))

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp: In member function 'String GSM3ShieldV1ScanNetworks::getCurrentCarrier()':

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp:66:21: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]

return String(NULL);

^

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp: In member function 'String GSM3ShieldV1ScanNetworks::getSignalStrength()':

C:\Program Files\Arduino\libraries\GSM\src\GSM3ShieldV1ScanNetworks.cpp:85:21: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]

return String(NULL);

^
and when uploaded gives the following no matter WHAT band I select (4 selected in the below example) - and I have to MANUALLY poweron the modem using the button to get to even do that:

"Restarting modem...
Modem restarted.
Unrecognized modem answer:⸮⸮@
Current band:
Want to change the band you’re on?
Select band:
1 : E-GSM(900)
2 : DCS(1800)
3 : PCS(1900)
4 : E-GSM(900)+DCS(1800) ex: Europe
5 : GSM(850)+PCS(1900) Ex: USA, South Am.
6 : GSM(850)+E-GSM(900)+DCS(1800)+PCS(1900)

Configuring band EGSM_DCS_MODE
Error while changing band
Unrecognized modem answer:x⸮
"
This leads me to think that either the GSM library, or the examples, or both shipped with IDE 1.8.5 just do NOT work with this shield.

Like ghell2000, I get the same garbage result from the TestModem example sketch (the same shed loads of warning during compile).

"Starting modem test...ERROR, no modem answer.
Checking IMEI...Modem's IMEI: 0
Resetting modem..."

With GSMScanNetworks (same shed load of warnings) I get:

"GSM networks scanner"

and that's it. It can sit there for hours and NOTHING.

As a development product this combination is rubbish. How can anyone be expected to develop anything when none of the examples work!

EDIT - 21/10/2017 @ 7:34PM

Interestingly, trying this again using IDE 1.7.10 and, while still having any success with the examples (yet, still working through) at least all the compile time warnings are gone!

Something wrong between 1.7.10 and 1.8.5! IDE

Ok
GSM Networks Scanner from GSM 2 Shield Getting Started page - nothing, still doesn't work.
TestModem - exactly the same.

"Starting modem test...ERROR, no modem answer.
Checking IMEI...Modem's IMEI: 0
Resetting modem...Modem is functioning properly"

Hmmm.. Just tried the Pin Management sketch and that throw up some interesting, if rather misleading, results. It at least ran and came up with:

"PIN & PUK locked. Use PIN2/PUK2 in a mobile phone."

So I put my O2 PAYG SIM back into a phone (old Samsung GT-E2550 Monte slider phone) and - nope not locked at all. PIN Lock is off, no PIN necessary to use it and could happily make calls and send SMS messages.

Anyone any suggestions? Or am I looking at a duff GSM 2 R3 shield to send back to RS?

There seems to be two separate issues - possibly interdependent...
Don’t panic!

First - the compilation warnings. Should not be there.
Assuming you’re using an untouched copy of the source sketch —
It could be as simple as the wrong board selected in the IDE (for that sketch), or perhaps the wrong libraries #included somewhere.

Second - the runtime errors are probably a consequence of #1
What i’d be doing is removing all the code, and starting with a simple serial-echo sketch to talk to the modem from the serial monitor or other serial terminal application.
Then you can be sure the modem is present and operating to the commands in the data sheet.

Starting clean with a serial echo sketch will help you eliminate every other component. You don’t need any included libraries, so it will just work or not.
Then you will know where to start looking.

Hi Lastchance,

Thanks for the feedback.

My issue is that something being sold as a "development product", which this is - Arduino as an organisation ceased to be a seller of purely "hobbyist" products quite some time ago - should not have these problems.

I really don't want to, and shouldn't have to, waste valuable time sorting out Arduino's QC garbage. Time much better spent actually developing working products/projects. If they can't sort out their own examples to make sure they work with the IDE and libraries they supply, then they really should pull the product from sale until they can. It is that or rip out all of the GSM examples and the GSM library and be honest about it "You're on your own - figure out how to make it work yourself"

In answer to your specific questions (which I appreciate - the above is directed at Arduino as an organisation, not you) all of the tests were run after a clean install of the particular IDE and the examples purely "as-is" from the Examples menu within the relevant IDE. Both correctly configured for Arduino UNO on (in my system's case) COM9. I changed nothing.

The runtime "problems" occur under both IDE 1.8.5 (which produces the shed load of compile errors/warning) and 1.7.10 which does not. The examples where those supplied with each IDE version and NOT mixed between the two.

The ONLY exception to the above was when I tried the GSM Networks Scanner listed as good "test" of the shield on Arduino's own product "getting started" page:

I have also tried the version supplied under Exampels, GSM, Tools with BOTH IDEs. None of them work.

What I will try first (less hassle and time) is another UNO board (R3 non-SMD).

I think I've found it!

The "auto-power on" DOESN'T WORK!!!!

I found the answer here:

GSM 2 R3 - AutoPower on KNACKERED!

Specifically this bit posted by QFour (well done that person!) on Dec 9 2015:

"Switch on the power and you will see a small led light up next to the sim card then hold down the small switch next to the Sim Card and another small yellow led will light up. Next to that is another one that will flash rapidly and then flash slower."

Clearly the text of the product documentation page which states:

"If you have an early version of the shield, and it does not turn on automatically, you can solder a jumper to the CTRL/D7 pad on the reverse side of the board, and it will turn on when an attached Arduino receives power."

Needs to be updated to read "ALL versions".

Bejeezus - protect us from crap manufacturer documentation!

If like me you buy a GSM 2 shield and it you can't get anything to work IGNORE what the Arduino product page says and follow the instructions in the attached pic. Until you do, IT WILL NOT WORK!

Right, as my application requires it to work in a remote location where there will be nobody to press the damned button, I'm off to try soldering across CTRL/D7 on the back to see if that really does get it to power on automatically. If it doesn't this board is useless for my application.

Even soldering the link is not a sure solution in remote sites.
My projects effectively run a watchdog on the modem, and if anything untoward happens - they can power cycle the modem in worst case situations.
In the link scenario, not even a processor reset or watchdog can’t help... you’ll need to bump the supply!

True...

At least it is now working and I know auto-power-on doesn't work. I can now look into what (if any) commands are available to ensure it is powered on.

I think that is the fundamental issue with the example sketches, they all assume the modem is powered on, which NOT the case with the GSM 2 shield. You have to press the button, or use what ever commands are available to power it on.

At least it now runs the GSM NetworkScanner, runs the TestModem sketch and I've successfully sent SMS texts from it.

Any suggestions as to what commands I need to look at to power the modem up through software would be appreciated.

A bit of playing about now then I'll try it with a Mega. The ultimate application is to get it to receive commands via SMS to switch various items on/off, send SMS text status updates, and (most importantly) receive voice calls which then get routed (after some sort of DTMF PIN verification - hopefully) through an amplified outdoor speaker - sort of a GSM (and budget) version of one of these:

Axis C3003-e IP Speaker