
-61-
v4.9
Miscellaneous functions
12. Miscellaneous functions
12.1. Managing incoming data
It waits for incoming calls, SMSs or TCP/UDP data up to 20 seconds. It executes the function
readCall()
if a call is received,
readSMS()
if an SMS is received and
readIPData()
.
Example of use:
{
// Stores in answer the kind of data received
answer = _3G.manageIncomingData(); // Manages incoming data
}
This function returns:
•
‘1’ for call, Stores the phone number in
buffer_3G
•
‘2’ for SMS. Stores
tlfNumber
and
buffer_3G
variables the tlf number and text of the incoming SMS
•
‘3’ for IP data. Stores the IP address from the sender in
IP_dir
and the data in
buffer_3G
•
‘0’ for error or not data
Note 1:
the phone number has a maximum length of 15 characters, including country code.
Note 2:
the SMS text and the TCP/UDP data string has a maximum size of
buffer_3G
length.
12.2. Getting RSSI level
This function gets the RSSI level from the network and stores it in
buffer_3G
in dBm.
Example of use:
{
// Getting RSSI level:
USB.println(_3G.getRSSI(), DEC);
}
This function returns:
•
the value in -dBm
•
‘0’ if error
12.3. Getting cell system information
This function inquires serving cell and neighbours cell system information in GSM.
Example of use:
{
// Gets the cell system information:
_3G.getCellsysInfo();
// Shows the information:
USB.println(_3G.buffer_3G);
}