PCMCIA and COMM API

C

Christian Marko

Hi!

Does anyone have experiences with the COMM API and the usage of the
PCMCIA port? With the COMM API the PCMCIA ports should also be found,
or not?

I have a PCMCIA port on my notebook, but this port won't be found, by
the appropriate class of the COMM API. As i read in other posts, the
port should be found. Can anyone help me?

Regards
Chris
 
J

JScoobyCed

Christian said:
Hi!

Does anyone have experiences with the COMM API and the usage of the
PCMCIA port? With the COMM API the PCMCIA ports should also be found,
or not?

I have a PCMCIA port on my notebook, but this port won't be found, by
the appropriate class of the COMM API. As i read in other posts, the
port should be found. Can anyone help me?

Regards
Chris

I would hardly believe the PCMCIA port could be found by the COMM API:
"The Java Communications API contains support for RS232 serial ports and
IEEE 1284 parallel ports" (http://java.sun.com/products/javacomm/index.jsp)
 
C

Christian Marko

JScoobyCed said:
I would hardly believe the PCMCIA port could be found by the COMM API:
"The Java Communications API contains support for RS232 serial ports and
IEEE 1284 parallel ports" (http://java.sun.com/products/javacomm/index.jsp)

OK, but i use a RS-232 serial PCMCIA card, where to the PCMCIA card 4
RS-232 ports are connected. These ports are seen by the OS (Win98,
W2K, WinXP) and listed as COM ports, but not by the COMM API.

Does you or anyone else know any alternative to the COMM API?
 
P

Paul Lutus

Christian said:
OK, but i use a RS-232 serial PCMCIA card, where to the PCMCIA card 4
RS-232 ports are connected. These ports are seen by the OS (Win98,
W2K, WinXP) and listed as COM ports, but not by the COMM API.

Does you or anyone else know any alternative to the COMM API?

Your PCMCIA serial interface must be handled by the native OS. It cannot be
addressed directly by Java. Once it has the appropriate native driver, it
may appear as a serial interface, but Java cannot do the first part for you
by itself.
 
J

JScoobyCed

Christian said:
OK, but i use a RS-232 serial PCMCIA card, where to the PCMCIA card 4
RS-232 ports are connected. These ports are seen by the OS (Win98,
W2K, WinXP) and listed as COM ports, but not by the COMM API.

Does you or anyone else know any alternative to the COMM API?

Oh ! That's different. If it is a PCMCIA card that add serial ports,
then yes they should be found by the COMM PAI (provided these ports are
listed in the Hardware/Device Manager, which is the case as I read you).
Try the sample code of the COMMAPI to simply list the ports seen Java.
It should list the Parallel port and the serial ports. All
Virtual/Emulated Serial ports should appear (I can list the Serial Port
created by my BlueTooth dongle, or I use to emulate a serial Port other
InfraRed). Also if you have an internal modem, it should list the
virtual serial port (/usually/ COM3).
The following code with print the list of Serial/Parallel port if COMM
API is correctly installed:
<code>
public void listPorts() {
Class.forName("com.sun.comm.Win32Driver")
Enumeration list = CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier po;
while(list.hasMoreElements()) {
po = (CommPortIdentifier) list.nextElement();
if(po.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.println("Serial port found: " + po.getName());
}
else if(po.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
System.out.println("Parallel port found: " + po.getName());
}
}
}
</code>

To have a valid COMM API installed:
1. Find the default path of the java.exe (usually C:\Program
Files\Java\JRE\bin\java.exe on Windows, but check yours): JAVA_HOME
2. in JAVA_HOME\bin put win32comm.dll
3. in JAVA_HOME\lib put the javax.comm.properties
4. in JAVA_HOME\lib\ext put the comm.jar

That's all I can help :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top