Pages: [1]   Go Down
Author Topic: problem with gsm shield  (Read 841 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
I bought this arduino shield: http://store.iteadstudio.com/index.php?main_page=product_info&products_id=413 and i download the library from this website but when i try to uploading the example code from the library i have this error:
In file included from GSM_Shield_Call.pde:13:
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:10:22: error: WProgram.h: No such file or directory
In file included from C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:11,
                 from GSM_Shield_Call.pde:13:
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/NewSoftSerial.h:71: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
C:\Users\kle0ps\Desktop\arduino-1.0.2\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
In file included from GSM_Shield_Call.pde:13:
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:152: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:161: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:163: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:169: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:175: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:178: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:180: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:182: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:184: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:185: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:197: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:202: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:205: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:208: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:213: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:214: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:215: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:215: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:216: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:216: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:217: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:217: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:218: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:221: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:222: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:223: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:224: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:229: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:230: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:231: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:232: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:237: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:242: error: 'byte' has not been declared
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:256: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:259: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:263: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:263: error: expected ';' before '*' token
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:264: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:265: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:271: error: 'byte' does not name a type
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::SetCommLineStatus(int)':
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:161: error: 'comm_line_status' was not declared in this scope
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::DisableUserButton()':
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:206: error: 'module_status' was not declared in this scope
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h: In member function 'void GSM::EnableUserButton()':
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:207: error: 'module_status' was not declared in this scope
GSM_Shield_Call.pde: In function 'void loop()':
GSM_Shield_Call:35: error: 'class GSM' has no member named 'CallStatus'

I uploading this code:
Code:
/* GSM Shield example
 
 created 2011
 by Boris Landoni
 
 This example code is in the public domain.

 
 http://www.open-electronics.org
 http://www.futurashop.it
 */

#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;

    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);
    
}
    

Does any know why?
Thank you
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50362
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does any know why?
You have at least two problems. First, user downloaded libraries DO NOT go in the core library directory. Get the GSM library out of there, and install it in the right place. When you do that, find a 1.0+ compatible version or search the forum where those same messages have been posted way too many times.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I placed my library here C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield
Is it wrong?
I have only 2 errors now
In file included from C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/GSM_Shield.h:11,
                 from GSM_Shield_Call.pde:13:
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/SoftwareSerial.h:72: error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'
C:\Users\kle0ps\Desktop\arduino-1.0.2\hardware\arduino\cores\arduino/Print.h:48: error:   overriding 'virtual size_t Print::write(uint8_t)'
« Last Edit: December 01, 2012, 06:47:13 pm by kle0ps » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50362
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is it wrong?
Yes. User-downloaded libraries go in the libraries folder in the sketch directory.

Quote
C:\Users\kle0ps\Desktop\arduino-1.0.2\libraries\GSM_Shield/SoftwareSerial.h:72: error: conflicting return type specified for 'virtual void SoftwareSerial::write(uint8_t)'
So, fix the return type. SoftwareSerial should already have a return type of size_t. If yours doesn't, make it so. In both the header file and source file.
Logged

Pages: [1]   Go Up
Jump to: