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

You are viewing an older revision! See the latest version

Homepage

Table of Contents

  1. API Introduction

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 readBuffer (char *buffer, int count)
read from GPRS module and save to buffer array
void sendCmd (char *cmd)
send AT command to GPRS module
int waitForResp (char *resp, int timeout)
check GPRS module response before timeout
int sendCmdAndWaitForResp (char *cmd, char *resp, int timeout)
send AT command to GPRS module and wait for correct response
int checkSIMStatus (void)
check SIM card' Status
int checkSignalStrength (void)
check signal strength
int networkInit (void)
check network is ok or not
int sendSMS (char *number, char *data)
send text SMS
int readSMS (char *buffer, char *message, bool check)
read SMS if get a SMS
int deleteSMS (int index)
delete SMS message on SIM card
int callUp (char *number)
call someone
int answer (void)
auto answer if coming a call
int loop (bool check)
a loop to wait for some event.
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
void serialDebug (PinName tx, PinName rx)
used for serial debug, you can specify tx and rx pin and then communicate with GPRS module with common AT commands

All wikipages