beautypg.com

7 gps – Siemens XT65 User Manual

Page 30

background image

Java User’s Guide

4.2 Interfaces

35

s

wm_java_usersguide_v12

Page 30 of 123

2008-02-25

Confidential / Released

4.2.7

GPS

The on-board GPS functionality can be accessed in 4 different ways from a Java application.

AT commands via ATCommand

Java API JSR179

transparent via CommConnection

transparent via ATCommand

It is discouraged to use the forth possibility since it uses up a valuable ATCommand instance.
Use Java API for non-transparent, use CommConnection for transparent GPS access. Trans-
parent and non-transparent modes can not be used concurrently but it is possible and in some
cases may be necessary to use AT commands concurrently with the Java API e.g. for GPS
power saving modes. For details about AT command related GPS functionality see

[1]

.

The usage of CommConnection for GPS access is very straight forward. Calling Connec-
tor.open with port-id “gps0” opens a transparent channel to the GPS module. Then all protocols
supported by the GPS hardware can be used.

The Java location API (JSR179) offers three basic functionalities (for details see

[3]

):

location listener, a periodic call-back with current location information

proximity listener, a call-back when a specified location is close

landmark store, a storage for landmarks/way-points

The landmark store is persistent. The stores are saved to FFS under a:/lmstores/store_X.xml,
where X is the number of the store (0 is the default store).

There can be 8 stores plus 1 default store each containing up to 100 landmarks in up to 8 cat-
egories (“no category” also counts as a category). Using AddressInfo with the landmarks might
decrease the maximum number of possible landmarks in a store, depending on the amount of
AddressInfo data being used. An IOException indicates that a store is full.

There is only one store active at a time. The current store information is kept in RAM and only
written to FFS when the application switches to a different store or terminates. Saving a store
might take up to 45s! During this time period the VM is blocked, no processing can be done in
parallel.

One of the examples that come with the product CD is a tracking application that uses the Java
location API.

GPS is only supported in XT75/XT65.

Products with GPS do not feature ASC1. So System.out is set to “null” device by default (see

Section 5.9

).

This manual is related to the following products: