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 2423 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
  • hirayastudent
    0 hirayastudent over 8 years ago

    Good Day,

     

    I am using ATmega2560 and GSM shield 2 and I can send and receive SMS but the IMEI is 0. I attached a picture below. Pls help.image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • hirayastudent
    0 hirayastudent over 8 years ago

    Good Day,

     

    I am using ATmega2560 and GSM shield 2 and I can send and receive SMS but the IMEI is 0. I attached a picture below. Pls help.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