element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum GSM Shield not working. Any ideas?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 20 replies
  • Answers 2 answers
  • Subscribers 393 subscribers
  • Views 2403 views
  • Users 0 members are here
  • comms
  • fault_finding
  • arduino
  • micro_controller
  • gsm_shield
Related

GSM Shield not working. Any ideas?

markvenn
markvenn over 10 years ago

Hi

I am having trouble getting my new gsm shield to work on my mega adk. I am using the standard gsm library to use the demo gsm sketches and it is using the sim card that came with the shield.  I ma getting nothing out of  the serial monitor except the very first printouts saying that the system his running. For example if I upload the gsm scanner i get the message saying that the scanner is starting but I get nothing else output. I am using a power supply for the mega ( 9v) and the led that light up are the on and then the status one comes on and net flashes for a bit then all seems to go quiet.

 

Code as follows. I have added an extra function that is supposed to copy the imei of the modem but nothing happens except the output below appears.

/*

 

GSM Scan Networks

 

This example prints out the IMEI number of the modem,

then checks to see if it's connected to a carrier. If so,

it prints the phone number associated with the card.

Then it scans for nearby networks and prints out their signal strengths.

 

Circuit:

* GSM shield

* SIM card

 

Created 8 Mar 2012

by Tom Igoe, implemented by Javier Carazo

Modified 4 Feb 2013

by Scott Fitzgerald

 

http://arduino.cc/en/Tutorial/GSMToolsGsmScanNetworks

 

This example code is part of the public domain

*/

 

// libraries

#include <GSM.h>

 

// PIN Number

#define PINNUMBER ""

 

// initialize the library instance

GSM gsmAccess;     // include a 'true' parameter to enable debugging

GSMScanner scannerNetworks;

GSMModem modemTest;

 

// Save data variables

String IMEI = "";

 

// serial monitor result messages

String errortext = "ERROR";

 

void setup()

{

  // initialize serial communications and wait for port to open:

  Serial.begin(9600);

  while (!Serial) {

    ; // wait for serial port to connect. Needed for Leonardo only

  }

 

  Serial.println("GSM networks scanner");

  test();

  scannerNetworks.begin();

 

 

  // connection state

  boolean notConnected = true;

 

  // Start GSM shield

  // If your SIM has PIN, pass it as a parameter of begin() in quotes

  while(notConnected)

  {

    if(gsmAccess.begin(PINNUMBER)==GSM_READY)

      notConnected = false;

    else

    {

      Serial.println("Not connected");

      delay(1000);

    }

  }

 

  // get modem parameters

  // IMEI, modem unique identifier

  Serial.print("Modem IMEI: ");

  IMEI = modemTest.getIMEI();

  IMEI.replace("\n","");

  if(IMEI != NULL)

    Serial.println(IMEI);

}

 

void loop()

{

  // scan for existing networks, displays a list of networks

  Serial.println("Scanning available networks. May take some seconds.");

  Serial.println(scannerNetworks.readNetworks());

 

    // currently connected carrier

  Serial.print("Current carrier: ");

  Serial.println(scannerNetworks.getCurrentCarrier());

   

  // returns strength and ber

  // signal strength in 0-31 scale. 31 means power > 51dBm

  // BER is the Bit Error Rate. 0-7 scale. 99=not detectable

  Serial.print("Signal Strength: ");

  Serial.print(scannerNetworks.getSignalStrength());

  Serial.println(" [0-31]");

 

}

 

void test(){

    Serial.print("Modem IMEI: ");

  IMEI = modemTest.getIMEI();

  IMEI.replace("\n","");

  if(IMEI != NULL)

    Serial.println(IMEI);

}

 

OUTPUT:

=======

GSM networks scanner

Modem IMEI:

  • Sign in to reply
  • Cancel

Top Replies

  • markvenn
    markvenn over 10 years ago in reply to gadget.iom +1
    Hi Paul It is the GSM R3 telefonica shield on a mega adk r3 arduino
  • markvenn
    markvenn over 10 years ago in reply to gadget.iom +1
    I am just uploading the sketch now. I have checked the sim in a phone and it is happy to roam onto the o2 network here, telefonica own o2 so no surprise there. I am surprised by the power that can be drawn…
  • gadget.iom
    gadget.iom over 10 years ago in reply to markvenn +1 verified
    AHA! http://arduino.cc/en/Guide/GSMShieldLeonardoMega
Parents
  • gadget.iom
    0 gadget.iom over 10 years ago

    What make/model is your GSM shield?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to gadget.iom

    Hi Paul

    It is the GSM R3 telefonica shield  on a mega adk r3 arduino

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    You're most welcome! image

    Please let me know how you get on...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to gadget.iom

    image

    Starting modem test...modem.begin() succeeded

    Checking IMEI...Modem's IMEI:

    861074025893721

    Reseting modem...Modem is functoning properly

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    Excellent news. Good to know you have it sorted. image

    Might have to get myself one of those shields.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to gadget.iom

    I would suggest you make sure your power supply is up to the job. It does seem to drag in an awful lot of power, it's not the voltage, its the amps it would appear. A 12v 500ma power supply doesn't hack it and it seems that my 9v 750ma is also struggling. On the hunt for something bigger now. I found a very useful document that has the AT commands for GSM modems, it is the Quectel "cellular engine manual". (What a cool name is that? image)

    http://arduino.cc/en/uploads/Main/Quectel_M10_AT_commands.pdf

    This has been a really useful document to get the correct commands to make sure I am talking to the shield properly. I have also found a lot of helpful info that I will post later once I am found the links again.

    Cheers

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    Yeah the manual recommends a power supply capable of delivering 700 to 1000mA.

    Thanks for the head up on that document. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to gadget.iom

    I now have a new supply that kicks out 1500 mA, it's a 12V 18W PSU from element14

    I am hoping that this will give me enough juice!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    Great. image

    Keep me posted.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to gadget.iom

    Success! The power supply is definitely an issue, so this needs to be taken into account, not going to get this to run "standalone" for very long at all I think image

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • markvenn
    0 markvenn over 10 years ago in reply to markvenn

    Strange that it is only showing these three and not the set that my mobile show but I am working on the assumption that the antenna is not not the quality of my Galaxy.

    • O2
    • 3 UK
    • Vodafone
    • EE
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    Glad you're all sorted.  image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • gadget.iom
    0 gadget.iom over 10 years ago in reply to markvenn

    Glad you're all sorted.  image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube