Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to monitor serial port communication  RSS feed

 
abinla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to write to monitor serial port's I/O,this port is used by other application, how i can do this?thank in advance!
 
dan moore
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have not done this myself, so this is not gospel, but since you have no other replies, here goes. i would think it depends on whether you have code control of the other program...which i am guessing not.
if you have control, get the app to use enhanced versions of the javax.comm classes - there are various ways of "improving" them. the kinds of tasks involved would be subclassing and/or wrapping CommPortIdentifier and SerialPort to add monitoring to the standard javax.comm code.
if not, it depends on whether the application is (1) in java using javax.comm, or is (2) a native app.
(1) in java - some sort of hacking about with javax.comm and installing that instead of the default javax.comm implementation so that your new improved version is used.
(2) a native app - from java you'd have to make OS calls.
if portability of monitored platform is most important here, you could always go the hardware route and get something like Greenleaf's ViewComm (windows only that one, am afraid) and a funky rs-232 debug cable. www.gleaf.com for them.
hope this helps,
cheers, dan.
 
abinla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, dan!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!