Hi,

As QtMobility MeeGo satellite and positioning support is nowadays merged to 
qtmobility master, 
here's some thoughts should you want to try it (it was not in the mobility 1.2 
technology preview). 
This is a long and miscellaneous story, I just hope to shed some light in case 
you bump into same questions I did.

***) Compiling

I cloned the QtMobility directly into the SDK. Doing this, make sure you have 
the development tools as described in:
http://wiki.meego.com/SDK/Docs/1.1/Building_a_MeeGo_chroot_on_Linux#Install_developer_packages

For configuring the QtMobility use the -meego option, e.g.:
$ ./configure -modules "location" -meego

Check that you get OK in the following:
...
Checking Location GeoClue master provider ... OK
Checking Location Gypsy provider ... OK
...

If not, then you are likely missing development libraries. At least in my case 
(1.1 SDK) the following two devel libraries
have been adequate:
$ sudo zypper install gypsy-devel gconf-dbus-devel

***) GPS Configuration

Used GPS device needs to be configured (what device to use). 
Its done with gconftool-2 (needs X11). Both satellite and positioning use this 
same setting.
If this setting is set, QtLocation will try to use GPS by default, if not, it 
asks for whatever 
there is available (may result to example provider, see below). Of course 
source can be changed later with
setPreferredPositioningMethod().

For example:
$ gconftool-2 -t string -s 
/apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice /dev/ttyUSB0
Note that the value may be a bluetooth address as well. To check the value:
$ gconftool-2 --get /apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice
To unset the value:
$ gconftool-2 -u /apps/geoclue/master/org.freedesktop.Geoclue.GPSDevice

Now there are many GPS devices out there, and it really boils down what gypsy 
works with.
I though I'd mention this as an example: I've used a USB GPS. For this purpose 
I needed to adjust its 
baudrate:
$ sudo stty -F /dev/ttyUSB0 ispeed 4800
and then I can e.g.
$ cat /dev/ttyUSB0
.... nmea data streams ....

Note that FIFOs work as well. I wrote a small program that writes prerecorded 
NMEA ASCII data to a named pipe/fifo 
at periodic intervals. Configure this pipe as the GPS device (and make sure 
your gypsy version is 0.8+), start the feeder program, 
and you have a simulated GPS device. Probably there are more sophisticated 
solutions for this out there but I thought I'd mention
just in case (my main motivation was to create automated test-suite, but I 
later ended up mocking the libraries).

***) Example provider

Geoclue comes with many providers, example provider amongst them. If you have a 
GPS provider configured, you propaly won't
encounter it, but if you don't you will. It is somewhat distracting provider, 
giving '0' updates every second or so. 
I mention it here because it may cause confusion like "why is my GPS device 
giving all zeros, I guess I'd better walk outside".
If you want to get rid of it:
$ sudo rm /usr/share/geoclue-providers/geoclue-example.provider
A quick check what providers are running is:
$ ps -ef | egrep gypsy\|geoclue
For geoclue/gypsy error logs you can also check 
$ sudo less /var/log/messages

***) QEMU and USB passthrough

If you have a USB GPS device plugged to your host and want to use it in SDK 
running on QEMU, one way to access the device is to:
Highlight QEMU window (the GUI)
ctrl+alt+2    // should open QEMU monitor
info usbhost  // shows what USB devices there are on the host
usb_add host:xxxx:yyyy // adds the device
ctrl+alt+1 // returns back to the GUI

Note I had to start the SDK as root before the passhtrough really worked.

Juha
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to