Getting errors while compiling the GSM test codes
hi everyone,
my objective: perfoming basic tests on "gsm/gprs modem" not shield.
i have gsm/gprs modem me , trying basics tests choose following code , code site
http://arduino.cc/en/tutorial/gsmtoolstestmodem#.uyvjx9soc7h
and code
to compile code have include gsm.h file, have downloaded following link
https://code.google.com/p/gsm-shield-arduino/source/browse/branches/gsmshield/gsm.h?r=102
here not adding file because header file contains many lines...
when compiling code getting following errors
anyone reading post please me out how overcome error. , mistakes i've done please correct me...
where can gsm.h,sms.h , gprs related libraries can post link...
thanks in advance...
my objective: perfoming basic tests on "gsm/gprs modem" not shield.
i have gsm/gprs modem me , trying basics tests choose following code , code site
http://arduino.cc/en/tutorial/gsmtoolstestmodem#.uyvjx9soc7h
and code
code: [select]
/*
example test if modem working correctly.
circuit:
* gsm shield attached (using digital pins 2, 3, , 7)
created 12 jun 2012
david del peral
modified 21 nov 2012
tom igoe
*/
// libraries
#include <gsm.h>
// modem verification object
gsmmodem modem;
// imei variable
string imei = "";
void setup()
{
// initialize serial communications
serial.begin(9600);
// start modem test (reset , check response)
serial.print("starting modem test...");
if(modem.begin())
serial.println("modem.begin() succeeded");
else
serial.println("error, no modem answer.");
}
void loop()
{
// modem imei
serial.print("checking imei...");
imei = modem.getimei();
// check imei response
if(imei != null)
{
// show imei in serial monitor
serial.println("modem's imei: " + imei);
// reset modem check booting:
serial.print("reseting modem...");
modem.begin();
// , check imei 1 more time
if(modem.getimei() != null)
{
serial.println("modem functoning properly");
}
else
{
serial.println("error: getimei() failed after modem.begin()");
}
}
else
{
serial.println("error: not imei");
}
// nothing:
while(true);
}
to compile code have include gsm.h file, have downloaded following link
https://code.google.com/p/gsm-shield-arduino/source/browse/branches/gsmshield/gsm.h?r=102
here not adding file because header file contains many lines...
when compiling code getting following errors
code: [select]
gsm_imei_testing.cpp:9:1: error: 'gsmmodem' not name type
gsm_imei_testing.cpp: in function 'void setup()':
gsm_imei_testing.cpp:19:4: error: 'modem' not declared in scope
gsm_imei_testing.cpp: in function 'void loop()':
gsm_imei_testing.cpp:28:8: error: 'modem' not declared in scope
anyone reading post please me out how overcome error. , mistakes i've done please correct me...
where can gsm.h,sms.h , gprs related libraries can post link...
thanks in advance...
quote
my objective: perfoming basic tests on "gsm/gprs modem"
which modem? code on page linked gsm shield arduino store sells.
quote
where can gsm.h,sms.h , gprs related libraries can post link...
they come ide. no need download them.
Arduino Forum > Using Arduino > Programming Questions > Getting errors while compiling the GSM test codes
arduino
Comments
Post a Comment