pyupm_grovegprs module¶
-
class
pyupm_grovegprs.
GroveGPRS
(uart=0)[source]¶ Bases:
object
API for the Grove GPRS Module.
Deprecated This class is being replaced by GPRS
ID: grovegprs
Name: GPRS Module
Category: wifi
Manufacturer: seeed
Connection: uart
Link:http://www.seeedstudio.com/wiki/GPRS_Shield_V2.0 The driver was tested with the Grove GPRS Module, V2. It’s a GSM GPRS module based on the SIM900. This module uses a standard ‘AT’ command set. See the datasheet for a full list of available commands and their possible responses:
http://www.seeedstudio.com/wiki/images/7/72/AT_Commands_v1.11.pdf
It is connected via a UART at 19200 baud.
C++ includes: grovegprs.hpp
-
dataAvailable
(millis)[source]¶ bool dataAvailable(unsigned int millis)
Checks to see if there is data available for reading
millis: Number of milliseconds to wait; 0 means no waiting
true if there is data available for reading
-
readData
(buffer, len)[source]¶ int readData(char *buffer, unsigned int len)
Reads any available data into a user-supplied buffer. Note: the call blocks until data is available for reading. Use dataAvailable() to determine whether there is data available beforehand, to avoid blocking.
buffer: Buffer to hold the data read
len: Length of the buffer
Number of bytes read
-
readDataStr
(len)[source]¶ std::string readDataStr(int len)
Reads any available data and returns it in a std::string. Note: the call blocks until data is available for reading. Use dataAvailable() to determine whether there is data available beforehand, to avoid blocking.
len: Maximum length of the data to be returned
Number of bytes read
-
setBaudRate
(baud=19200)[source]¶ int setBaudRate(int baud=19200)
Sets the baud rate for the device. The default is 19200.
baud: Desired baud rate.
true if successful
-