File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading/writing from/to serial port

 
anitha meena
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am trying to write java application which read/write data from/to serial port , I have found this application in the net
(http://www.captain.at/howto-java-serial-port-javax-comm-rxtx.php) which is a very good example.

According to the logs I am able to write into the port but am not able to read from the port..

Any one can help to fix the issue




WriteReadSerialPort.java







 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have anything plugged into the port?
 
anitha meena
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe Ess,

Thanks alot for your , I Have nothing is plugged into the port.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If nothing is plugged in, you can't really read anything. You may be able to set your port to local loopback but it's been a long time since I've worked with serial ports and I've never used RXTX to do it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic