I have an Arduino Mega with a SIM900 using gsm.h.
When I compile I get an error stating that this file is not found. I only have that file and it is not in a library folder in a group like other .h files.
Here is the version of gsm.h.
enum
{
GSM_ON,
GSM_OFF,
GSM_RESET
};
enum
{
// various tokens put out by GSM module
GSM_NULL, //0
GSM_OK,
GSM_ERROR,
GSM_CMGS,
GSM_CMGF,
GSM_AT, //5
GSM_RDY,
GSM_CFUN,
GSM_CPIN,
GSM_PACSP,
GSM_CALLRDY,//10
GSM_POWDOWN,
GSM_CGREGQ,
GSM_CGREGR,
GSM_GREATER, // greater than sign
GSM_UNKNOWN
};
#define GST_BIT_POWER 0b00000001
#define GST_BIT_POWER 0b00000001
#define GST_BIT_POWER 0b00000001
#define GSM_AT_TIMEOUT 1000 // number of millisesconds to wait for AT response
#define GSM_DIAL_TIMEOUT 5000 // number of millisesconds to wait for dial response
#define GSM_CFG_TIMEOUT 1000 // number of millisesconds to wait for cfg response
#define GSM_PWR_TIMEOUT 5000 // number of seconds to power cycle
#define GSM_CGREG_RETRY 1000 // number of seconds before retrying network status
#define NUM_TESTS 5
enum
{
// GSM States
GST_UNK, // unknown state at powerup. Could be on, could be off
GST_POWERCYLE, // just power cycled
GST_ON // on
};
enum
{
// GSM SubStates
GSS_UNK, //0
GSS_IDLE,
GSS_SENT_AT,
GSS_POWERCYCLE,
GSS_RDY,
GSS_CFUN, //5
GSS_CPIN,
GSS_PACSP,
GSS_CFG,// Sent cfg text
GSS_CGREG, // query network status
GSS_DISCON, // Not connected to the GSM network
GSS_SND_TXT_NUM, // Sent the phone number
GSS_SND_TXT_MSG // Sent the text message
};
/*
- GSM Network status
- AT+CGREG?
- get modem status
- returns CGREG: 0,1 or 0,0, etc
- if ME (mobile equipment error)
- CME ERROR: Err
- CGREG: n,stat
- returns
- stat=
- 0 - not registered. Searching for operator (If no antenna, this status)
- 1 - registered, home
- 2 - not registered, but trying to attach.
- 3 - registration denied. GPRS service is disabled
- 4 - unknown (came up with this state during bootup)
- 5 - registered, roaming
*/
enum
{
GSN_NOTREG, // 0
GSN_REG_HOME,
GSN_NOTREG_TRYING,
GSN_REG_DENIED,
GSN_UNK,
GSN_REG_ROAM // 5
};
Any help would be appreciated.