
-68-
v4.9
Miscellaneous functions
12.13. Choosing the storage location
This function selects the location (local storage or SD card storage) of store the data captured by the 3G/GPRS module as
pictures, video or emails. The values for input parameter can be: ‘0’ for local storage and ‘1’ for SD card storage.
Example of use:
{
// Selects microSD card to store data:
_3G.selectStorage(1);
}
This function returns:
•
‘1’ on success
•
‘0’ or ‘-2’ if error
12.14. Changing the baudrate
This function changes the baudrate between Waspmote and 3G/GPRS module. This function also changes the UART’s baudrate
in Waspmote. The allowed baudrates are: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200. Higher values don’t
work properly in Waspmote.
Example of use:
{
// Sets baudrate to 38400 bauds:
_3G.changeBaudrate(38400);
}
This function returns:
•
‘1’ on success
•
‘0’ or ‘-2’ if error
12.15. Sending AT commands to the 3G/GPRS module
This function allows to the user to send AT commands to the 3G/GPRS module and read the answer from it. The command must
a string without the “AT”. The answer is stored in
buffer_3G
with this format.
Example of use:
{
// Sends “AT+CREG”:
_3G.sendATCommand(“+CREG?”);
// Shows the answer:
USB.println(_3G.buffer_3G);
}
This function returns:
•
‘1’ on success
•
‘0’ if error