• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Support for Serial Communications using Java  (Read 3476 times)
colinbes
Newbie
*

Karma: 0
Posts: 2


View Profile
« on: June 20, 2009, 09:37:26 AM »

I am looking to use the serial port on mini usb to collect information from serial enabled devices.
I have code already working in java using serialio's serialPort and native libraries on x86 platform (http-colon-slash-slash-serialio.com/products/serialport/serialport.php)
They do support various ARM processors but I am unable to determine which ones will work (if any).

Has anyone done any serial i/o work on plug using java or does anyone have any suggestions.

Thanks
Colin
Logged

karurosu
Global Moderator
Full Member
*****

Karma: 0
Posts: 116



View Profile WWW
« Reply #1 on: June 20, 2009, 10:17:45 AM »

The mini plug cannot be used for serial communication, since its hard wired to the serial console of the plug (output only)
You can do what you want using a simple serial to usb converter (like those using FTDI chips).

I dont see that serialport has support for ARM Linux, if they provide source code you may be able to compile the native drivers, otherwise you are out of luck. I did some serial development in java on x86, and I found that the best solution is to interface directly to the serial device, however, I am not sure if it supports high speeds, or what it supports, since all I needed was slow communication with a modem (AT commands).

Finally, java on the plug is not good (at least I haven't been able to get a VM installed), ubuntu has one precompiled, but I don't use ubuntu, so I can't say if performance is good.

Hope this helps.
Logged

colinbes
Newbie
*

Karma: 0
Posts: 2


View Profile
« Reply #2 on: June 21, 2009, 06:06:28 AM »

Thanks, I wasn't too sure on the mini-usb but knew I could default to usb-serial, but would still need some native library to access device via java.

I have java running on the plug with no issues and it's looking good so far (although I haven't peeped under covers).

If I find solution I will post it here.
Logged

karurosu
Global Moderator
Full Member
*****

Karma: 0
Posts: 116



View Profile WWW
« Reply #3 on: June 21, 2009, 11:13:44 AM »

there is no need for any native java driver, simply compile the kernel with usb<->serial support, the device will appear as a standard serial port (tty0, or something similar) and you can use it as a regular serial port, I am doing more or less the same, except the driver provides me with a ttyACM device (which is a serial port for cell phones), the access is done by running a program named stty which setups the serial port (rate, parity, etc) then all read/write is done like a regular file.
Logged

rexxmagnus
Newbie
*

Karma: 0
Posts: 6


View Profile
« Reply #4 on: November 28, 2009, 04:07:03 PM »

For reference, the rxtx library (http://users.frii.com/jarvi/rxtx/) works quite well with java. I've written software in the past that runs on all platforms supported by the library to control an automated photographic rig. As already mentioned though, since linux has many of the devices required for serial comms already built in, it's quite possible that it's easier to use those.
Logged

Pages: [1]
Print
Jump to: