offer some API for GPRS use, such as call / sms / tcp connect
Dependents: ARCH_GPRS_Test ARCH_GPRS_Xively GPRS_Shield_Test Seeed_Arch_GPRS_V2_HelloWorld
Homepage
Library Introduction¶
This is a simple library which offers some common operation such as calling up, answering,sending SMS message and TCP connecting to control GPRS module. We write this library mainly because we want to use our products as follow with it.
- ARCH GPRS a wireless network module based on EG-10, which can achive remote data colletion function to communicate with outside world by GPRS network.to know more, please visit http://www.seeedstudio.com/depot/arch-gprs-p-1657.html?cPath=6_11
- GPRS Shield the GPRS Shield provides you a way to use the GSM cell phone network to receive data from a remote location. To know more, please visit http://www.seeedstudio.com/depot/gprs-shield-v20-p-1379.html?cPath=19_20
Program Demo¶
we have written severial demo that include this library. They are show as follow
- ARCH_GPRS_Xively
Import programARCH_GPRS_Xively
a demo to post your sensor data from ARCH GPRS to Xively
- ARCH_GPRS_Test
Import programARCH_GPRS_Test
seeedstudio ARCH GPRS Test for GPRS function
API Introduction¶
Import library
Public Member Functions |
|
GPRS (PinName tx, PinName rx, int baudRate, char *number) | |
Create
GPRS
instance.
|
|
int | init (void) |
init
GPRS
module including SIM card check & signal strength & network check
|
|
int | checkSIMStatus (void) |
check SIM card' Status
|
|
int | checkSignalStrength (void) |
check signal strength
|
|
int | settingSMS (void) |
set SMS format and processing mode
|
|
int | sendSMS (char *number, char *data) |
send text SMS
|
|
int | readSMS (char *message, int index) |
read SMS by index
|
|
int | deleteSMS (int index) |
delete SMS message on SIM card
|
|
int | getSMS (char *message) |
read SMS when coming a message,it will be store in messageBuffer.
|
|
int | callUp (char *number) |
call someone
|
|
int | answer (void) |
auto answer if coming a call
|
|
int | loopHandle (void) |
a loop to wait for some event.
|
|
int | networkInit (char *apn, char *userName=NULL, char *passWord=NULL) |
gprs network init
|
|
int | connectTCP (char *ip, char *port) |
build TCP connect
|
|
int | sendTCPData (char *data) |
send data to TCP server
|
|
int | closeTCP (void) |
close TCP connection
|
|
int | shutTCP (void) |
close TCP service
|