0

I want to transfer a number from java program which is on laptop (means there is no rs232 protocol pin is provided) to a pic microcontroller(where essentially I have to used rs232) .Therefore here I require usb /rsr232 converter. Which Java library should I use ? Will it work with javax.comm library?

Mayur Patil
  • 120
  • 2
  • 8
  • Off topic for requesting software library. – mmmmmpie Feb 27 '15 at 18:26
  • Try it and see. Typically, the USB device will expose a serial port to the operating system, and Java should be able to communicate with it using javax.comm. – Aaron D Feb 27 '15 at 18:28

1 Answers1

0

The answer is it depends on the USB/RS232 converter you are using. Most that I have used will expose the serial port as a virtual com port device on your operating system (see page 8 of this PDF document). If that's the case, javax.comm will work fine. If not, you will have to use a proprietary API for the hardware which should be provided by the manufacturer. If you have hardware like this, I would strongly recommend replacing it with a class-compatible USB device.

Aaron D
  • 7,540
  • 3
  • 44
  • 48