connect java to gps device

O

ownowl

Hello

for an java application runnig on PC or tablette pc under XP or vista
with java 1.5 or 1.6, I must draw some information get by a GPS device.
I looking for around that since many hours without any success.

I use a gps receiver (tomtom wireless gps mk2) and try to connect this
receiver to my notebook via a bluetooth usb key. I think the connection
work, on the windows bluetooth device, the tomtom wireless is visible,
connected on COM4 (output) and COM5 (input). But I don't known how I can
get the data from the receiver.

I am new in this area (bluettoth, wireless,..), and I don't know what
the best approach is. What api I must use, and so forth.
Should I try to read the serial port COM5, or work with bluetooth
directly, or maybe another stuff ?


I tried some code found on the net beginning by :

LocalDevice local = LocalDevice.getLocalDevice();

but I get :
ax.bluetooth.BluetoothStateException
at
com.sun.kvem.jsr082.bluetooth.LocalDeviceImpl.<init>(LocalDeviceImpl.java:185)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:94)

thanks a lot
Olivier
 
M

Martin Gregorie

Hello

for an java application runnig on PC or tablette pc under XP or vista
with java 1.5 or 1.6, I must draw some information get by a GPS device.
I looking for around that since many hours without any success.
This is the best general GPS and NMEA 0183 reference I know:

http://vancouver-webpages.com/peter/

There is a lot of good information on the site though it is a bit
disorganised. In summary:

- Modern GPS units send information using the NMEA 0183 protocol (4800
baud, ASCII encoded 'sentences'. Sentences are CRLF terminated lines.
Each starts with a sentence ID followed by a CSV list of values: the ID
defines the number and order of values in each sentence type. Every
modern GPS uses NMEA 0183 for the received data stream.

- The other port will be used for configuring the GPS, but unfortunately
this data stream is usually in a proprietary format, so you'll need the
technical manual for the GPS if you need to write to it.

I'd suggest that initially you use a comms utility to accept and list the
incoming data stream. You'll probably need something that can set baud
rate, data bits, stop bits and parity, so Kermit might be as good a
choice as anything.

Move on to writing Java when you've got that bit right and know what
serial port settings are required. You'll also know what sentences your
GPS outputs, what order it sends them in and at what intervals.
I use a gps receiver (tomtom wireless gps mk2) and try to connect this
receiver to my notebook via a bluetooth usb key.
The following may be helpful:

http://www.pocketgpsworld.com/tomtom-bt-gps-mkii.php

I suspect you'll be into JINI territory unless you can get reasonable
results with javax.comms or the RXTX package. and one or other CVS
packages to parse the sentences as they arrive.

I can't help more: I've used Linux utilities to examine the data coming
off a Garmin GPS-35 (blind GPS with a serial connection) but have never
needed to write programs to process the incoming sentences.

HTH
 
O

ownowl

Martin Gregorie a écrit :
This is the best general GPS and NMEA 0183 reference I know:

http://vancouver-webpages.com/peter/

There is a lot of good information on the site though it is a bit
disorganised. In summary:

- Modern GPS units send information using the NMEA 0183 protocol (4800
baud, ASCII encoded 'sentences'. Sentences are CRLF terminated lines.
Each starts with a sentence ID followed by a CSV list of values: the ID
defines the number and order of values in each sentence type. Every
modern GPS uses NMEA 0183 for the received data stream.

- The other port will be used for configuring the GPS, but unfortunately
this data stream is usually in a proprietary format, so you'll need the
technical manual for the GPS if you need to write to it.

I'd suggest that initially you use a comms utility to accept and list the
incoming data stream. You'll probably need something that can set baud
rate, data bits, stop bits and parity, so Kermit might be as good a
choice as anything.

Move on to writing Java when you've got that bit right and know what
serial port settings are required. You'll also know what sentences your
GPS outputs, what order it sends them in and at what intervals.

The following may be helpful:

http://www.pocketgpsworld.com/tomtom-bt-gps-mkii.php

I suspect you'll be into JINI territory unless you can get reasonable
results with javax.comms or the RXTX package. and one or other CVS
packages to parse the sentences as they arrive.

I can't help more: I've used Linux utilities to examine the data coming
off a Garmin GPS-35 (blind GPS with a serial connection) but have never
needed to write programs to process the incoming sentences.

HTH

Martin, thanks a lot for your reply

It was very usefull, and drove me to use a library (gpsylon : java +
native) that show me the gps point of my desk. I do not see the light
yet, but it is a very interresting first step.

Olivier
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top