maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   [In development] Share GPS (https://talk.maemo.org/showthread.php?t=33663)

chemist 2009-10-29 12:46

[In development] Share GPS
 
http://maemo.org/community/brainstorm/view/share_gps
Quote:

I like to share my Nxxx's GPS with another device.
I put up an idea to export or share the GPS device or its data stream. AFAIK some gps enabled phones are capable of serving as a BT-GPS-Mouse, wouldnt it be nice to have it USB and BT ready. Adding an option to the ACK screen when plugging into USB to serve as GPS-Mouse and adding GPS-Mouse as BT service would be my choice. Some kind of WiFi-share (GPSoIP or simple output to a stream like port-based thing) would be an idea to look at too.

allnameswereout 2009-10-31 20:52

Re: Share GPS
 
Should not be too difficult. What you do is export the GPS over Bluetooth SPP, which the GPSD supports.

What you do is reverse of: http://gpsd.berlios.de/bt.html

Which is explained here for N810: http://talk.maemo.org/showthread.php?p=311896

Sharing on WiFi is easy as well. That could work via SSH port forwarding, or by letting GPSd listen on 0.0.0.0, or something like that.

chemist 2009-10-31 22:33

Re: [Sandbox] Share GPS
 
I think I could figure out how to do that but avarage joe should not have to think about that only once, if there would be a button to "share via BT" or something alike it would be useful for average joe. for example its a thing of 2 min to get a BT device into pan with my computer on linux to share its internet connection: install dhcpd configure it and make it start automagical with a BT-PAN as it isnt needed else, do some iptables editing and you are done.
average joe using a gui networkmanager which I dont, he knows how to interact with his gui tool..(I dont) needs 30 sec to change all his connection details which I do in about the same time on the shell (I love TAB completion) and now think of average microsoft joe... he doesnt even know what modprobe or lsmod is! from my own exp. with starting working on in and with linux I know that some howtos are missing basics you need to know. (dont read through what your link reads) average joe needs a helping hand or a button and most of the time he doesnt want a helping hand but a button

allnameswereout 2009-11-01 00:14

Re: [Sandbox] Share GPS
 
Why BT PAN. Why not BT SPP. Or WiFi. Or GPRS. Or TCP over USB. Here lies a problem. That, and BT PAN is not enabled by default.

I find BT PAN a rather strange solution btw. BT SPP is much easier to set up, and more widely supported. See, if it speaks TCP/IP, its easy to set up with GPSD, but GPSD can also talk to a device like rfcomm0.

On S60 I've used a Java ME program called ExtGPS for this purpose. Very simple. I can't imagine its too complex. But one should put it off after using to save battery juice.

chemist 2009-11-01 01:15

Re: [Sandbox] Share GPS
 
oh I am sorry! this was just an example to show the problem of average joe in case of BT by hand on linux. (as I said: for example)

how it will be done depends on how the recipients manage an external BT GPS device (its serial port afaik), but as you see in the n810 post its a problem to keep the gps active without a program running up front.

maybe it should show up at a scan as GPS device with applied service name too.

dont know how that would work for windows if you stream via tcp or udp ports with a gpsserver, as I dont know any freeware to connect to a gps server for windows (I still think of average joe who has no idea of other streams than webradio)

allnameswereout 2009-11-01 15:11

Re: [Sandbox] Share GPS
 
By default, GPSD listens on 127.0.0.1:2947

If it shows up at a scan that means 1) N900 Bluetooth is on 2) N900 GPS is on 3) N900 GPS is using Bluetooth SPP. Well, at least, I assume so, because exporting over Bluetooth SPP is just the most common way, you know.

But your (I assume its yours?) Brainstorm entry is very basic. Look, what you want can be done by command line already (although I cannot write a howto right now because not have device yet). Your idea doesn't mention GUI.

So I think you should make more clear the problem (that it is not easy to share the GPS) and that you want to provide this in an easy manner and decide which protocol to export it over.

Because right now this is not clear.

So what could be done is:

1) simply let GPSD listen on 0.0.0.0 this means it will work on all ppp0 (GPRS), wlan0 (WiFi), pan0 (Bluetooth PAN), usb0 (IP over USB) while user may only use one of these or not like to share data with 'everyone'. Now, A) everyone is a relative term though given GPRS is usually NATed and WiFi may have authentication or not possible for clients to communicate w/each other and PAN also has authentication and well USB requires physical cable. B) we could allow user to specify which devices GPSD should listen to C) we could use IPT to forward connections to 127.0.0.1:2947
2) provide only over Bluetooth hence means some authentication takes place. So, only Bluetooth over SPP. I don't see any use-case where Bluetooth PAN would be preferred over Bluetooth SPP maybe you can convince me *wink*.
3) We decide what is the best solution of these and implement it in a GUI, or we let users vote for the best solution. The question is where this GUI is located or activated, and if this part of Maemo is open source. But I also question if its really up to a vote on Brainstorm at all. Its a cool feature, but not a 'commonly used one', like timsamoff states. The possibilities are endless though, but rather for 'power users', so one could say its not very important a good GUI exists.
4) In that sense maybe we could outline some use-cases from several angles (very_useful_ones, cool_ones_making_jaw_drop). Here some I can think of:
  • Run together with OBD-2 analyzer on laptop or Carputer.
  • Run navigation software on iPod touch (with gpsserial or RoqyGPS, allowing more navigation software than available for Maemo.
  • Run navigation software on S60 phone without GPS, allowing more navigation software than available for Maemo.
  • Be kind and provide GPS for third parties in the train or restaurant (LOL).

chemist 2009-11-01 16:24

Re: [Sandbox] Share GPS
 
sorry again I changed the question in brainstorm and my solution

I also think there is no need for a whole setup GUI, just two functional buttons, one at the USB ack screen and one in the GPS settings or BT settings to share via BT... well and a button to stop sharing

allnameswereout 2009-11-01 20:01

Re: [Sandbox] Share GPS
 
Quote:

Originally Posted by chemist (Post 363041)
sorry again I changed the question in brainstorm and my solution

I also think there is no need for a whole setup GUI, just two functional buttons, one at the USB ack screen and one in the GPS settings or BT settings to share via BT... well and a button to stop sharing

Thanks. A checkbox would do it, I guess.

Here suggestion for implementation:

# On GPS device running Linux. 2 examples using BlueZ. Configation file /etc/bluetooth/rfcomm.conf examples use rfcomm4, channel 4 to avoid interference with existing rfcomm configuration.

# Example 1. Requires client with GPS daemon.

rfcomm4 {
listen rfcomm4 4 screen /dev/gps 112500
channel 4;
comment "External GPS";
}

# Example 2. Does not require GPS daemon; raw GPS data.

rfcomm4 {
listen rfcomm4 4 gpsd -n /dev/gps
channel 4;
comment "External GPS";
}

The client either:

1) runs GPSD with source rfcomm4 channel 4. Example: http://www.justuber.com/blog/2007/10...-ubuntu-gutsy/
2) configure rfcomm4 channel 4, tell GPS client to use /dev/rfcomm4 as GPS input data instead of default (probably /dev/gps or 127.0.0.1:2947)

rohin_adalja 2010-01-25 23:00

Re: [Under consideration] Share GPS
 
Please people please make this if you can.. if it takes too long if possible please please provide atleast "noob-friendly" directions INSTEAD of a gui please but work on it

voltagex 2010-02-01 05:16

Re: [Under consideration] Share GPS
 
Isn't the GPS device locked down and only available through the Location API? Thus rendering it useless for anything that expects NMEA.

extechop 2010-02-28 15:42

[Under consideration]Share GPS
 
I don't know a lot about the architecture of the locator subsystem, but it would seem that it would not be terribly difficult to make the N900 emulate a separate bluetooth-connected GPS unit, while still leaving the location information available for applications in the phone. This would be useful for people who have to carry such units around, to use with phones or PDA's running navigation software not available on Maemo.

I admit, not a very wide audience, but again, this doesn't seem like a terribly complicated application?

killerjay 2010-03-24 03:47

exgps for n900?
 
there was an app for the n95 called exgps that would let me use the gps in the n95 as an external bluetooth gps reciever....

http://www.nokiausers.net/Reviews/Ex...for-S60v3.html

any way that this can be ported to the n900?

joshv06 2010-03-24 04:07

Re: exgps for n900?
 
I also am interested in an app like this.

Hagar 2010-03-24 04:07

Re: exgps for n900?
 
I would like to have it too. I have been using it for many months to share my A-GPS on the S60 phones to the other devices (N8x0) or laptop etc. while in the car. The inbuilt GPS of the N810 was quite crappy even after the beta A-GPS application from Nokia.

injunear 2010-03-24 06:58

Re: exgps for n900?
 
Maybe not as slick as an app but I am pretty sure this can be done with gpsd and bluetooth serial.

Hagar 2010-03-26 04:50

Re: exgps for n900?
 
That sounds better than nothing. So what next? Should this be taken up in the Brainstorm or somewhere else?

eitama 2010-04-14 06:01

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by extechop (Post 549941)
I don't know a lot about the architecture of the locator subsystem, but it would seem that it would not be terribly difficult to make the N900 emulate a separate bluetooth-connected GPS unit, while still leaving the location information available for applications in the phone. This would be useful for people who have to carry such units around, to use with phones or PDA's running navigation software not available on Maemo.

I admit, not a very wide audience, but again, this doesn't seem like a terribly complicated application?

Do you mean, using the N900 as a bluetooth gps to provide gps information for another device over bluetooth?
If so, this is exactly what I need!

assetburned 2010-04-14 12:11

Re: Bluetooth GPS unit emulation
 
it is done for some other devices before, so why shouldn't it be possible on the N900?

eitama 2010-04-14 12:13

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by assetburned (Post 610127)
it is done for some other devices before, so why shouldn't it be possible on the N900?

I even managed to put my hands on some python files for s60, I'm sure with some effort this can be ported to N900 python code.
(i'm looking into it - but I doubt this will be running soon)

assetburned 2010-04-14 12:32

Re: Bluetooth GPS unit emulation
 
I have the patience to wait.... but only for a while ;-)

eitama 2010-04-14 12:40

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by assetburned (Post 610162)
I have the patience to wait.... but only for a while ;-)

Hehe, I wouldn't count on it anyway (;

GameboyRMH 2010-04-14 12:50

Re: Bluetooth GPS unit emulation
 
Sounds like a function that should be added to BlueMaemo...

zimon 2010-04-14 13:02

Re: Bluetooth GPS unit emulation
 
http://en.wikipedia.org/wiki/NMEA_0183
standard to follow:
Quote:

The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data is transmitted in a "sentence" from one "talker" to multiple "listeners" at a time. Through the use of intermediate expanders, a talker can have a unidirectional conversation with a nearly unlimited number of listeners, and using multiplexers, multiple sensors can talk to a single computer port.

nicola.mfb 2010-04-14 13:09

Re: Bluetooth GPS unit emulation
 
I was able to do that on a freerunner simply creating and exporting an rfcomm with bluez (or creating a serial proxy forwarding gpsd to leave gps usable on the fr too).
If there is an NMEA source available (daemon, pty, etc.) it should be very easy.

eitama 2010-04-14 13:14

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by GameboyRMH (Post 610189)
Sounds like a function that should be added to BlueMaemo...

Actually I was thinking about integrating it into mobile hotspot, with the approval of the author (:
as it would require me to launch just one app to do what I want to do (;

extechop 2010-04-17 21:27

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by eitama (Post 610219)
Actually I was thinking about integrating it into mobile hotspot, with the approval of the author (: as it would require me to launch just one app to do what I want to do (;

If that's the what will do it, go for it! I'm looking forward to seeing your results.

assetburned 2010-04-17 22:41

Re: Bluetooth GPS unit emulation
 
hmm personally i would suggest that you follow the unix philosophy.
one program for just one purpose.

mobilehotspot is a program that should offer exactly that functionally.
these Bluetooth GPS unit emulation could just be what it is... a tool that let your device act as GPS unit for other devices.

that will allow you to develop that tool separately. if others want to use your app, they can by using specified interfaces. if you want to optimise your app, you can do it as long as you keep the interfaces. and if they want to modify there apps.... they can also do it.

if you start to implement more and more functions to one program, you will end up with programs like Microsoft Word... you can do everything with it. Calculating, doing presentation, working on spreadsheets, playing tetris, flying a flight simulator (ok that depends on the version).... but you can also us it as a word processing application.
several hundred mega bytes of wasted space on your hard disc.
that isn't a real problem with devices where you can replace the internal storage by a bigger disc, but we are talking about the N900 here... it would be a shame if some people wouldn't use your application just because they don't want to waste space on there N900 by having all these hot spot features they never use.

cu assetburned

eitama 2010-04-17 22:45

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by assetburned (Post 615323)
hmm personally i would suggest that you follow the unix philosophy.
one program for just one purpose.

mobilehotspot is a program that should offer exactly that functionally.
these Bluetooth GPS unit emulation could just be what it is... a tool that let your device act as GPS unit for other devices.

that will allow you to develop that tool separately. if others want to use your app, they can by using specified interfaces. if you want to optimise your app, you can do it as long as you keep the interfaces. and if they want to modify there apps.... they can also do it.

if you start to implement more and more functions to one program, you will end up with programs like Microsoft Word... you can do everything with it. Calculating, doing presentation, working on spreadsheets, playing tetris, flying a flight simulator (ok that depends on the version).... but you can also us it as a word processing application.
several hundred mega bytes of wasted space on your hard disc.
that isn't a real problem with devices where you can replace the internal storage by a bigger disc, but we are talking about the N900 here... it would be a shame if some people wouldn't use your application just because they don't want to waste space on there N900 by having all these hot spot features they never use.

cu assetburned

You convinced me, I never thought about it that way.
I was thinking more about "I don't want to start 2 programs separatly for a task" but I can solve that with a script starting both.
But I am still a long way from finishing my Task.
I am having problems with the emulation, and can't seem to find anyone to help me. ):

assetburned 2010-04-17 22:50

Re: Bluetooth GPS unit emulation
 
:-) you got it... that's exactly what scripts are made for.

and if you want to have a button for it... "There is an App for that" ;-)

extechop 2010-04-18 21:22

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by eitama (Post 615326)
I am having problems with the emulation, and can't seem to find anyone to help me. ):

What kind of help do you require?

If it's a matter of information, I believe you'll find all the info you need on the subject here. Probably generating GGA sentences would be sufficient, but of course also looping through RMC and GLL should not hurt, either, and make it a bit more universal.

Maybe you should make the sentences generated and frequency of updates configurable?

Benson 2010-04-18 21:37

Re: Bluetooth GPS unit emulation
 
Using N810 as a bluetooth GPS module may be helpful...

chemist 2010-04-19 10:30

Re: Bluetooth GPS unit emulation
 
Search before you post please.
http://maemo.org/community/brainstorm/view/share_gps/

talk threads merged (exgps, bluetooth gps unit emulation)

eitama 2010-04-19 10:44

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by chemist (Post 617459)
Search before you post please.
http://maemo.org/community/brainstorm/view/share_gps/

talk threads merged (exgps, bluetooth gps unit emulation)

Thanks for the info.
But I did search, and do not appreciate the false assumption.

chemist 2010-04-19 16:21

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by eitama (Post 617475)
But I did search, and do not appreciate the false assumption.

Then I may assume that you didn't try very hard because I found all three threads in brainstorm and the connected brainstorm.
I am not here to offend anybody but to look after the place.
I try to be nice and polite. Not answering this comment wouldn't be polite but I am missing the use of it apart of telling you off or explain you how it works. You don't have to explain yourself as there is nothing to explain - you did start the third thread about export/share-gps without even reading the rules for brainstorm.

Feel free to contribute to this thread/brainstorm and make sure you follow the rules and search for your issue/idea before you start a new thread, please.

eitama 2010-04-19 18:08

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by extechop (Post 616674)
What kind of help do you require?

If it's a matter of information, I believe you'll find all the info you need on the subject here. Probably generating GGA sentences would be sufficient, but of course also looping through RMC and GLL should not hurt, either, and make it a bit more universal.

Maybe you should make the sentences generated and frequency of updates configurable?

Hey mate,
Thanks for the info!

I have managed to get one step further.
So far, when the N95 connected to the n900 for gps info,
it redisplayed the bluetooth menu after 5 seconds to choose an external gps. I put some prints on the N900 python script, and I saw a message $PNOK from N95, I understand I need to answer this message with an OK, and so I did, and now the N95 says "Calculating GPS data" which is good!
But after 10 seconds the N95 says "GPS does not work properly in closed buildings" or such line i don't remember it.
The information I was trying to send is an example line of GGA in a loop, but it's not enough.

I thought there is no negotiation to this, but apparently there is!
I can't find anywhere on the N900 a direct NMEA feed from the GPS, for example on the N810 there was /dev/gps or something like that (i never had N810).

extechop 2010-04-25 20:54

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by chemist (Post 617459)
Search before you post please.
http://maemo.org/community/brainstorm/view/share_gps/

talk threads merged (exgps, bluetooth gps unit emulation)

I did. Searching for keywords "gps bluetooth" brings up 500 finds, with this thread (currently) somewhere on the second page — sorry, I just missed it. Searching for "gps emulation" did not seem to bring up this thread before it got merged with the thread I ended up starting.

Never mind that, what is the current consensus, how should we proceed? I personally would suggest to start with the bluetooth version, and then expand from that.

extechop 2010-04-25 21:44

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by eitama (Post 618097)
I put some prints on the N900 python script, and I saw a message $PNOK from N95, I understand I need to answer this message with an OK, and so I did, and now the N95 says "Calculating GPS data" which is good! But after 10 seconds the N95 says "GPS does not work properly in closed buildings" or such line i don't remember it. The information I was trying to send is an example line of GGA in a loop, but it's not enough.

Well, did the GGA line include valid coordinates, what was it exactly? One thing might be that your GGA message included data indicating the GPS unit does not have accurate coordinates, ie. we might be indoors. How often did you print it? Have you considered also sending GPRMC, GPGSV, and GPGSA messages?

Quote:

Originally Posted by eitama (Post 618097)
I thought there is no negotiation to this, but apparently there is!

The NMEA standard itself doesn't really have negotiation, but PNOK is a proprietary Nokia extension which effectively does this. I suspect the N95 is trying to figure out if it is talking to a Nokia GPS unit or PSY?

eitama 2010-04-25 23:36

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by extechop (Post 627461)
Well, did the GGA line include valid coordinates, what was it exactly? One thing might be that your GGA message included data indicating the GPS unit does not have accurate coordinates, ie. we might be indoors. How often did you print it? Have you considered also sending GPRMC, GPGSV, and GPGSA messages?



The NMEA standard itself doesn't really have negotiation, but PNOK is a proprietary Nokia extension which effectively does this. I suspect the N95 is trying to figure out if it is talking to a Nokia GPS unit or PSY?

Well I am trying to emulate an external gps not made by nokia, so I will drop the PNOK negotiation, and i'll focus more on message types. I'll see where this leads me.
I am sending the messages every second, and the message was one i copied from a real gps fix from my external gps unit.

extechop 2010-06-04 09:07

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by eitama (Post 627564)
Well I am trying to emulate an external gps not made by nokia, so I will drop the PNOK negotiation, and i'll focus more on message types. I'll see where this leads me. I am sending the messages every second, and the message was one i copied from a real gps fix from my external gps unit.

So, have you been able to make progress with this?
Or, are there more promising paths to take?

eitama 2010-06-04 11:36

Re: Bluetooth GPS unit emulation
 
Quote:

Originally Posted by extechop (Post 699204)
So, have you been able to make progress with this?
Or, are there more promising paths to take?

Well it's definetly doable, but I neglected the project cause I didn't have time, and preffered to put the time I do have into learning Qt Mobility SDK.

Once I master that, i'll get back to this, but this time not using python.


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

vBulletin® Version 3.8.8