Results 1 to 6 of 6
Thread: Serial Port
- 04-24-2007, 06:49 AM #1
Member
- Join Date
- Apr 2007
- Posts
- 2
- Rep Power
- 0
- 04-24-2007, 06:50 AM #2
Member
- Join Date
- Apr 2007
- Posts
- 2
- Rep Power
- 0
how can i access the serial port in remote system
- 04-24-2007, 12:21 PM #3levent Guest
Hi Radhika,
First of all i moved your thread to "New To Java" forum since it was not appropriate for "Java Announcements" forum.
Your problem has two parts:
1. Controlling serial port on a machine
For this part, you will need Java Communications API. Its installation can be a little bit problematic. It is important to find a working tutorial for it. I dont remember which one i used so you need to find your way yourself. But you can start with installation instructions there.
2. Accessing a serial port on a remote machine
After you set up Java Communications API on the remote machine, you will need to develop a server application because you need to control a remote machine and to do this, you should have both client and server.
For client-server programming you can use socket programming or RMI (Remote Method Invocation). If you want to use a web based interface, then you can use Servlets to develop your server application and use your browser as the client application.
Let us know if you have further problems..
- 11-15-2007, 08:20 PM #4
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
Does anybody implemented accesing serial port on a remote machine? Please share the information that would be really beneficial to me.
- 11-16-2007, 10:50 AM #5
Member
- Join Date
- Nov 2007
- Posts
- 5
- Rep Power
- 0
I also have an issue with serial comm API.
I am trying to write a JavaSE application using Swing to access the virtual COM port created when connecting a Modem aware device to the USB.
I can see data coming across via Hyperterminal and I want to write a hyperterminal type application to react to and filter messaging.
I have tried using the Comm API and followed in the API instructions to the letter.
I am using the following code in my JavaSE app:
{
...
private void initCommPorts() {
CommPortIdentifier portId;
Enumeration portList = CommPortIdentifier.getPortIdentifiers();
if (portList == null) {
System.out.println("portList is null");
}
else {
System.out.println(portList.toString());
}
String comPort = "";
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
System.out.print("Port found");
comPort = portId.getName();
System.out.println("Found port: " + comPort);
// Add COM port to visual object selection list
comChoice.addItem(comPort);
}
}
...
}
The issue is that this code never finds the COM port. The Enumeration is always empty.
Am I using the right API here. Can the Comm API be used to create a connection to the virtual COM ports in Windows XP?
Thanks guys - and sorry for my ignorance on this matter!
- 11-06-2009, 10:40 AM #6
Member
- Join Date
- Nov 2009
- Posts
- 1
- Rep Power
- 0
Similar Threads
-
Reading from Serial port!
By Dogge in forum New To JavaReplies: 2Last Post: 12-01-2010, 03:21 AM -
Accessing Serial port using JDK 1.6
By hasani6leap in forum Advanced JavaReplies: 5Last Post: 01-24-2009, 03:23 AM -
Access Serial port
By hasani6leap in forum Advanced JavaReplies: 0Last Post: 02-12-2008, 09:45 AM -
Writing to serial port (com1)
By Java Tip in forum Java TipReplies: 0Last Post: 02-05-2008, 09:02 AM -
serial port
By musiigedeo in forum Advanced JavaReplies: 0Last Post: 07-23-2007, 04:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks