2

I add some detail to my question. I receive on my Xbee device a flow of GPS coordinates but I'm unable to read and stock these data on a buffer.

My Xbee device is connected to my laptop on a usb serial port, that's why I want to create a program java to read and use my data flow sending by the serial port.

I'm searching on internet some code example or tutorials , without enought advices for my understanding, or I just find some dead projects.

I found that it's possible to use jssc library or javax.comm (but I can't download the javax.zip on sun). Do you know an other better USB API ? Could you help me to understand how I can manage to read and stock my Flow of GPS cordinate ?

user3607632
  • 21
  • 1
  • 2

1 Answers1

4

Forget abut USB, it acts as transparent bridge. What you need is a way to read from the serial port. javax.comm is not (officially) available any more. I have been successfull dealing with the arduino serial port with the RXTX library.

First make sure you see the serial port on your dev machine. This might require to install a driver. Then use a terminal program to connect to the serial port.

Once this is working go on and get RXTX working.

Just in case: You can have only one connection at a time. Make sure that only one of IDE, terminal programm and RXTX is connecting to the serial port at the same time.

TheDoctor
  • 1,450
  • 2
  • 17
  • 28
BetaRide
  • 16,207
  • 29
  • 99
  • 177
  • OK thank you, and you worked with arduino IDE ? I'm not sure to understand, I have a xbib-u-dev so I'm not sure I can worked with the arduino serial port ? – user3607632 May 06 '14 at 12:54