When I compile the test code for the arduino GSM shield it gives an error
Code:
// 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]");
}
Error:
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\standard -IC:\Program Files (x86)\Arduino\libraries\GSM C:\Users\jean\AppData\Local\Temp\build6407308977723034692.tmp\sketch_jan08a.cpp -o C:\Users\jean\AppData\Local\Temp\build6407308977723034692.tmp\sketch_jan08a.cpp.o
In file included from C:\Program Files (x86)\Arduino\libraries\GSM/GSM.h:49,
from sketch_jan08a.ino:2:
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1ModemVerification.h:64:7: warning: extra tokens at end of #endif directive
In file included from C:\Program Files (x86)\Arduino\libraries\GSM/GSM.h:50,
from sketch_jan08a.ino:2:
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1PinManagement.h:103:7: warning: extra tokens at end of #endif directive
In file included from C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1ModemCore.h:39,
from C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1AccessProvider.h:38,
from C:\Program Files (x86)\Arduino\libraries\GSM/GSM.h:45,
from sketch_jan08a.ino:2:
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1BaseProvider.h:57: warning: '__progmem__' attribute ignored
In file included from C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1AccessProvider.h:38,
from C:\Program Files (x86)\Arduino\libraries\GSM/GSM.h:45,
from sketch_jan08a.ino:2:
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1ModemCore.h:170: warning: '__progmem__' attribute ignored
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1ModemCore.h:189: warning: '__progmem__' attribute ignored
In file included from C:\Program Files (x86)\Arduino\libraries\GSM/GSM.h:46,
from sketch_jan08a.ino:2:
C:\Program Files (x86)\Arduino\libraries\GSM/GSM3ShieldV1BandManagement.h:49: warning: 'typedef' was ignored in this declaration
sketch_jan08a.ino: In function 'void setup()':
sketch_jan08a.ino:32: warning: deprecated conversion from string constant to 'char*'
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\variants\standard -IC:\Program Files (x86)\Arduino\libraries\GSM -IC:\Program Files (x86)\Arduino\libraries\GSM\utility C:\Program Files (x86)\Arduino\libraries\GSM\GSM3CircularBuffer.cpp -o C:\Users\jean\AppData\Local\Temp\build6407308977723034692.tmp\GSM\GSM3CircularBuffer.cpp.o
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3CircularBuffer.cpp: In member function 'bool GSM3CircularBuffer::extractSubstring(const char*, const char*, char*, int)':
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3CircularBuffer.cpp:222: warning: left-hand operand of comma has no effect
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3CircularBuffer.cpp: In member function 'bool GSM3CircularBuffer::locate(const char*, uint8_t, uint8_t, uint8_t*, uint8_t*)':
C:\Program Files (x86)\Arduino\libraries\GSM\GSM3CircularBuffer.cpp:156: warning: 'binit' may be used uninitialized in this function
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -
A big part of the error has been left out because it is so long
I'm from South Africa and I have a South African sim cart in the GSM shield the sim has a pin but that is in the program and my computer is windows 7.
If anyone knows whats wrong please tell me. ;D