Earl31 / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

GPS: Enhancement: Allow user to specify BT channel for GPS connection #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a Nokia phone which can send GPS data over BT using a program called
ExtGPS.  I am able to receive the GPS NMEA data on my laptop via bluetooth.

The problem is that on my Nokia phone, there are several other BT services
running and ExtGPS uses BT channel 12 (not channel 1 like most dedicated
external GPS devices).  It is not possible to selectively stop individual
BT services on the phone in order to make ExtGPS use channel 1.

Could you enhance BTstack GPS to allow the user to specify the BT channel
number for the connection?

Am currently using BTstack GPS Demo 1.3.

Thanks!

Original issue reported on code.google.com by jg1jg2...@gmail.com on 4 Jun 2010 at 4:24

GoogleCodeExporter commented 8 years ago
thanks for reporting this. BTstack GPS does a SDP request to get the RFCOMM 
channel
of the first SPP port to work with GPS devices that are not on #1. However, this
doesn't help for your Nokia phone.

I've seen on the vendor site of ExtGPS that it announces itself with 
Name="Symarctic
ExtGPS" and Service Description="Share phone's built-in GPS". So, if a device 
has
multiple SPP services, the one with "GPS" in it might be a good idea.

But it will be simpler to provide the option to override the channel number 
somehow,
e.g. in a preferences file - I don't like to offer settings in a UI that most 
people
won't understand). Let's see.

Original comment by matthias.ringwald@gmail.com on 4 Jun 2010 at 10:31

GoogleCodeExporter commented 8 years ago
Thanks Matthias.  The config file sounds like a good idea; agreed that a UI 
control
would be confusing for most people.  You might also consider added a default PIN
number entry to the config file (if some devices do not use 0000).  Look 
forward to
your changes.  I'm willing to help test and debug any issues.

Here is some sample NMEA data captured on my PC over bluetooth sent from ExtGPS 
on my
Nokia 6790 phone.  It might help you with any parsing issues.  The original 
lat/long
coords have been changed to somewhere in the pacific ocean :)

$GPVTG,127.0,T,140.3,M,0.1,N,0.2,K,A*23
$GPGGA,064408.000,3823.12345,N,12461.27142,W,1,05,2.2,150.0,M,-17.4,M,,*61
$GPGLL,3823.12345,N,12461.27142,W,064408.000,A,A*4A
$GPGSA,A,3,23,13,05,08,10,,,,,,,,3.8,2.2,3.1*34
$GPGST,064408.000,29.5,27.3,20.4,63.7,20.1,23.9,73.1*58
$GPGSV,3,1,12,23,35,134,25,28,08,209,24,24,01,351,,07,75,291,21*7A
$GPGSV,3,2,12,13,69,134,30,03,29,088,17,05,21,317,32,06,26,074,18*70
$GPGSV,3,3,12,08,37,262,36,10,33,299,35,19,18,114,19,16,12,043,21*7A
$GPRMC,064408.000,A,3823.12345,N,12461.27142,W,0.1,347.0,300110,18.3,W,A*3C
$GPVTG,342.0,T,4.3,M,0.1,N,0.1,K,A*25
... NMEA sentences repeat at this point ...

Joe

Original comment by jg1jg2...@gmail.com on 6 Jun 2010 at 1:57

GoogleCodeExporter commented 8 years ago
Hi Joe. Does your device require a PIN but you don't get a PIN dialog? If the 
other
device (GPS) asks for pairing, BTstack GPS should/shows a pairing dialog.

W.r.t. the NMEA sequences: do you say that they are not parsed correctly and 
BTstack
GPS reports a wrong location? What coordinates does it show on the screen for 
those
in the sequences above? 

Best

Original comment by matthias.ringwald@gmail.com on 6 Jun 2010 at 7:48

GoogleCodeExporter commented 8 years ago
BTstack GPS detects my Nokia's bluetooth but a connection is never established, 
so I
do not know if I ever get a PIN dialog.  If BTstack GPS has a PIN dialog, then 
no
need for PIN entry in config file.

Similarly, I do not know if BTstack GPS has any problems with the NMEA sequences
because I cannot establish a connection.  I only provided them for your
interest/reference.  Ignore my comment about the changed lat/long coords.

Once I am able to set the BT channel, I will be able to test more.

Thanks,

Joe

Original comment by jg1jg2...@gmail.com on 6 Jun 2010 at 4:56

GoogleCodeExporter commented 8 years ago
Just upgraded to BTstack 0.2-757.  Using my existing version of "BTstack GPS" 
1.3-25246 and can confirm that the demo is working with ExtGPS on my Nokia 
phone!!!

So, I purchased BTstack GPS from Cydia and can confirm that this is also 
working with my setup:  iPod Touch + BTstack GPS + iGo MyWay with gps info 
being sent over bluetooth from my Nokia phone using ExtGPS.

Nice work Matthias!  I'll try it in my car tomorrow.

Thanks,

Joe

Original comment by jg1jg2...@gmail.com on 25 Jun 2010 at 5:05

GoogleCodeExporter commented 8 years ago
Hi Joe. I'm glad it works for you now... but I did not really work on that 
issues. I've fixed various other things, e.g. one that was reported to prevent 
correct connections to Nokia phones. So, there's nothing I do to find the 
correct SPP port, BTstack GPS just uses the first SPP port it gets reported by 
the remote side. 

Original comment by matthias.ringwald@gmail.com on 25 Jun 2010 at 3:54

GoogleCodeExporter commented 8 years ago
Interesting.  Maybe your fix for the Nokia connection was all that was needed.  
I know that the bluetooth service created by ExtGPS is the last one in the 
discovery list.  Maybe it is the only SPP port?  Anyways, thanks for work on 
BTstack.

Joe

Original comment by jg1jg2...@gmail.com on 26 Jun 2010 at 2:26

GoogleCodeExporter commented 8 years ago
you're welcome. I didn't see your services list, but all smartphones should 
expose the good-old serial port you can use for AT commands. So, that would 
make two ports. Anyway... have fun. I'm closing this ticket until a similar 
issue arises which really require to e.g. check the service name for "GPS".

Original comment by matthias.ringwald@gmail.com on 26 Jun 2010 at 7:12

GoogleCodeExporter commented 8 years ago
Hi, 
I'm having the same issue. Extgps is running and when I switch the btstack gps 
on, the phone connects without any problem. But the connection is never made 
between EXTGPS and the Ipod. Btstack GPS (I have the demo, since it's not 
working for me yet), doesn't get any info from the phone, EXTGPS doesn't 
recognize any bluetooth connection.
From a mac, I can see that EXTGPS creates a serial port called Symartictic 
ExtGPS (as you pointed earlier). 
I'm using 4.1 firmware on a 2G ipod and BTStack GPS 1.5 (demo). 
I see you solved the problem in the past. Can you explain how? Or was a fix 
included in a past upgrade? If so, it seems to me that the issue returned. 
Thanks. 
Damian

Original comment by DamianKi...@gmail.com on 7 Nov 2010 at 3:43

GoogleCodeExporter commented 8 years ago
hi. please try to connect and quit. then, please attach /tmp/hci_dump.pklg from 
your iPod - you can use scp or e.g. iFile to grab it.

Original comment by matthias.ringwald@gmail.com on 7 Nov 2010 at 3:47

GoogleCodeExporter commented 8 years ago
Having the same issue here as well - WiFi iPad running 3.2, LG Rumor Touch 
running the latest ExtGPS (version 0.31) BTStack GPS 1.5 demo. BTStack GPS 
connects and extgps sees both a GPS signal and a bluetooth connection, but the 
location info remains blank on the iPad

hci_dump.pklg is attached. The pklg file does appear to show roughly correct 
lat/long and altitude for $GPGLL and $GPGGA, but the $GPGGA sentence doesn't 
seem to have the right format.

Original comment by sysinfo on 8 Nov 2010 at 10:16

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry for the delay, I didn't realize someone answered (there is a notify by 
email option that I missed?)
Anyway, after a few tries, I managed to get BTStackGPS and Nokia 3710 fold 
connected (I think Deleting the paired device in both devices did the work). 
The problem is now I can't get EXTGPS to recognize it's connected to a 
bluetooth device (I have the same problem with roqy), and therefore, no info is 
being sent. 
It works fine when I connect it to my Notebook, so I know EXTGPS is doing the 
work it's supposed to do. 
Here's the file you asked, I hope it helps. 

Original comment by DamianKi...@gmail.com on 18 Dec 2010 at 3:50

Attachments:

GoogleCodeExporter commented 8 years ago
That's not the same issue: 
1) Different Device (You have an Ipad, I have an Ipod 2G)
2) Different Firmware (You have 3.2, I have 4.1)
3) Not the same behavior from EXTGPS (I can't get the third light to turn 
green, you can)
We also don't have the same cell phone, But I don't think it is a problem, 
since we both use EXTGPS. 
So, I don't think we are having the same issue, but different ones. 
So please, Mr. Ringwald, can you check what's wrong in both cases, or give us 
further instructions to help you debug this issues? I'll totally buy this app 
(and it will be my first one) if you fix it. 
Thanks. 

Original comment by DamianKi...@gmail.com on 23 Dec 2010 at 1:19

GoogleCodeExporter commented 8 years ago
the first two points: hardware and OS version, have no influence on the 
behavior of BTstack GPS. 
I did not read or look at your previous comment yet, sorry.

Original comment by matthias.ringwald@gmail.com on 23 Dec 2010 at 1:29

GoogleCodeExporter commented 8 years ago
Ok, noted. It's good to know you are around and read our posts, even when the 
issue appears as closed. 
Thanks for the quick answer. Looking forward to a fix to this issue. 

Original comment by DamianKi...@gmail.com on 23 Dec 2010 at 2:42

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Any progress on this issue? Still waiting to connect my nokia phone to my ipod 
through Btstack...

Original comment by DamianKi...@gmail.com on 28 Feb 2011 at 4:17