connect java to gps device

Discussion in 'Java' started by ownowl, Dec 4, 2008.

  1. ownowl

    ownowl Guest

    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
    ownowl, Dec 4, 2008
    #1
    1. Advertising

  2. On Thu, 04 Dec 2008 17:36:35 +0100, ownowl wrote:

    > 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


    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
    Martin Gregorie, Dec 4, 2008
    #2
    1. Advertising

  3. ownowl

    ownowl Guest

    Martin Gregorie a écrit :
    > On Thu, 04 Dec 2008 17:36:35 +0100, ownowl wrote:
    >
    >> 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


    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
    ownowl, Dec 4, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan
    Replies:
    1
    Views:
    648
    e3matheus
    Jan 3, 2011
  2. Amjad
    Replies:
    0
    Views:
    414
    Amjad
    Jan 24, 2008
  3. Amjad
    Replies:
    0
    Views:
    358
    Amjad
    Jan 25, 2008
  4. Amjad
    Replies:
    0
    Views:
    317
    Amjad
    Jan 26, 2008
  5. Puppet_Sock

    Re: read from gps device

    Puppet_Sock, Jan 4, 2010, in forum: C++
    Replies:
    1
    Views:
    366
    Rolf Magnus
    Jan 4, 2010
Loading...

Share This Page