duemilanove + sim900

Hello,

I am new in this forum and I have a problem. I am using a arduino duemilanove and GSM 900.

the code I use is ;

#include <GSM_Shield.h>
//for enable disable debug rem or not the string #define DEBUG_PRINT
// definition of instance of GSM class
GSM gsm;

void setup() {
Serial.begin(9600);
Serial.println("system startup");
//gsm.InitSerLine(9600); //initialize serial 1
gsm.TurnOn(9600); //module power on
//gsm.InitSerLine(9600); //initialize serial 1
gsm.InitParam(PARAM_SET_1);//configure the module
gsm.Echo(1); //enable AT echo
}

void loop()
{

int call;
call=gsm.CallStatus();
switch (call){
case CALL_NONE:
Serial.println("no call");
break;
case CALL_INCOM_VOICE:
Serial.println("incoming voice call");
delay(5000);
gsm.PickUp();
break;
case CALL_ACTIVE_VOICE:
Serial.println("active voice call");
delay(5000);
gsm.HangUp();
break;
case CALL_NO_RESPONSE:
Serial.println("no response");
break;
}
delay(1000);

}

And I got error like this ;

In file included from GSM_Shield_Call.cpp:13:
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:10:22: error: WProgram.h: No such file or directory
In file included from C:\Users\acer\Desktop\New folder\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:11,
from GSM_Shield_Call.cpp:13:
C:\Users\acer\Desktop\New folder\arduino-1.0.1\libraries\GSM_Shield/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from GSM_Shield_Call.cpp:13:
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:152: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:161: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:163: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:169: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:175: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:178: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:180: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:182: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:184: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:185: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:197: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:202: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:205: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:208: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:213: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:214: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:215: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:215: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:216: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:216: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:217: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:217: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:218: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:221: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:222: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:223: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:224: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:229: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:230: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:231: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:232: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:237: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:242: error: 'byte' has not been declared
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:256: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:259: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:263: error: ISO C++ forbids declaration of 'byte' with no type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:263: error: expected ';' before '*' token
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:264: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:265: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:271: error: 'byte' does not name a type
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::SetCommLineStatus(int)':
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:161: error: 'comm_line_status' was not declared in this scope
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::DisableUserButton()':
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:206: error: 'module_status' was not declared in this scope
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::EnableUserButton()':
\arduino-1.0.1\libraries\GSM_Shield/GSM_Shield.h:207: error: 'module_status' was not declared in this scope
GSM_Shield_Call.cpp: In function 'void loop()':
GSM_Shield_Call.pde:-1: error: 'class GSM' has no member named 'CallStatus'

can anyone help me to go through this problems?

can anyone help me to go through this problems?

Tell me exactly how much searching you did. Never mind, I know the answer to that. None.

error: WProgram.h: No such file or directory

has been discussed many, many times. It no longer exists for version 1.0 and forward. That library is not compatible with 1.0 or later. If you want to make it compatible, you will need to replace WProgram.h with Arduino.h.

C:\Users\acer\Desktop\New folder\arduino-1.0.1\libraries\GSM_Shield/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from GSM_Shield_Call.cpp:13:

These messages have been discussed many, many times, too.

You should not be using NewSoftSerial with 1.0+. You should be using SoftwareSerial.

Fix these issues first, then see what messages you still get, if any.

Tell me exactly how much searching you did. Never mind, I know the answer to that. None.

I searched to find this post. Thanks for not just scalding, but also including the two solutions given.

I found the following 'good advice' for us 'noob' to the forum.

http://arduino.cc/forum/index.php/topic,97455.0.html

From what I have read the GSM.h and the GSM.cpp files have to be modified because they are for an earlier version 1.00 of Arduino,
the lines inside these files to be changed are

#include "WProgram.h"
#include "NewSoftSerial.h"
Wprogram.h is now Arduino.h
and NewSoftSerial.h is now SoftwareSerial.h because they are now included in ver 1.01 of Arduino
#include "Arduino.h"
#include "SoftwareSerial.h"

any reference to NewSoftSerial must be changed wherever it is used,
however I am still having problems myself after these changes with errors on uploading.

however I am still having problems myself after these changes with errors on uploading.

If you keep them to yourself, we can't help. 8)

I just had to comment out GSM::IsUserButtonPushed(void) and GSM::SendSMS out of GSM_Shield.cpp and now it compiles and uploads

obviously this isn't the best way to fix the problem, its a big hammer approach , Does anyone have this file fully sorted ?