Go Down

Topic: Kindly help for the following errrrrro which arrives for each and every GSM code (Read 3593 times) previous topic - next topic

KK639

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Uno"
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3ShieldV1ModemVerification.cpp: In member function 'String GSM3ShieldV1ModemVerification::getIMEI()':
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3ShieldV1ModemVerification.cpp:72: error: conversion from 'int' to 'String' is ambiguous
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/WString.h:59: note:                 String::String(const char*)

what must be the problem fellows ??????

Grumpy_Mike

Quote
what must be the problem fellows

The problem is in the code that you have not posted.

KK639

ohh this is the code

Testing the modem and network connection from http://arduino.cc/en/Guide/ArduinoGSMShield



// import the GSM library
#include <GSM.h>

// PIN Number
#define PINNUMBER ""

// initialize the library instance
GSM gsmAccess(true);     // include a 'true' parameter for debug enabled
GSMScanner scannerNetworks;
GSMModem modemTest;

// Save data variables
String IMEI = "";

// serial monitor result messages
String errortext = "ERROR";

void setup()
{
  // initialize serial communications
  Serial.begin(9600);
  Serial.println("GSM networks scanner");
  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);

  // 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 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]");

}

plz check

Grumpy_Mike

Quote
ohh this is the code

and where are the code tags so that we can copy and paste your code?

Please read the how to use this forum sticky post. It tells you about how to post code correctly and how to ask a question to get the best results.

However I copy and past what you have and I get no errors on IDE 1.05.
Quote
The GSM library is included with Arduino IDE 1.0.4 and later.

What version are you running?


Grumpy_Mike

OK I just downloaded 1.0.6 and I get the error as well.
So it looks like there is a bug or other incompatibility with this version of the IDE.
I also get this fault in version 1.5.7 .

I see from the release notes that 1.0.6 has had the string library ported from this version so it looks like it is faulty.
Try and download version 1.0.5 and I think you will find the errors go away.

KK639


annayya

please help me am not this errorr 



This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3ShieldV1ModemVerification.cpp: In member function 'String GSM3ShieldV1ModemVerification::getIMEI()':
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3ShieldV1ModemVerification.cpp:72: error: conversion from 'int' to 'String' is ambiguous
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/WString.h:61: note: candidates are: String::String(const __FlashStringHelper*)
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/WString.h:59: note:                 String::String(const char*)

Go Up