wei zou / Mbed 2 deprecated ARCH_GPRS_Test

Dependencies:   GPRS mbed

Fork of ARCH_GPRS_Demo by hs loovee

You are viewing an older revision! See the latest version

Homepage

Table of Contents

  1. GPRS

GPRS

the GPRS interface is used to realize mobile communication. It offers APIs such as call up/ send SMS/ TCP connecting etc.

main.cpp

Import programARCH_GPRS_Test

seeedstudio ARCH GPRS Test for GPRS function

APIS

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