#include "gsm.h"
#include "log.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Functions | |
| int | get_line (SerialPort *sp, char *const buffer, int buflen) |
| Read a CR LF terminated line from the serial port. | |
| int | GSMSendCommand (SerialPort *sp, const char *const msg) |
| Send a command to the GSM modem, and listen for the echoed response. | |
| int | GSMSendMessage (SerialPort *sp, const char *const number, const char *const msg) |
| int | GSMCheckSignal (SerialPort *sp) |
| Check the network association and signal strength of the GSM modem. | |
| int | GSMSetSMSMode (SerialPort *sp) |
| int | GSMSendFile (SerialPort *sp, const char *const number, const char *const filename) |
Variables | |
| const char *const | CREG_MESSAGE = "AT+CREG?\r\n" |
| Message to read Network Registration Status. | |
| const char *const | CREG_MESSAGE_RES = "+CREG: " |
| const int | CREG_MESSAGE_RES_LEN = 10 |
| const char *const | CSQ_MESSAGE = "AT+CSQ\r\n" |
| Message to read signal strength. | |
| const char *const | CSQ_MESSAGE_RES = "+CSQ: " |
| const int | CSQ_MESSAGE_RES_LEN = 9 |
| const char *const | CMGF_MESSAGE = "AT+CMGF=1\r\n" |
| Message to put modem into SMS mode. | |
Copyright (C) 2004 Alistair Riddoch, The University of Southampton
|
||||||||||||||||
|
Read a CR LF terminated line from the serial port. The CR LF characters are stripped, and the buffer is NULL terminated so the result can be used as a string.
|
|
|
Check the network association and signal strength of the GSM modem.
|
|
||||||||||||
|
Send a command to the GSM modem, and listen for the echoed response.
|
1.3.5