Export to GitHub

btstack - issue #44

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


Posted on Jun 4, 2010 by Happy Cat

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!

Comment #1

Posted on Jun 4, 2010 by Swift Ox

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.

Comment #2

Posted on Jun 6, 2010 by Happy Cat

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

Comment #3

Posted on Jun 6, 2010 by Swift Ox

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

Comment #4

Posted on Jun 6, 2010 by Happy Cat

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

Comment #5

Posted on Jun 25, 2010 by Happy Cat

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

Comment #6

Posted on Jun 25, 2010 by Swift Ox

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.

Comment #7

Posted on Jun 26, 2010 by Happy Cat

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

Comment #8

Posted on Jun 26, 2010 by Swift Ox

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".

Comment #9

Posted on Nov 7, 2010 by Happy Monkey

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

Comment #10

Posted on Nov 7, 2010 by Swift Ox

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.

Comment #11

Posted on Nov 8, 2010 by Grumpy Kangaroo

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.

Attachments

Comment #12

Posted on Dec 18, 2010 by Happy Monkey

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.

Attachments

Comment #13

Posted on Dec 23, 2010 by Happy Monkey

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.

Comment #14

Posted on Dec 23, 2010 by Swift Ox

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.

Comment #15

Posted on Dec 23, 2010 by Happy Monkey

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.

Comment #16

Posted on Jan 4, 2011 by Swift Dog

Comment deleted

Comment #17

Posted on Feb 28, 2011 by Happy Monkey

Any progress on this issue? Still waiting to connect my nokia phone to my ipod through Btstack...

Status: Verified

Labels:
Type-Defect Priority-Medium