Go Down

Topic: Mega2560 - Gsm doesn't Work could you help kindly ? (Read 841 times) previous topic - next topic

gnusso

Good Morning,
I'm using this library :

http://code.google.com/p/gsm-shield-arduino/

with relative shield. From hardware stand-point it's ok.

It's working with Arduino Uno, but with Arduino Mega 2560 Rev. 3 is not Working, I've already adjust the the gsm.h like indicated into txt files.

I receive the error below reported when I try to use a simple example for rx sms:

Code: [Select]
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:121: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:123: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:125: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'boolean SIMCOM900::readSMS(char*, int, char*, int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:196: error: 'class HWSerial' has no member named 'getString'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:202: error: 'class HWSerial' has no member named 'getString'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'boolean SIMCOM900::readCall(char*, int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:229: error: 'class HWSerial' has no member named 'getString'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'int SIMCOM900::getCCI(char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:313: error: 'class HWSerial' has no member named 'getString'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'int SIMCOM900::getIMEI(char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:338: error: 'class HWSerial' has no member named 'getString'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'virtual uint8_t SIMCOM900::read()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:350: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleRead()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:356: error: 'class HWSerial' has no member named 'available'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:357: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWrite(char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:366: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWrite(const char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:371: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWrite(int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:376: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWrite(const __FlashStringHelper*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:381: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWriteln(char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:386: error: 'class HWSerial' has no member named 'println'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWriteln(const __FlashStringHelper*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:391: error: 'class HWSerial' has no member named 'println'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWriteln(const char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:396: error: 'class HWSerial' has no member named 'println'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::SimpleWriteln(int)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:401: error: 'class HWSerial' has no member named 'println'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'void SIMCOM900::WhileSimpleRead()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:407: error: 'class HWSerial' has no member named 'available'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:408: error: 'class HWSerial' has no member named 'read'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'byte GSM::CheckRegistration()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:469: error: 'class HWSerial' has no member named 'println'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'char GSM::GetPhoneNumber(byte, char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:748: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:749: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:750: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'char GSM::WritePhoneNumber(byte, char*)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:822: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:823: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:824: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:825: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:826: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp: In member function 'char GSM::DelPhoneNumber(byte)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:878: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:879: error: 'class HWSerial' has no member named 'print'
/Applications/Arduino.app/Contents/Resources/Java/libraries/GSMSHIELD/SIM900.cpp:880: error: 'class HWSerial' has no member named 'print'


Someone can help kindly me ?

Thanks
Gnux

michinyon


PaulS

The HWSerial.h file contains:
Code: [Select]
//#define MEGA

#ifndef _HWSERIAL_H_
#define _HWSERIAL_H_

#include "Arduino.h"
#include "Streaming.h"
#include <inttypes.h>


class HWSerial
{
#ifdef MEGA

Clearly, you did not uncomment that line to define that you are using a Mega.

Now, that brings up the question of why the library developer didn't use the proper method to detect a Mega, but I'll leave that to you to deal with.

gnusso

Have your reason Paul was not uncomment ! Thanks you!

Now I still to receive "Check pin into gsm.h" library but the pins are correct i need to review by zero ... :-(

Go Up