Javacomm
Hello
I'm trialing javacomm api under Windows 2000. The method getPortIdentifiers() returns nothing.
Please help.
1. When installing the product, if you are using Java 1.2 or later, make sure you follow the instructions in the file jdk1.2.html and not the ones in Readme.html.
2. Also make sure you install the files into the location used by the JRE as well as the JDK.
3. Check your hardware to make sure that you actually do have some serial ports enabled.
Similar Messages
-
Where to find JAVACOMM 3.0 please ?
Where Download API JAVACOMM 3.0 ?
i´m search a lot of hours, at oracle site and google, and NOTHING !
is so dificult to understande the oracle site !
i onley found the Category download ... !
Anyone have any Link to download JAVACOMM 3.0 ? (please, dont send me the download category page !)
thanxis so dificult to understande the oracle site ! Luckily Google makes it easy.
Are you talking about the API (to compile only) or do you want an implementation (to also execute)?
There is no reference implementation for JCOMM 3.0. Your only option at the moment is a third party implementation. But is there a reason why you specifically want the 3.0 spec? Is a package like RxTx not an option for you (which as far as I can tell is based on the 2.0 spec)?
http://rxtx.qbang.org/wiki/index.php/Main_Page -
Javacomm read/write problem
Hello all, i have successfully installed javacomm package in my computer and i can enumerate all available ports. My problem is between the read - write communication. By running the SimpleRead first and then the SimpleWrite i got a "Port Already in use" which sounds normal to me, so i connected 2 pc's with a serial cable and runned one of sun's samples on each.
Step 1. SimpleRead waits for data on COM1
Step 2. SimpleWrite(on other pc) sends some data from COM1
Both COM1's are connected with that serial cable but seems no data coming. Am i doing something wrong? I tried same thing with VirtualPC but still no data arriving.
Any help appreciated. ThanksHello all, i have successfully installed javacomm
package in my computer and i can enumerate all
available ports. My problem is between the read -
write communication. By running the SimpleRead first
and then the SimpleWrite i got a "Port Already in
use" which sounds normal to me, so i connected 2 pc's
with a serial cable and runned one of sun's samplesAre you using a terminal the opens the port?
Without any ambiguity whatsoever,
"Port Already in use" means
something else has already opened the com port and I can say the
COMM API. works because I use it all the time with GPRS board.
ie:
https://hyperview.dev.java.net/source/browse/hyperview/www/comm/SerialHandler.java?rev=1.2&view=markup
Crossing pins 2 & 3 will only redirect your output/input
but will not cause the the port to be in use Jos.
(T) -
Hi all,
I've got some troubles using the JavaComm API. I'm accessing a hardware device connected with USB. A virtual port is provided which can be accessed identically as a serial port. Communication works fine. However, when I break the connection (by separating the plug from the port), I get an Error "Port currently owned by Unknown Windows Application" next time I'd like to establish a connection. Even if I close my application the port isn't released and a reboot is necessary.
Does anyone has an idea? Thanks in advance!i have a similar problem but only when using a usb-serial convertor cable. when i close the port - the operating system does not release the com port. next time i try to connect i get the PortInUse exception. did you manage to solve this problem?
-
Hi,
I use the JAVACOMM API and I know how to read/write data on the serial port RS232. I would like to send command in ASCII to my robot.
I don't understand how to send ASCII command.
If I want to send <ACK> <CR> <LF> : I must send out.print("ACK CR LF") or
out.print(006 013 010) with the ascii code ??????
Thank you very much if someone can help me.
Best regards.
[email protected]
J.PONS.out.println("ACK CR LF") will print the string "ACK CR LF",
I think you're looking for something more like
out.writeChar(6); if you're using dataOutputStreams for example. This should write the unicode character 6 which should be ACK
either that or out.print((char)6); should probably do it if you're using some other kind of print stream...I'm not even sure you need to cast that.
Hope this helps, good luck with the robot, sounds cool! -
Javacomm api on win32 platform
Has sun dropped support for the win32 platform with the Java Communications API? The only place I can find to download javacomm is at http://java.sun.com/products/javacomm/index.jsp and on that page it says "Implementations of the API are currently available for Solaris SPARC, Solaris x86, and Linux x86." and there is no download for a win32 platform. What happened? How can I get javacomm on my windows system?
javax.comm 3.0 has replace javax.comm 2.0:
Sun is no longer offering the 2.0 release of javax.comm, since 3.0 Update1
contains important bug fixes allowing to better support it..
javax.comm 3.x offers new conveniences for the the user, as well as
improvements to the portmapping architecture and support for our
Sun Ray thin client platform, with no change to the core API or functionality.
Among the features available with javax.comm 3.0 is an interactive serial
port tool, which is helpful in basic diagnosis of serial port connectivity.
Javax.comm for Windows have been EOLed:
A Windows port of javax.comm is not currently offered by Sun. There has
not been sufficient demand to justify supporting javax.comm on Windows,
particularly considering that javax.comm for Windows is available from
other sources, such as http://www.rxtx.org.
The Windows build of javax.comm previously posted on Sun's Software
Download Center was finally pulled because support has not been offered
for years, nor has the code been built or tested for that long. Further, the
JVM the Windows port was built on was long ago EOLed, and, finally , here
were reportedly incompatible change in the Windows platform itself.
Java Community Process:
As with any Java extension API, the community is free to implement it on
any platform and make it available along with the proper disclaimers.
Certification of a platform port is available for most javax extension APIs
through the Java Community Process (http://www.jcp.org) by passing a
compatability test, among other things, but since javax.comm was created
prior to the Java Community Process, certification may not be a tennable
option and probably won't be an issue for most users. -
can someone tell me how to get java comm API because it doesnt have installer for windows?
Ref: http://forum.java.sun.com/thread.jspa?forumID=17&threadID=687821
you can get the 2.0 version with the following link: http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=7235-javacomm-2.0-spec-oth-JSpec&SiteId=JSC&TransactionId=noreg
>
BTW, a Windows port of javax.comm is not currently offered by Sun. Among the reasons the previous edition of javax.comm for Windows was EOLed are that the Windows platform itself changed in incompatible ways, and the Windows port of javax.comm depended on an EOL'ed version of the JVM. -
I need the ibm-javacomm-win32-x86.zip, badly, asap
guys can anyone tell me where i can download the ibm-javacomm-win32-x86.zip, i really need it asap,
i need it because im using java.comm api with an applet and due to incompatibilities it is not working..
they said that ibm-javacomm-win32-x86.zip will solve this problem
but as of now the website where i can download it is not working..
can anyone help me find it
or if anyone has the file can somebody just email it to me
here is my email add..
[email protected]
tnx.ftp://ftp.software.ibm.com/software/retail/poseng/jpos/ibm-javacomm-win32-x86.zip
Is that what you're looking for? If so, I found it by googling ibm-javacomm-win32-x86.zip:
http://www.google.com/search?q=ibm-javacomm-win32-x86.zip
The first hit was a thread on ibm's site, and the last post linked to this: http://www-1.ibm.com/support/docview.wss?uid=pos1R1001497, which had the link to the zip towards the bottom.
Took all of 3 minutes total, probably less time than it took to post this thread. -
Hi all!!
I'm programming a communication module with javacomm. My module is embeded in a big class as a method. I have a problem when I try to read from the serial port and there's nothing connected, there are no data. In that moment the program failt and get blocked. I don't know how to do to avoid this problem.
I think a solution will be to put a SerialEventListener but I don't know how it work. I mean, I think it has to be defined as a new method, when there are data in the port, as I have notifyOnDataAvailable(true), an event occurs and then if I have the EventListener the event is treated and I can read. But, when the read has finished, the program will continue from the instruction that was executing when the event occur?
I don't know if someone has undestood my problem, because is a bit hard for me to explain it in english and without showing the code, but I'd be very glad if someone could help me.
Thank's a lot
Gio-buttermanI'm programming a communication module with javacomm. My module is
embeded in a big class as a method. I have a problem when I try to read from
the serial port and there's nothing connected, there are no data. In that moment
the program failt and get blocked. I don't know how to do to avoid this problem.Set a line timeout when you open the serial port; something like this:serialPort= (SerialPort)portId.open(APPLICATION_NAME, TIME_OUT);If, after TIME_OUT milliseconds nothing has been returned, the read will
timeout and return a -1 value. Check the API docs.
kind regards,
Jos -
Sun - JavaComm download for windows Files Missing !
Hi all,
Okay, Sun doesn't support the javacomm for windows...but
the lastest version comm2.0.3.zip has not the "javax.comm.properties" e win32comm.dll.
I would like to have these files. I need these files.
Thank you very much.Hi pri.indya
Please refer the below KB Doc : http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
or you can download the trial from below link : http://prodesigntools.com/adobe-cs6-direct-download-links.html
Please follow the instructions carefully -
Javacomm serial port created after JVM started
Hello all,
I am playing with bluetooth and Java for a project and have run into a brick wall.
My bluetooth adaptor (USB) uses rfcomm to create a virtual serial port to my phone.
After exhaustive searching, I have not been able to find a Java API for a usb bluetooth dongle that will do this so I am having to use Runtime.exec to shell the program that will create the connection.
The device that is created is /dev/rfcomm0, and I have created a symlink from /dev/ttyS1 to this so JavaComm can see this as /dev/rfcomm0 is not considered valid (I only have one com port in my PC so ttyS1 does not normally exist).
When Java is started, /dev/ttyS1 does not exist (using the javacom to access it throws a NoSuchPortException) - this is expected. The problem is once the port is created, I still get the same exception. I can confirm that the port has been created sucessfully as minicom is able to communicate with the phone.
I have tried putting the javacomm code in a new class, and creating a new instance of this class once the port does exist, but this does not work. I have also used the enumerator to check all ports that are known and /dev/ttyS1 does not appear in the list.
If i run the command to create the port in a console before starting java then everything works althought this is obviously not acceptable as a final solution.
Does anyone have any thoughts / suggestions what might help fix this?
Cheers,
-JeffMorning,
don't try to get the JavaComm class loaded before the rfcomm process has finished.Unfortunatly the rfcomm process will not terminate whilst the port is open, which makes things much harder.
Here are some code snippets, the connect method is called as soon as I start my java program. It starts a thread which invokes the rfcomm commands. If the process terminates immediatly (p.waitFor() only waits a moment) then the connection has not been made, and runState is set to -1 which terminates the while loop in connect() and returns false.
If the connection is made sucessfully, the process doesn't terminate, so the only way for the connect() method to return is if validPort returns true.
The portListener class is the only one that uses javax.comm, and each time I call it I create a new instance - which I presume would re-scan for avaliable serial ports.
If the serial port is not avaliable, an exception is thrown, so it returns false, if no exception is thrown it returns true.
BTDevice.java
public boolean connect(String addr)
runState = 0;
address = addr;
start();
while (runState == 0)
if ((pl = new PortListener(serialPort)).validPort())
runState = 1;
return runState == 1;
public void run()
String s="";
try
p = Runtime.getRuntime().exec("/usr/bin/rfcomm connect rfcomm0 " + address);
p.waitFor();
catch (Exception e){}
runState = -1;
PortListener.java
public boolean validPort()
try
CommPortIdentifier.getPortIdentifier(serialPort);
return true;
catch (Exception e)
return false;
Unfortunatly this does not happen, and even once the connection is made, validPort still returns false, as a NoSuchPort exception is thrown.
However, if I put in a Thread.sleep(60000); between the start() and while (...) in connect() - so the first time an instance of PortListener is created the port does definatly exist - everything is fine.
This must mean that as soon as javax.comm is initialised for the first time within a JVM, it stores all the known ports etc. so any other time it is used (even within a new instance of a class) it uses what it found out the first time and doesn't scan for new ports.
I do not want to leave in Thread.sleep(...) as the connection time can vary, if the phone is set to auto-connect it takes 2-3 seconds, if it isn't it can take 15 seconds before the user looks at the phone.
Any thoughts on how to make it re-scan for avaliable ports?
Cheers,
-Jeff -
Hi everyone
i've downloaded javacomm from http://java.sun.com/products/javacomm/index.jsp, and i have added the library in my project (i use netbeans on linux), now i can import javax.comm package.
How can i connect to my RS232 port send data in text format and read what the device send to the pc?
thanksthanks to your reply
i-m getting this error when i try to execute the SimpleWrite example
bash-3.00# pwd
/programmi/commapi/examples/Simple
bash-3.00# ls
README SimpleRead.class SimpleRead.java SimpleWrite.class SimpleWrite.java
bash-3.00# /opt/jdk1.5.0_06/bin/java -classpath . SimpleWrite
Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: no LinuxSerialParallel in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: isDevLink
at com.sun.comm.Unix.isDevLink(Native Method)
at com.sun.comm.PathBundle.add(PathBundle.java:108)
at com.sun.comm.PlatformPortBundle.<init>(PlatformPortBundle.java:44)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
at SimpleWrite.main(Unknown Source) -
Hi !
I have an issue with javacomm under xp( it works well under 2000) ? Did anybody have an idea of the problem ? Is it an installation issue : for example, comm.jar in jre/lib/ext, win32comm.dll in jre/bin, javax.comm.properties in jre/lib
Thank you,
LaurentI have experienced this many times.
What anti-virus solution are you running in Windows?
Users have experienced crashes and blue screens of death from Norton products. Norton has resolved these issues in their 2009 product line. I would only recommend Norton 2009 products, Kaspersky, and AVG for anti-virus solutions.
I have noted a link, with further information, for you to check out.
http://discussions.apple.com/thread.jspa?threadID=1587773&start=0&tstart=0
Have you formatted your Windows partition as NTFS, or has it been formatted as Fat 32?
Fat 32 will not handle file sizes of 3.5 GB or larger, and, overall, it seems to always cause issues.
Have you tried a SMC reset?
http://support.apple.com/kb/HT1411
Good luck, and let us know! -
JavaComm 2.0 - time between bytes
Does anyone know how can i specify the "time between bytes" with javacomm?
I'm communicating with serial port, using the simple write example of javacomm.Hi,
Can you clarify that you want to send a break time to the port i.e when you send a byte of stream to the port, you would send a break signal?
Regards,
Alan Mehio
London,UK -
Installing Javacomm in Sun Studio One?
Is it possible to use javacomm with sun studio one?
Ofcourse, it's just a JAR file like any other. Just mount the JAR file in Sun One Studio. Read the documentation (help pages) of Sun One Studio.
Jesper
Maybe you are looking for
-
Bootcamp, rEFIt and virtual
I have a MacBook with OS X Lion, I installed Windows 7 via Boot Camp, added Linux (Backtrack) using rEFIt. I now access OS X, Windows and BackTrack via rEFIt's boot menu. When I choose Backtrack or Windows I am routed to GRUB boot loader, Windows 7 b
-
Upgrading CS4 Design Premium to CS5.5 Design Standard
Hi. I'm currently running the CS4 Design Premium software on my mac, but I want to upgrade to the latest software while I can still get the education price. This time, however, I think I will get CS5.5 Design Standard rather than Design Premium to sa
-
Flash CS5.5 Compiler Errors
Just upgraded from CS5 to CS5.5 Code that worked in CS5 now gives compiler errors: Symbol 'VideoPlayerMC', Layer 'Layer 2', Frame 1, Line 21 1119: Access of possibly undefined property state through a reference with static type flash.events:Vid
-
Backing up a User Account/Profile from an iBook to a Mini possible?
I have an iBook which my wife uses on a regular basis. Is it possible to backup her account/configuration/data onto my Mini. Or is it possible to duplicate her profile from the iBook onto my Mini under her account. Actually, she has an account on my
-
Where do I get DashCode 3.x ?
I am working on OS X 10.5.8 and i was trying to download DashCode 3.X but i couldn't. I downloaded the latest iPhone sdk (3.1.2) as well as XCode 3.2 and checked out. Read in some forums that DashCode gets bundled with iPhone sdk. But i couldn't find