Forum: General Topics

Forums / General Topics / k750 BT GPS Connection dropping

 

Subject:k750 BT GPS Connection dropping 

effemm

14:43
Wednesday
4-Jun-2008

Hi there

First of all, can I just say this looks like the best mobile Java GPS tool going. I've tried several others, and I'm not sure how I've missed TMJ for so long. It looks fantastic, and seems to do everything I need.

However (there's always a however)...

The BT connection to the GPS keeps dropping. If I observe the GPS Status on the General page, the status cycles between BT GPS Connecting..., BT GPS Connected and BT GPS Disconnected. The cylcle time is around 10s, with around 5s spent in the "Connected" state. If I look at the Event Log, it looks like:

Starting BT;
Stopping BT;
Starting BT;
Stopping BT;
etc

I've fiddled with the BT settings on the phone (Power Save etc) to no avail. I've checked the phone's firmware, and it appears to be up to date. I've tried the BT GPS with another device (MacBook running GPSy) and the connection - and NMEA data - looks fine to my untrained eye.

The phone's an SE k750i, the BT GPS is a Holox BT-541.

Any ideas?

Thanks in antic

Fraser
Edinburgh

 

effemm

16:07
Wednesday
4-Jun-2008

Slight update - I unpaired the BT GPS to see if that made a difference. It didn't. I then re-paired it (ie added it to My Devices) and it looked like the connection was staying up - well it did for 20s or so.

Tried to repeat but to no avail. Back to the 10s cycle of Connecting - Connected - Disconnected.

Ho hum

Fraser
 

TDHster

16:10
Wednesday
4-Jun-2008

Location:
Moscow

Maybe you need first to find gps device?
Press menu, 2, 1 and then select you device.
 

Stephen

16:17
Wednesday
4-Jun-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Fraser,

Glad you like the look of TMJ!

The problem that you are describing sounds similar to something that I noticed on a friends SE W850 a while ago. His phone connected perfectly with his GPS, but when I tried it with my own GPS (which works fine with my W800 and W910) it did a similar routine where it seemed to connect but then swiftly dropped the connection. Unfortunately at the time I wasn't able to investigate the problem (we were in the pub), and he has since driven over his phone, which put an end to that!

I suspect that this might be a difficult one to get to the bottom of. If you happened to have a different GPS device lying around that would definitely be worth a try, though perhaps you could check the following:

- In the GPS/Log Options menu try setting the Log Type to 'NMEA Text', New Log to 'On Startup', and select a folder to store the log - I use e:/TMJLogs (you'll need to manually create this folder on the memory card first).

- Then try connecting to the GPS Device. After leaving it for a few Connect/Disconnect cycles (and accept any File Access prompts that might appear), is a log file created, if so does it contain any useful NMEA stuff?

- Does the GPS/Enter Manual Connection URL contain a BT connection string? Should look something like:
btspp://longhexnumber:1;authenticate=false;encrypt=false;master=false

Try changing it with various combinations of 'authenticate' and 'master' as true and false. Probably best to restart between attempts (and make sure that GPS/Auto-Connect is NOT ticked).

Also, try a full reboot (switch off and remove the battery for a few seconds).

Does any of that make any difference?

Regards,
Stephen
 

Stephen

16:19
Wednesday
4-Jun-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Just saw your other post - when it seemed to work for 20s or so, did it correctly read your latitude/longitude, etc?
 

effemm

13:32
Thursday
5-Jun-2008

Hi Stephen, thanks for getting back so quickly.

Tried the reboot and changing the manual connector URL - no change. Tried unpairing and pairing again, and can't reproduce the 20s connection I had before, so maybe I imagined it. One thing I did notice, sometimes the BT GPS doesn't appear when searching from within the app, whereas it always appears when searching via the phone's BT tools. At least, I *think* it does. The general behaviour is so erratic, I'm beginning to doubt myself...

Had more luck with the NMEA log. Looks like (and this confirms my experience just watching the display) it does pick up a few lines of NMEA data when it is connected. Here's a fragment:

$GPRMC,130220.562,A,5556.1043,N,00319.0682,W,000.0,277.1,050608,,,A*75
$GPVTG,277.08,T,,M,0.00,N,0.00,K,A*37
$GPGGA,130221.562,5556.1044,N,00319.0686,W,1,09,1.0,82.1,M,52.5,M,,0000*7C
$GPGSA,A,3,26,28,15,21,24,07,08,27,25,,,,1.9,1.0,1.7*3F
$GPRMC,130221.562,A,5556.1044,N,00319.0686,W,000.0,277.1,050608,,,A*77
$GPVTG,277.08,T,,M,0.00,N,0.00,K,A*37
$GPGGA,130222.562,5556.1047,N,00319.0690,W,1,09,1.0,80.5,M,52.5,M,,0000*7D
$GPGSA,A,3,26,28,15,21,24,07,08,27,25,,,,1.9,1.0,1.7*3F
$GPRMC,130222.562,A,5556.1047,N,00319.0690,W,000.0,277.1,050608,,,A*70
$GPVTG,277.08,T,,M,0.00,N,0.00,K,A*37
$GPGGA,130223.562,5556.1046,N,00319.0693,W,1,09,1.0,79.3,M,52.5,M,,0000*7E
$GPGSA,A,3,26,28,15,21,24,07,08,27,25,,,,1.9,1.0,1.7*3F
$GPGSV,3,1,12,26,42,272,42,28,20,142,27,15,30,272,45,21,16,326,34*74
$GPGSV,3,2,12,02,04,204,28,06,06,010,24,24,33,282,46,07,33,058,26*74
$GPGSV,3,3,12,08,69,094,27,27,42,062,25,25,15,055,27,03,06,024,26*74
$GPRMC,130223.562,A,5556.1046,N,00319.0693,W,000.0,277.1,050608,,,A*73
$GPVTG,277.08,T,,M,0.00,N,0.00,K,A*37
$GPGGA,130224.562,5556.1046,N,00319.0695,W,1,09,1.0,78.6,M,52.5,M,,0000*7B
$GPGSA,A,3,26,28,15,21,24,07,08,27,25,,,,1.9,1.0,1.7*3F
$GPRMC,130224.562,A,5556.1046,N,00319.0695,W,000.0,277.1,050608,,,A*72
$GPVTG,277.08,T,,M,0.00,N,0.00,K,A*37
$GPGGA,130230.562,5556.1048,N,00319.0711,W,1,09,1.0,72.6,M,52.5,M,,0000*77
$GPGSA,A,3,26,28,15,21,24,07,08,27,25,,,,1.9,1.0,1.7*3F
$GPRMC,130230.562,A,5556.1048,N,00319.0711,W,000.0,211.4,050608,,,A*71
$GPVTG,211.37,T,,M,0.00,N,0.00,K,A*3B
$GPGGA,130231.562,5556.1053,N,00319.0718,W,1,08,1.0,73.9,M,52.5,M,,0000*7A
$GPGSA,A,3,26,28,15,21,07,08,27,25,,,,,1.9,1.0,1.7*39
$GPRMC,130231.562,A,5556.1053,N,00319.0718,W,000.0,211.4,050608,,,A*73

Now I'm no expert on NMEA, but what appears to be the time code (or second count, at least) isn't going up in increments of one. It goes up in ones a few at a time, then skips a few seconds. This is more or less in line with the observed connect/disconnect cycle.

Also, the data it's getting seems to be valid - the location's right, at any rate.

Any other thoughts? Should pairing make any difference? What sort of event would cause BT to stop/start on the phone? Is it the BT device, the phone or the app that's stopping and starting BT?

I'm beginning to think I should just drive over my phone, too...

Thanks again

Fraser
 

Stephen

15:28
Thursday
5-Jun-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Fraser,

" One thing I did notice, sometimes the BT GPS doesn't appear when searching from within the app, whereas it always appears when searching via the phone's BT tools "

Yes, I sometimes find this too - I've never got to the bottom of this though I don't think its related to your disconnection issue (you might just have to refresh the list a couple of times if it doesn't find it on the first attempt).

" Should pairing make any difference? What sort of event would cause BT to stop/start on the phone? Is it the BT device, the phone or the app that's stopping and starting BT? "

Pairing shouldn't be necessary, this is only needed if you change the 'authenticate' string to 'true'. When working correctly it *should* just connect straight to the GPS device and hold the connection until manually disconnected.

Having said this, if the device is switched off or goes out of range, then after a while TMJ will sense that it has stopped receiving data and so will disconnect, wait a few seconds, then try to reconnect. (Generally this works quite well - I'm able to walk away from my GPS, safe in the knowledge that once I get back in range it will reconnect and carry on as normal).

It sounds like TMJ is getting a bit confused in your case. It is as though it thinks that the device has stopped sending data (as if it has been switched off or moved out of range), so it goes through the disconnect/reconnect cycle to try to re-establish the connection. I'm wondering if perhaps I can just extend the amount of time that it waits whilst receiving no data before it disconnects. Hopefully it will then have time to receive a bit more data which will reset the timer and prevent it from disconnecting.

If you'd like I can send you a test version (I'll send it to your registered e-mail address)?

Cheers,
Stephen
 

jonte

12:15
Tuesday
24-Jun-2008

The bluetooth connection between my phone and GPS are sometimes lost. Most of the time it works fine, but occasionally i notice that the connection is lost. I have a Nokia 6288 and a Holux M-1200. I also use the GPS-device with my handheld computer running TomTom, and there are never any problems with that connection. I therefore assume that the problem lies within the phone or TMJ.

Lately I have been paying attention the the event log and I have made a few observations. Generally the GPS is successfully reconnected after a lost connection, but sometimes it get stuck in a Starting BT; Stopping BT; cycle that does not seem to end.

The connecion to the BT GPS is never lost without several lines like these appearing first:

114612.339Err: java.lang.ArrayIndexOutOfBoundsException $GPGSV,4,4,13,51,,, @ GGSV;
114611.324Err: java.lang.ArrayIndexOutOfBoundsException $GPGSV,4,4,13,51,,, @ GGSV;
114611.316Err: java.lang.ArrayIndexOutOfBoundsException $GPGSV,4,4,13,51,,, @ GGSV;


I have never experienced a lost connection without these errors appearing in the log immediately before the lost connection. I often notice errors like these without the connection beeing lost, it seems to me that the connection is lost when there is an error every second for at least about 5 seconds. The actual numbers in the GPGSV-sentence may of course vary, but the errors only concern GPGSV. The phone and GPS-unit have of course been close to each other, so the problem should not be because they have been out of range.

I have no idea if these errors has anything with the connection problems to do, but it seems to be a connection in time at least.

Hope this helps!
Jonas
 

Stephen

9:11
Wednesday
25-Jun-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Jonas,

I've looked at the code where these errors are being generated and it seems to me that they are a side-effect of the connection between the phone and gps becoming corrupted for some other reason (rather than a cause of the disconnection itself).

How often would you say its doing this - is it completely random, or does it seem to do it a fairly similar interval after startup, for example? Also, when it gets stuck in the Starting/Stopping GPS loop, is it only possible to fix this by restarting TMJ. What happens if you restart the GPS instead?

Annoyingly, these bluetooth bugs seem to be the hardest ones to fix - its very difficult to narrow down where the problem lies, especially since the behaviour can be totally different with different handset/GPS combinations! Incidentally, I was never able to get to the bottom of the problems that Fraser had - I sent him a number of test versions, but we concluded that it might be a problem with the phone handset or GPS.

Cheers,
Stephen
 

jonte

10:06
Wednesday
2-Jul-2008

Hi Stephen!

Your engagement is very much appreciated.

I have been using the GPS with TMJ frequently over the last days and I have made some observations. When the connection is lost, TMJ often manages to re-establish the connection. The log look something like this:

Starting BT;
Stopping BT;
Resetting BT;
No BT data - disconnecting;


When TMJ manages to reconnect, it is always done on the first attempt! (as shown above) As soon as the Starting/Stopping GPS loop has begun the connection never is reestablished without me intervening. If I turn off and on the GPS, it immediately reconnects successfully. This time I could not reestablish the connection by restarting TMJ and swithcing off BT (and of course turning it back on again), I had to turn the GPS off and on. I do think that I have managed to reconnect by restarting TMJ before, without turning the GPS off and on, but I am not sure.

This weekend connection was lost twice without the java.lang.ArrayIndexOutOfBoundsException appearing first! I guess my previous post in this matter can be ignored regarding this aspect! :-) I can find no logic in when the connection drops. Sometimes it works for several hours and days without disconnecting, then it disconnects 10-15 minutes after startup twice the same day. This weekend connection was lost 4 times without TMJ managed to reconnect, so most of the time it works fine.

Regarding the java.lang.ArrayIndexOutOfBoundsException i talked about in the above post, I have found a definite pattern. The error only concerns GPGSV and only the fourth message (out of four). And the GPGSV message in the event log ALWAYS contain information about either sattelite 50 or 51, generally with no data in the fields for azimuth, elevation and signal. I have never seen satellite 50 or 51 appering in the satellites screen, so it looks like the ArrayIndexOutOfBoundsException appears every time the GPS reports data about satellite 50 or 51.

Cheers,
Jonas
 
 

Stephen

16:15
Wednesday
2-Jul-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Jonas,

Bit of a stab in the dark, but have you tried changing the bluetooth connection URL to set master=true as mentioned to Fraser earlier in this thread?

In GPS/Enter Manual Connection URL you should have a line similar to this:
btspp://longhexnumber:1;authenticate=false;encrypt=false;master=false

Just change the master=false to master=true. Might not have any effect, but from the little I understand about bluetooth, when two devices 'talk' to each other one of them has to be the 'master' and the other the 'slave'. By default the GPS device takes the role of 'master', but changing this line causes the phone to take this role, which might make the connection stay up a little longer. Doesn't seem to make any difference on my W800i, but worth a try...

Cheers,
Stephen
 

(You must be logged in to post a reply to this thread)