
-50-
v4.9
GPS
10.3. Starting GPS
There are four functions to start the GPS. For
startGPScold()
and
startGPShot()
no parameters are required and start the
GPS in cold mode and hot mode respectively.
Example of use:
{
// Cold start GPS:
_3G.startGPScold();
// Hot start GPS:
_3G.startGPShot();
}
These functions returns:
•
‘1’ on success
•
‘0’ if error
The function
enableAutoGPS()
configures the GPS to start automatically when the 3G/GPRS module power on, default GPS
is closed. If GPS start automatically, its operation mode is standalone mode. For disable the auto start for the GPS, the function
disableAutoGPS()
must be used.
Example of use:
{
// Enable the auto start GPS:
_3G.enableAutoGPS();
// Disable the auto start GPS:
_3G.disableAutoGPS();
}
These functions returns:
•
‘1’ on success
•
‘0’ if error
The function
startGPS()
are used to start the GPS in the 3 working modes. If the function is called without parameters, the
GPS will start in stand-alone mode. To work in MS-based (2) and MS-assisted (3) the user need to give the URL of a A-GPS server
and the port. The selected server must work without security certificate.
Example of use:
{
// Start GPS in stand alone mode:
_3G.startGPS();
// Start GPS in MS-based mode:
_3G.startGPS(2, “supl.google.com”, “7276”);
// Start GPS in MS-assited mode:
_3G.startGPS(3, “supl.google.com”, “7276”);
}
This function returns:
•
‘1’ on success
•
‘0’ if error
•
‘ -2’ if error setting the APN
•
‘-3’ if error setting GPS server and port,
•
‘-4’ if error starting the GPS
•
‘-5’ if AGPS data are not available
Содержание Waspmote 3G Plus GPS
Страница 1: ...Waspmote 3G GPS Networking Guide ...