Top |
org.freedesktop.ModemManager1.Modem.Locationorg.freedesktop.ModemManager1.Modem.Location — The ModemManager Location interface. |
Setup (IN u sources, IN b signal_location); GetLocation (OUT a{uv} Location); SetSuplServer (IN s supl); InjectAssistanceData (IN ay data); SetGpsRefreshRate (IN u rate);
Capabilities readable u SupportedAssistanceData readable u Enabled readable u SignalsLocation readable b Location readable a{uv} SuplServer readable s AssistanceDataServers readable as GpsRefreshRate readable u
The Location interface allows devices to provide location information to client applications. Not all devices can provide this information, or even if they do, they may not be able to provide it while a data session is active.
This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used (including GNSS module management).
Setup (IN u sources, IN b signal_location);
Configure the location sources to use when gathering location information. Adding new location sources may require to enable them in the device (e.g. the GNSS engine will need to be started explicitly if a GPS source is requested by the user). In the same way, removing location sources may require to disable them in the device (e.g. when no GPS sources are requested by the user, the GNSS engine will need to be stopped explicitly).
This method may require the client to authenticate itself.
When location signaling is enabled by the user, any client application (including
malicious ones!) would be able to use the "Location"
property to receive location updates. If further security is desired, the
signal_location
argument can be set to FALSE
to disable location
updates via D-Bus signals and require applications to call
authenticated APIs (like GetLocation())
to get the location information.
By default location signaling is disabled, and therefore the "Location" property will not be usable until explicitly enabled by the user.
The optional MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB allow to request MSA/MSB A-GPS operation, and they must be given along with either MM_MODEM_LOCATION_SOURCE_GPS_RAW or MM_MODEM_LOCATION_SOURCE_GPS_NMEA.
Both MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB cannot be given at the same time, and if none given, standalone GPS is assumed.
|
Bitmask of MMModemLocationSource flags, specifying which sources should get enabled or disabled. MM_MODEM_LOCATION_SOURCE_NONE will disable all location gathering. |
|
Flag to control whether the device emits signals with the new location information. This argument is ignored when disabling location information gathering. |
GetLocation (OUT a{uv} Location);
Return current location information, if any. If the modem supports
multiple location types it may return more than one. See the
"Location" property
for more information on the dictionary returned at location
.
This method may require the client to authenticate itself.
|
SetSuplServer (IN s supl);
Configure the SUPL server for A-GPS.
|
SUPL server configuration, given either as IP:PORT or as FQDN:PORT. |
InjectAssistanceData (IN ay data);
Inject assistance data to the GNSS module, which will allow it to have a more accurate positioning information.
The data files should be downloaded using external means from the URLs specified in the AssistanceDataServers property. The user does not need to specify the assistance data type being given.
There is no maximum data
size limit specified, default DBus system bus limits apply.
This method may be used when the device does not have a mobile network connection by itself, and therefore it cannot use any A-GPS server to improve the accuracy of the position. In this case, the user can instead download the assistance data files using a WiFi or LAN network, and inject them to the GNSS engine manually.
|
assistance data to be injected to the GNSS module. |
SetGpsRefreshRate (IN u rate);
Set the refresh rate of the GPS information in the API. If not explicitly set, a default of 30s will be used.
The refresh rate can be set to 0 to disable it, so that every update reported by the modem is published in the interface.
|
Rate, in seconds. |
Capabilities readable u
Bitmask of MMModemLocationSource values, specifying the supported location sources.
SupportedAssistanceData readable u
Bitmask of MMModemLocationAssistanceDataType values, specifying the supported types of assistance data.
Enabled readable u
Bitmask specifying which of the supported MMModemLocationSource location sources is currently enabled in the device.
SignalsLocation readable b
TRUE
if location updates will be emitted via D-Bus signals, FALSE
if
location updates will not be emitted.
See the Setup() method for more information.
Location readable a{uv}
Dictionary of available location information when location information gathering is enabled. If the modem supports multiple location types it may return more than one here.
For security reasons, the location information updates via this property are disabled by default. Users can use this property to monitor location updates only if the location signals are enabled with Setup(), but considering that enabling the location signals would allow all users to receive property updates as well, not just the process that enabled them. For a finer grained access control, the user can use the GetLocation() method instead, which may require the client to authenticate itself on every call.
This dictionary is composed of a MMModemLocationSource key, with an associated data which contains type-specific location information:
Devices supporting this
capability return a string in the format
The entire string may only be composed of the ASCII digits
If any of these four items ( |
|||||||||||
Devices supporting this
capability return a D-Bus dictionary (signature The allowed key/value pairs and their formats are:
|
|||||||||||
Devices supporting this capability return
a string containing one or more NMEA sentences (D-Bus signature
For example, if the device sends a
If the device sends a new
If the device then sends a
The manager may discard any cached sentences older than 30 seconds. This allows clients to read the latest positioning data as soon as possible after they start, even if the device is not providing frequent location data updates. |
|||||||||||
Devices supporting this
capability return a D-Bus dictionary (signature The allowed key/value pairs and their formats are:
|
SuplServer readable s
SUPL server configuration for A-GPS, given either as IP:PORT or FQDN:PORT.
AssistanceDataServers readable as
URLs from where the user can download assistance data files to inject with InjectAssistanceData().