Re: Accessing GPS on Nokia N810

2008-03-11 Thread Petr Stetiar

Please don't take this topic off list.


Andrew Daviel [EMAIL PROTECTED] [2008-03-10 17:07:14]:

 I probably did ps ax instead of ps axw and truncated the command line 
 - no wonder I could not find the device. So if that emits NMEA 0183, gpsd
 translates it to tcp where multiple clients can access it at once.
 I notice gpsdriver is running all the time before the map program is 
 started. I wonder why.

Because 'gpsdriver' seems to be some kind of middleware between userspace
applications and kernel driver. It powers On/Off the GPS, uploads also
something like GPS Almanac data from /var/lib/gps/nvd_data to GPS driver and
it seems, that it also writes back this blob when the GPS is about to shutdown.

 Do you happen to know where the N810 keeps its battery information. 
 /dev/acpi/battery like on my laptop does not exist .

No, but there's battery applet which needs to read that info from somewhere...

-- ynezz
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users


Re: Accessing GPS on Nokia N810

2008-03-11 Thread Tuomas Kulve
Petr Stetiar wrote:

 Because 'gpsdriver' seems to be some kind of middleware between userspace
 applications and kernel driver. It powers On/Off the GPS, uploads also

How does it power the GPS on/off? I.e. how do you ask it to do it?

-- 
Tuomas




signature.asc
Description: OpenPGP digital signature
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users


Re: Accessing GPS on Nokia N810

2008-03-11 Thread Petr Stetiar
Tuomas Kulve [EMAIL PROTECTED] [2008-03-11 10:26:50]:

 Petr Stetiar wrote:
 
  Because 'gpsdriver' seems to be some kind of middleware between userspace
  applications and kernel driver. It powers On/Off the GPS, uploads also
 
 How does it power the GPS on/off? I.e. how do you ask it to do it?

That's what I want to find out. I'm quite lost in strace's output, since
there are some unknown syscalls used like SYS_284 and SYS_285, and I didn't
find out what they're yet. I don't have the systrace's output here, but it's
something like this - if for example 'navicore' want access to GPS, it write's
somehow 'P 3\n' to gpsdriver and gpsdriver powers on GPS using GPS GPIO's in
/sys (you can find them easily by using strings on gpsdriver binary), uploads
nvd_data file, creates /dev/pts/X device and makes /dev/pgps symlink to it and
then starts gpsd daemon using this /dev/pgps device. Then if 'navicore' don't
want to use GPS device, so it writes 'P 0\n' to gpsdriver somehow and gpsdriver
powers off the GPS device.

-- ynezz
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users


Re: Accessing GPS on Nokia N810

2008-03-11 Thread Jussi Kukkonen
Tuomas Kulve wrote:
 Petr Stetiar wrote:
 
 Because 'gpsdriver' seems to be some kind of middleware between userspace
 applications and kernel driver. It powers On/Off the GPS, uploads also
 
 How does it power the GPS on/off? I.e. how do you ask it to do it?
 

In all normal situations you'd use system libraries that do it for you
(like liblocation, I suppose). If you really want to do it by hand, take
a look at gpsctrl.h:
   gpsctrl_set_chip_on()
   gpsctrl_set_chip_off()

Somewhat surprisingly this is in libgpsbt-package.


Jussi
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users


Re: Accessing GPS on Nokia N810

2008-03-11 Thread Tuomas Kulve
Jussi Kukkonen wrote:
 Tuomas Kulve wrote:
 Petr Stetiar wrote:

 Because 'gpsdriver' seems to be some kind of middleware between userspace
 applications and kernel driver. It powers On/Off the GPS, uploads also
 How does it power the GPS on/off? I.e. how do you ask it to do it?

 
 In all normal situations you'd use system libraries that do it for you

I think we not now talking about normal (maemo) situations, at least I'm
not :)

In normal maemo glib environment, I recommend using liblocation.

-- 
Tuomas




signature.asc
Description: OpenPGP digital signature
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users


Re: Accessing GPS on Nokia N810

2008-03-10 Thread Petr Stetiar
Andrew Daviel [EMAIL PROTECTED] [2008-03-10 12:08:40]:

 I built cgps from the gpsd toolkit, which can get data from gpsd if it's 
 running. If I start the Nokia map, gpsd starts up. But I can't see how to
 start it manually - if I try, it says
   GPS device /dev/pgp nonexistent or can't be read

That /dev/pgps device is just symlink to /dev/pts/X created by gpsdriver on
demand done via D-Bus and Unix socket probably. I'm investigating it further
with strace, because I would like to control GPS from scripts also.

-- ynezz
___
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users