Reply
Thread Tools
Posts: 5 | Thanked: 1 time | Joined on Oct 2009
#1
Hi to all,

I'm new of Maemo. I have searched, without results, if is possible to test
in scratchbox an application which use gps without a physical gps device.

Thanks in advance for your help.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#2
Carman has this feature, but you'll have to install and configure it.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 
Posts: 5 | Thanked: 1 time | Joined on Oct 2009
#3
Thank you for your reply.

Carman is not exactly what I'm looking for.

As I can understand Carman is an application which use gps device and which can be used without gps signal.

I'm looking for the way to use a fake gps device and signal to test my applications in scrachbox. I'm not been able to figure how or if exist some tool to do that.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#4
Hmm, maybe the Carman emulation can also be used by 3rd party applications.

Anyway, I think gpsfake should be available if you have a package called python-gps installed. But I cannot confirm (yet).

[EDIT: gpsd and python-gps must be installed on the scratchbox host OS (running Linux e.g. the Ubuntu running in VM; not inside scratchbox!; nor Windows).

There, you can install them via sudo apt-get install python-gps gpsd. You must then fill in the root passwd of the VM image as written in documentation.

You can then run gpsfake, but you need a real GPS log which it will run, and emulate. You could also just use SPP + Bluetooth GPS, then run gpsd on your host OS to connect to the Bluetooth GPS.

Either way you can then talk to gpsd on 127.0.0.1 port 2947. Scratchbox can reach this gpsd because it uses same TCP/IP stack as its host OS, and has same interfaces and same IP addresses.

From what I gathered osso-gpsd also provides gpsfake however I cannot seem to find that package for Maemo 5.0 (Fremantle).

A discussion about this subject, although for Maemo 4.0 (Chinook), can be found here.[/EDIT]
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!

Last edited by allnameswereout; 2009-10-11 at 17:25.
 

The Following User Says Thank You to allnameswereout For This Useful Post:
Posts: 5 | Thanked: 1 time | Joined on Oct 2009
#5
Yes, gpsfake looks like what I needed.

I've done some quick tests. I think it's working.

Thank you
 
Posts: 2 | Thanked: 0 times | Joined on Jan 2010
#6
Hi,

I'm new in maemo.

I don't want to create new post, it seems that you figured it out. I'm trying to write app using liblocation API and test it in scratchbox.
I don't have any real gps device so I use gpsfake program on host machine. And it works fine I think. With data file like this:
Code:
$GPGGA,230330,3815.0000,N,02334.0192,E,1,04,5.6,1500.0,M,34.5,M,,*71                                                  
$GPRMC,230330,A,3815.0000,N,02334.0192,E,18825.1,214.3,260110,5,E,A*5
...
gpspipe -r returns:

Code:
{"class":"VERSION","release":"2.91dev","rev":"svn","proto_major":3,"proto_minor":1}
{"class":"DEVICE","path":"/dev/pts/3","activated":1264892087.76,"native":0,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/pts/3","activated":1264892087.76,"native":0,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false}
$GPGGA,230404,3808.2691,N,02331.1621,E,1,04,5.6,1275.6,M,34.5,M,,*79
$GPRMC,230404,A,3808.2691,N,02331.1621,E,19777.7,201.8,260110,5,E,A*E
...
Now, I've compiled example form here in scratchbox with no errors and when I run it in scratchbox it shows warnings:

Code:
test[3630]: GLIB WARNING ** liblocation - location_gpsd_control_prestart_internal: The name com.nokia.Location.UI was not provided by any .service files
test[3630]: GLIB DEBUG default - location error: 4... quitting
error 4 is
LOCATION_ERROR_SYSTEM System error, dbus, hildon, etc. Also when trying to use nw based methods in simless state
link

I was trying to find out solutions about this warning with no results. I don't know how liblocation works with gpsd on host machine (or maybe should I run gpsd in scratchbox).
Do you have any clue how to solve it?

Thanks in advance.
 
Posts: 5 | Thanked: 1 time | Joined on Oct 2009
#7
Unfortunatly, I think you can't test liblocation in scratchbox.

The software I've developed, just use GPS device with gps_open and gps_close call.

I'd like to know a way to test liblocation in Scratchbox.
Please let me know if you find a way.

Happy to give you any help I can.
 

The Following User Says Thank You to googlefella For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Jan 2010
#8
I thought that you were using liblocation.

Tkanks for help anyway.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:24.