icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • bluetooth / serial / internal GPS, simulator
  • offline raster maps (common grids and projections)
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • ... and more
  • MIDP and Symbian phones
  • Blackberry
  • Android
  • Windows Mobile 5.x/6.x
  • Windows Phone Store  (FAQ)
Visit our wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/╚esky)(╚esky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
JavaME tool for static navigation on bluetooth devices
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Fri Nov 21, 2008 4:30 pm    Post subject: JavaME tool for static navigation on bluetooth devices Reply with quote

I've written a small tool to toggle static navigation on devices connected by bluetooth. It should run on any phone or PDA that can handle JavaME applications.

It looks for (known) bluetooth devices and lets you choose one of them. You can then select "SN off" or "SN on" and it will send the appropriate commands to the device.

Please note that you can actually render your device useless if something goes wrong. Check if you can reset your device before you use the tool.

I would be glad to add any additional commands or other improvements you may want.

This is my first experiment with JavaME and bluetooth and you can expect some bugs...

Update: The old version's method of searching for bluetooth devices did not work on all phones. The new version attached to this post should work better.



nosn.java
 Description:
source code

Download
 Filename:  nosn.java
 Filesize:  8.07 KB
 Downloaded:  141 Time(s)


nosn.jad
 Description:
JAD file, in case you need one

Download
 Filename:  nosn.jad
 Filesize:  212 Bytes
 Downloaded:  166 Time(s)


nosn.jar
 Description:
copy this to your phone or PDA

Download
 Filename:  nosn.jar
 Filesize:  5.43 KB
 Downloaded:  256 Time(s)



Last edited by Guido on Sat Aug 08, 2009 4:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
temptrekbuddy



Joined: 27 Nov 2006
Posts: 193
Location: Poland

PostPosted: Fri Nov 21, 2008 10:21 pm    Post subject: Reply with quote

SPAM thanks a lot for your work. Great if sometimes you need the module interchangeably between car and trekking. I'll report on my result.
_________________
Automatic Free 2GB backup -> Mozy; with this link 256MB extra.
Back to top
View user's profile Send private message
temptrekbuddy



Joined: 27 Nov 2006
Posts: 193
Location: Poland

PostPosted: Sat Nov 22, 2008 4:01 pm    Post subject: Reply with quote

Can't use it because a connection is not established.

One way of doing it is launching trekbuddy, starting communication with your module, then minimizing the app, and launching the nosn app. My phone however doesn't handle multiple java apps.

_________________
Automatic Free 2GB backup -> Mozy; with this link 256MB extra.
Back to top
View user's profile Send private message
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Sun Nov 23, 2008 3:32 pm    Post subject: Reply with quote

Is your bluetooth device not shown at all? Or ist nosn not able to connect after you select your device? Could there be a problem with missing permissions for bluetooth connections?
Back to top
View user's profile Send private message
temptrekbuddy



Joined: 27 Nov 2006
Posts: 193
Location: Poland

PostPosted: Sun Nov 23, 2008 3:43 pm    Post subject: Reply with quote

"No known devices retrieved" is displayed in Nosn.

1) I'm Testing on a SE W800i

2) Nosn permissions are set to always ask

3)The phone doesn't have problems with co3nnecting to the bluetooth module using Trekbuddy.

_________________
Automatic Free 2GB backup -> Mozy; with this link 256MB extra.
Back to top
View user's profile Send private message
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Mon Nov 24, 2008 7:50 am    Post subject: Reply with quote

Great, the forum does not notify me when replies are posted. Please excuse the resulting delays.

I do not know how TrekBuddy discovers devices, but it is much faster than any method I tried. Hoping to speed up the process, I only look for known (already registered) devices, but it still takes a lot of time.

I am using SE K610i, by the way.

In the original version I only read "preknown" devices. I just added a request for "cached" devices, maybe this will work on your phone. Please check if the attached version is better. It will look for "preknown" devices first and then for "cached" if no preknown were found.

And I hope to find out how other programs do their discovery of devices.


Last edited by Guido on Sat Aug 08, 2009 4:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
tobbes



Joined: 30 Jan 2008
Posts: 12

PostPosted: Fri Nov 28, 2008 8:55 am    Post subject: Reply with quote

Hello Guido,

nice idea - to set the BTdevice in SN by mobile.

Will it work with all bluetooth devices or shoud we start a list with known "good" devices?

I do not want to kill my BTmouse Wink


Thanks Tobbes
Back to top
View user's profile Send private message
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Thu Dec 04, 2008 9:24 am    Post subject: Reply with quote

Sorry for the late answer, I seem to have problems with the forum's email notification.

I only know that it works with my own device. I played around with SirfDemo and actually managed to break it. I was lucky that my device does a full reset after removal of its batteries. Other devices may store the communication parameters permanently and stay dead forever. The good news is that I never heard of such a device. They usually reset when the batteries are removed or run empty.

Have you tried SirfDemo? If that works, the savest procedure would be to log the SirfDemo's communication (there is an option for that) and send the log to me. That way I can use the exact same commands in my tool, reducing the risk for you.

You could search for informations about other people's experiences with your device and SirfDemo.
Back to top
View user's profile Send private message
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Sat Aug 08, 2009 10:19 am    Post subject: Reply with quote

I updated the little tool to improve compatibility with some phones. See the attachments of the top post.
Back to top
View user's profile Send private message
routi



Joined: 15 Jul 2009
Posts: 16
Location: AUSTRIA

PostPosted: Sat Aug 08, 2009 3:29 pm    Post subject: nosn instructions Reply with quote

Many Thanks to Guido for updating the tool!
Now it works with my SE K750i and the Motorola T805 and I can use it for geocaching an walking.

Enclosed a short instruction of nosn:



Nosn Instruction.txt
 Description:
nosn instruction

Download
 Filename:  Nosn Instruction.txt
 Filesize:  1.9 KB
 Downloaded:  140 Time(s)


_________________
Nokia 5800
GPS: Transsystem i-Blue 737A+
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 4320

PostPosted: Wed Aug 19, 2009 9:46 am    Post subject: Tool to switch on/off SBAS/EGNOS/DGPS Reply with quote

Would it be possible to enhance this tool? I have a Holux GPSlim236 GPS receiver and it forgets some settings all few days. Then I have to switch it on these settings again with the SIRF Demo software on a computer. I have searched a lot on the internet but I could not find any J2ME tool which can switch on/off SBAS of the receiver. Since this tool can handle SN it should be easy to enhance it that it will be able to handle SBAS as well.

If this tool could do it, it would be great! :P
Back to top
View user's profile Send private message Visit poster's website
Guido



Joined: 16 Oct 2008
Posts: 16

PostPosted: Wed Aug 19, 2009 9:55 am    Post subject: Reply with quote

If SirfDemo can do it, then I should be able to include it in nosn. Can you activate logging in SirfDemo, switch SBAS on and send me the log? And then you would have to do the same for switching SBAS off again.
Back to top
View user's profile Send private message
guest



Joined: 08 Oct 2006
Posts: 4320

PostPosted: Wed Aug 19, 2009 1:43 pm    Post subject: Reply with quote

Dear Guido,

Thanks for your great support. My Holux GPSlim236 receiver can easily be programmed with Sirfdemo. Therefore it should work with your software as well.

The firmware I use on this receiver is quite fine except just one parameter. With the factory settings the DGPS source is set to "None" unfortunately. That means that no DGPS corrections (EGNOS/WAAS) are done and the position is not that precise than with DGPS corrections. To get DGPS (EGNOS) working I just have to set one parameter by setting the DGPS source to "SBAS Channel" with Sirfdemo.That's all. Unfortunately the receiver forgets the settings every few days and seems to go to factory settings and I have to do the settings again and again with my computer. It would be great it it could be done with my mobile phone (SE K750i) without a computer, just with your great software.

Therefore the following two Sirfdemo commands would be needed needed to switch the DGPS in the receiver on or off:

ON: DGPS Source: SBAS Channel (EGNOS/WAAS)
OFF: DGPS Source: None

In the following please find the logging I just did during setting first DGPS Source to SBAS Channel (EGNOS/WAAS) and afterwards DGPS Source to None.

SiRFDemo Version 3.61 log file opened 08/19/09 15:17:25

Tx: 0xA0A2000284000084B0B3
Tx: 0xA0A2000298000098B0B3

Tx: 0xA0A20006A88500000000012DB0B3
Ack: MID_POLL_CMD_PARAM
Tx: 0xA0A20007850100000000000086B0B3
Ack: MID_DGPSSourceControl

Tx: 0xA0A20006A88500000000012DB0B3
Ack: MID_POLL_CMD_PARAM
Tx: 0xA0A20007850000000000000085B0B3
Ack: MID_DGPSSourceControl

Tx: 0xA0A20018810201010001050105010101010100010001000100012580013FB0B3
Sent MID_SetNMEAMode Message: Enable

Log file closed 08/19/09 15:18:01

For me it seems that the following commands are necessary:

DGPS Source setting to SBAS Channel (EGNOS/WAAS)
Tx: 0xA0A20006A88500000000012DB0B3
Ack: MID_POLL_CMD_PARAM
Tx: 0xA0A20007850100000000000086B0B3
Ack: MID_DGPSSourceControl

DGPS Source setting to None
Tx: 0xA0A20006A88500000000012DB0B3
Ack: MID_POLL_CMD_PARAM
Tx: 0xA0A20007850000000000000085B0B3
Ack: MID_DGPSSourceControl

For me personally just the above mentioned function would be enough.

But I am sure many other people would like to have additional functions from Sirfdemo integrated into your great software.

For example:
Update Rate in NMEA Protocol (0, 1 or 5 seconds):
GGA
GLL
GSA
GSV
RMC
VTG

Initialize Data Source:
Factory Reset
Cold Start
Warm Start

Set Low Power

ect.

Maybe SN and DGPS Source are just the beginning for a new Sirfdemo software running on J2ME? ;-)

It would really be great if you could integrate the command for setting the DGPS source to SBAS Channel.

Regards
Dieter from Austria
Back to top
View user's profile Send private message Visit poster's website
guest



Joined: 08 Oct 2006
Posts: 4320

PostPosted: Thu Aug 20, 2009 7:59 am    Post subject: Reply with quote

Command A0A2000298000098B0B3 will poll the nav parameters.

Example:
Polling Navigation Parameters
AltMode: auto
AltSource: last KF alt
Altitude: 0
DegradedMode: Disabled
DegradedTimeout: 30 s
DRTimeout: 10 s
TrkSmoothMode: disabled
StaticNav: disabled
3SV LSQ: enabled
DOPMaskMode: disabled
ElevMask:5.0 deg
PwrMask: 15 dBHz
DGPSSrc: None
DGPSMode: auto
DGPSTimeout: 0 s
Continuous power enabled
User tasks enabled, period = 100
MaxAcqTime = 120000 ms; MaxOffTime = 30000 ms

If this command will be implemented most important receiver settings could be seen.
Very Happy
Back to top
View user's profile Send private message Visit poster's website
guest



Joined: 08 Oct 2006
Posts: 4320

PostPosted: Sat Aug 29, 2009 4:33 pm    Post subject: Reply with quote

Is the implementation of SBAS activation already ongoing?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group